Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Combining camera + encoder code (http://www.chiefdelphi.com/forums/showthread.php?t=46500)

kiettyyyy 12-04-2006 02:27

Combining camera + encoder code
 
Hey all!

I took the camera.c, camera.h, tracking.h, etc.. and put it right into the encoder code that kevin watson designed earlier in the year. I did some slight modification to the code so that the camera doesn't use the servos to move, it uses the drive train to move around. I tested all the code in the normal camera version of the code, and it works flawlessly.

Now when I took the encoder version of the code and combined it with all the files that Kevin Watson specified to include in the code written in camera_readme.txt, serial_ports_readme.txt, and tracking_readme.txt. I have everything the readme ask for. The code builds, the encoders work, but the camera says that there is No Camera Found!!!!!!!

Any ideas!??!?!

Thanks! :eek:

The Lucas 12-04-2006 05:41

Re: Combining camera + encoder code
 
are you handling the camera interrupts in user_routines_fast.c?

kiettyyyy 12-04-2006 18:48

Re: Combining camera + encoder code
 
Yes I am :(.. Could it be that I called the get or put data after the startup of the serial ports? Who knows.. Ill try some other stuff at the practice field today.. talk to yall soon

Joe Ross 12-04-2006 20:33

Re: Combining camera + encoder code
 
The encoder version of serial_ports.c sets serial port 2 (the TTL serial port) to 9600 bps while the camera version sets it to 115200.

Which one are you using? It should be the one from the camera.

kiettyyyy 13-04-2006 00:53

Re: Combining camera + encoder code
 
Oh! Yeah i just found SPBRG2 = BAUD_9600; // baud rate generator register [251]

Was that what you meant?
[edit]

Yep i found it inside the code now.. Ill replace it and test all of it tomorrow :)

Thanks everyone!

[/edit]

Joe Ross 13-04-2006 09:39

Re: Combining camera + encoder code
 
Quote:

Originally Posted by kiettyyyy
Oh! Yeah i just found SPBRG2 = BAUD_9600; // baud rate generator register [251]

Was that what you meant?
[edit]

Yep i found it inside the code now.. Ill replace it and test all of it tomorrow :)

Thanks everyone!

[/edit]

Make sure you change the line after it also to TXSTA1bits.BRGH = 1;

Or just copy the entire file from the camera project.


All times are GMT -5. The time now is 17:29.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi