![]() |
Problem with TTL-RS232 + CMUCam
For whatever reason, I cannot get the PIC18 to communicate with the camera via the TTL port (shifted to RS-232 of course). I'm 99.9% certain the wiring is correct, and we have 2 level shifters (hopefully both aren't fried) to test with. I'm currently using Kevin's serial port functions and I cannot send or receive anything to/from the camera.
I've even tried loading Kevin's bells and whistles camera program, and that refuses to do anything either (in minicom it just says it is waiting for data). There is no issue communicating with the camera via the DB9 port to the computer (using either minicom or the GUI), so I'm really confused as to what's wrong. Do I need to set a jumper to enable the 3-pin RS-232 port on the camera, are both level shifters gone, or am I just an idiot (what I'm hoping, we don't really need hardware failure right now)? Thanks in advance. |
Re: Problem with TTL-RS232 + CMUCam
Quote:
Nothing attached to the DB9? Are the camera LED(s) on? Did to try the serial port diagnostics code? Consulted the FAQ? -Kevin |
Re: Problem with TTL-RS232 + CMUCam
Quote:
|
Re: Problem with TTL-RS232 + CMUCam
Okay, thanks for the help, I figured it out. For whatever reason, I guess setting stdout_serial_port to whatever the camera was communicating was mangling the commands I sent to it. Once I reset that to the program port and just starting writing buffers with the byte-oriented functions it worked flawlessly.
Thanks again for the help :) |
Re: Problem with TTL-RS232 + CMUCam
What do you mean by "reset the program port and writing buffers with byte-oriented functions" ?
|
Re: Problem with TTL-RS232 + CMUCam
Sorry, it's late, I don't make much sense past 1 AM. :p
I mean, I set stdout_serial_port = SERIAL_PORT_ONE and instead wrote a simple function to take a C-style string and write it to the TTL port one byte at a time. i.e. Code:
void cmucam_write_buf(const rom unsigned char *buf) |
Re: Problem with TTL-RS232 + CMUCam
:confused:
|
| All times are GMT -5. The time now is 04:15. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi