Go to Post Chairman's Award is not about building the robot. Every team builds a robot. - Retired Starman [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 27-01-2007, 10:45
Shinigami2057 Shinigami2057 is offline
Slackware Is Your New God (Mentor)
AKA: Harry Bock
FRC #1350 (Rambots)
Team Role: Programmer
 
Join Date: Oct 2006
Rookie Year: 2006
Location: Johnston, RI
Posts: 106
Shinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really nice
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.
__________________
One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs.
  #2   Spotlight this post!  
Unread 27-01-2007, 11:51
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Problem with TTL-RS232 + CMUCam

Quote:
Originally Posted by Shinigami2057 View Post
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.
Is the baud rate correct?
Nothing attached to the DB9?
Are the camera LED(s) on?
Did to try the serial port diagnostics code?
Consulted the FAQ?

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #3   Spotlight this post!  
Unread 27-01-2007, 20:28
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Problem with TTL-RS232 + CMUCam

Quote:
Originally Posted by Shinigami2057 View Post
Do I need to set a jumper to enable the 3-pin RS-232 port on the camera,...?
No, but you do have to remove anything that might be connected to the DB9 connector.
  #4   Spotlight this post!  
Unread 28-01-2007, 00:19
Shinigami2057 Shinigami2057 is offline
Slackware Is Your New God (Mentor)
AKA: Harry Bock
FRC #1350 (Rambots)
Team Role: Programmer
 
Join Date: Oct 2006
Rookie Year: 2006
Location: Johnston, RI
Posts: 106
Shinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really nice
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
__________________
One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs.
  #5   Spotlight this post!  
Unread 28-01-2007, 00:57
Bomberofdoom's Avatar
Bomberofdoom Bomberofdoom is offline
Biggest FIRST addict in Israel
AKA: Nir Levanon
FRC #2230 (Zcharia's Angels)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Israel
Posts: 471
Bomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond repute
Send a message via MSN to Bomberofdoom
Re: Problem with TTL-RS232 + CMUCam

What do you mean by "reset the program port and writing buffers with byte-oriented functions" ?
  #6   Spotlight this post!  
Unread 28-01-2007, 01:11
Shinigami2057 Shinigami2057 is offline
Slackware Is Your New God (Mentor)
AKA: Harry Bock
FRC #1350 (Rambots)
Team Role: Programmer
 
Join Date: Oct 2006
Rookie Year: 2006
Location: Johnston, RI
Posts: 106
Shinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really nice
Re: Problem with TTL-RS232 + CMUCam

Sorry, it's late, I don't make much sense past 1 AM.

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)
{
    int i;
    for(i = 0; i < strlen(buf); i++)
        cmucam_write( buf[i] );
}

cmucam_write_buf("tc 210 240 210 240 210 240\r");
__________________
One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs.
  #7   Spotlight this post!  
Unread 28-01-2007, 08:47
Bomberofdoom's Avatar
Bomberofdoom Bomberofdoom is offline
Biggest FIRST addict in Israel
AKA: Nir Levanon
FRC #2230 (Zcharia's Angels)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Israel
Posts: 471
Bomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond repute
Send a message via MSN to Bomberofdoom
Re: Problem with TTL-RS232 + CMUCam

Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why do we use a TTL -> RS232 converter for the CMUcam? JBotAlan Programming 6 29-11-2006 13:54
CMUCam TTL problems gabrielse Programming 4 13-02-2006 14:07
EDU-RC, USART2 (TTL), CMUCAM ChrisHomer44 Programming 2 30-04-2004 21:38
laser radar with BS2p using RS232 problems... chei_UCF19 Programming 6 26-02-2004 15:21
Having trouble with TTL port Gene F Programming 12 10-02-2004 15:23


All times are GMT -5. The time now is 23:55.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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