Go to Post There's more than one way to skin a cat. - Al Skierkiewicz [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 15-01-2006, 03:11
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
CMUcam2 Serial Port Diagnostics

For those that might be interested, I've created a utility application that can be used to verify the proper operation of your robot controller's serial ports, CMUcam2, TTL to RS232 conversion circuit, and cables. The code can be found here: http://kevin.org/frc. Here's the readme file:

Code:
FRC robot controller serial port diagnostics is a utility to
test the serial ports of your robot controller. It simply
takes all data sent to the programming port and sends it back
out the TTL-level serial port and conversely takes all data
sent to the TTL-level serial port and sends it back out the
programming port. Two important tests can be performed with
this software:
 
1) First is a loop-back test, which tests the the transmit
and receive circuits of both serial ports at the same time.
To perform this test, attach the programming cable between
your computer and robot controller and using the IFI loader,
upload the serial_port_diagnostics.hex file included with
this project. Once you've done that and see the text "Serial 
Port Diagnostics Running..." on your terminal window, remove
power from your robot controller and install the IFI TTL to
RS232 interface board and PWM cable that came with your 
CMUcam2. Now short the red and white pins together with a
small piece of wire or a 0.1" jumper block. Now apply power
to your robot controller and once the "Serial Port Diagnostics 
Running..." text appears, type some characters into the "To
Port ->" box under the terminal window and press the enter
key. Did the same characters appear on your terminal window?
If not, make sure everything is connected properly and try the 
test again. If the correct characters did appear, you know that 
your serial ports, TTL to RS232 board and cable are working.
 
2) The second test involves plugging the PWM cable back into 
your CMUcam2 and applying power to the robot controller and
CMUcam2. Once the "Serial Port Diagnostics Running..." text
appears, Click within the "To Port ->" window and press the
enter key a few times. Did the text "ACK" or "NCK" appear on 
your terminal window? If not, it means that your camera is
either misconfigured (e.g., wrong baud rate) or defective.
If you got at least one "ACK" back from the camera, you know
that you can successfully communicate with your CMUcam2.
-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #2   Spotlight this post!  
Unread 16-01-2006, 09:44
railerobotics's Avatar
railerobotics railerobotics is offline
Registered User
FRC #0935
 
Join Date: Jan 2006
Location: Newton, KS
Posts: 190
railerobotics will become famous soon enough
Re: CMUcam2 Serial Port Diagnostics

I did your first test but it did not display Serial
Port Diagnostics Running in the terminal.

I have done your second test and it still didn't display Serial
Port Diagnostics Running.

I even tried both the tests with the camera from last year.

Last edited by railerobotics : 16-01-2006 at 09:56.
  #3   Spotlight this post!  
Unread 16-01-2006, 13:02
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: CMUcam2 Serial Port Diagnostics

Quote:
Originally Posted by railerobotics
I did your first test but it did not display Serial
Port Diagnostics Running in the terminal.

I have done your second test and it still didn't display Serial
Port Diagnostics Running.

I even tried both the tests with the camera from last year.
Did you try hitting the reset button?

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #4   Spotlight this post!  
Unread 16-01-2006, 13:21
railerobotics's Avatar
railerobotics railerobotics is offline
Registered User
FRC #0935
 
Join Date: Jan 2006
Location: Newton, KS
Posts: 190
railerobotics will become famous soon enough
Re: CMUcam2 Serial Port Diagnostics

Yes mulitple times
  #5   Spotlight this post!  
Unread 16-01-2006, 13:59
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: CMUcam2 Serial Port Diagnostics

Quote:
Originally Posted by railerobotics
Yes mulitple times
I'm pretty clueless here. You're able to load the camera code, but it reports, via serial port one, that it can't find the camera on serial port two. Now, not even serial port one works. You've got solid green lights on the robot controller and the tethered operator interface, right? Are you loading the code using a real serial port (i.e., not a USB port with a serial converter)? You're using IFI Loader 1.0.12?

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #6   Spotlight this post!  
Unread 16-01-2006, 14:02
railerobotics's Avatar
railerobotics railerobotics is offline
Registered User
FRC #0935
 
Join Date: Jan 2006
Location: Newton, KS
Posts: 190
railerobotics will become famous soon enough
Re: CMUcam2 Serial Port Diagnostics

I am not using USB port with a serial converter but what do you mean by a tethered operator interface. My serial cable is plugged into the program port of the robot controller if that's what you mean.
  #7   Spotlight this post!  
Unread 16-01-2006, 14:13
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: CMUcam2 Serial Port Diagnostics

Quote:
Originally Posted by railerobotics
...but what do you mean by a tethered operator interface.
You must have an operator interface connected to the robot controller before the robot controller will run your code.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #8   Spotlight this post!  
Unread 16-01-2006, 14:14
railerobotics's Avatar
railerobotics railerobotics is offline
Registered User
FRC #0935
 
Join Date: Jan 2006
Location: Newton, KS
Posts: 190
railerobotics will become famous soon enough
Re: CMUcam2 Serial Port Diagnostics

I finally got someting in the terminal window. It gives and bunch of options for changing color values. What do I do know that camera doesn't track. And it never displays searching. But sometimes it doesn't display anything at all. I re downloaded the code but this time nothing was in the terminal window

Last edited by railerobotics : 16-01-2006 at 14:25.
  #9   Spotlight this post!  
Unread 16-01-2006, 14:48
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: CMUcam2 Serial Port Diagnostics

Quote:
Originally Posted by railerobotics
I finally got someting in the terminal window. It gives and bunch of options for changing color values. What do I do know that camera doesn't track. And it never displays searching. But sometimes it doesn't display anything at all. I re downloaded the code but this time nothing was in the terminal window
Do you have the operator interface tethered, via the red cable, to the robot controller?

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #10   Spotlight this post!  
Unread 16-01-2006, 15:00
railerobotics's Avatar
railerobotics railerobotics is offline
Registered User
FRC #0935
 
Join Date: Jan 2006
Location: Newton, KS
Posts: 190
railerobotics will become famous soon enough
Re: CMUcam2 Serial Port Diagnostics

Yes, we do. By typing com1 at the bottom of the terminal window we get color values but I don't know what to do next.

Last edited by railerobotics : 16-01-2006 at 15:17.
  #11   Spotlight this post!  
Unread 16-01-2006, 15:29
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: CMUcam2 Serial Port Diagnostics

Quote:
Originally Posted by railerobotics
Yes, we do. By typing com1 at the bottom of the terminal window we get color values but I don't know what to do next.
Actually, all you need to do is type the letter 'c' to bring up the camera menu. Typing the letter 't' will bring up the tracking menu. This is all documented in the camera software.

I'm not sure if I asked this before, but can you load the IFI default code? Does it work?

You need to re-load the serial_port_diagnostics.hex file and hit the reset button. Then follow the included instructions to make sure you can communicate with the camera. If you don't get the "Serial Port Diagnostics Running..." message, I don't have a clue what might be happening here.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #12   Spotlight this post!  
Unread 16-01-2006, 15:37
railerobotics's Avatar
railerobotics railerobotics is offline
Registered User
FRC #0935
 
Join Date: Jan 2006
Location: Newton, KS
Posts: 190
railerobotics will become famous soon enough
Re: CMUcam2 Serial Port Diagnostics

I loaded the serial port diagnostics but still don't see the Serial Port Diagnostics Running... message

Also when I load the camera code, I can change values but the terminal never says searching.

Last edited by railerobotics : 16-01-2006 at 15:59.
  #13   Spotlight this post!  
Unread 18-02-2006, 15:05
lil_longo's Avatar
lil_longo lil_longo is offline
Registered User
AKA: Brian
FRC #1676
Team Role: Mascot
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Pascack Valley
Posts: 53
lil_longo has a spectacular aura aboutlil_longo has a spectacular aura aboutlil_longo has a spectacular aura about
Send a message via AIM to lil_longo
Re: CMUcam2 Serial Port Diagnostics

Quote:
Originally Posted by Kevin Watson
For those that might be interested, I've created a utility application that can be used to verify the proper operation of your robot controller's serial ports, CMUcam2, TTL to RS232 conversion circuit, and cables. The code can be found here: http://kevin.org/frc. Here's the readme file:

Code:
FRC robot controller serial port diagnostics is a utility to
test the serial ports of your robot controller. It simply
takes all data sent to the programming port and sends it back
out the TTL-level serial port and conversely takes all data
sent to the TTL-level serial port and sends it back out the
programming port. Two important tests can be performed with
this software:
 
1) First is a loop-back test, which tests the the transmit
and receive circuits of both serial ports at the same time.
To perform this test, attach the programming cable between
your computer and robot controller and using the IFI loader,
upload the serial_port_diagnostics.hex file included with
this project. Once you've done that and see the text "Serial 
Port Diagnostics Running..." on your terminal window, remove
power from your robot controller and install the IFI TTL to
RS232 interface board and PWM cable that came with your 
CMUcam2. Now short the red and white pins together with a
small piece of wire or a 0.1" jumper block. Now apply power
to your robot controller and once the "Serial Port Diagnostics 
Running..." text appears, type some characters into the "To
Port ->" box under the terminal window and press the enter
key. Did the same characters appear on your terminal window?
If not, make sure everything is connected properly and try the 
test again. If the correct characters did appear, you know that 
your serial ports, TTL to RS232 board and cable are working.
 
2) The second test involves plugging the PWM cable back into 
your CMUcam2 and applying power to the robot controller and
CMUcam2. Once the "Serial Port Diagnostics Running..." text
appears, Click within the "To Port ->" window and press the
enter key a few times. Did the text "ACK" or "NCK" appear on 
your terminal window? If not, it means that your camera is
either misconfigured (e.g., wrong baud rate) or defective.
If you got at least one "ACK" back from the camera, you know
that you can successfully communicate with your CMUcam2.
-Kevin


can you like dum that down for me cuz i want to learn programming and i didnt understand any of that i lost u after the first word
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
Scripting Setup and the Camera + Serial Port Drivers CJO Programming 22 11-01-2006 17:42
User input via serial port AJBelayer FIRST Tech Challenge 2 14-12-2005 18:54
TTL port to a serial port on a demo board ImmortalAres Programming 16 09-07-2005 23:44
Updated: Serial Port Driver Code Kevin Watson Programming 4 05-02-2005 18:39
New Serial Port Driver Kevin Watson Programming 16 09-01-2005 01:56


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

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