Go to Post For those who don't have snow in the forecast - i.e., not New England - just send me your shipping address and I'll FedEx some snow to you right away. We have extra. :p - DonRotolo [more]
Home
Go Back   Chief Delphi > Technical > Electrical
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 07-01-2008, 10:25
keen101's Avatar
keen101 keen101 is offline
Ubuntu Linux User
no team
Team Role: College Student
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Loveland, CO
Posts: 228
keen101 is a jewel in the roughkeen101 is a jewel in the roughkeen101 is a jewel in the roughkeen101 is a jewel in the rough
Interfacing with LCD to debug

Quote:
Originally Posted by keen101 View Post
I am interested in possibly using an LCD for real time "debugging"/errors

Is this possible/feasible? Would we have to "steal" the old camera TTL port?


i know Kevin Watson mentioned interfacing an LCD on his website briefly, but i think he meant it as kind of a joke.

Quote:
Originally Posted by Kevin Watson View Post
With regard to LCDs, I've used the seetron.com text displays and the earthlcd.com graphical displays on various 'bots over the past few years.

-Kevin
OK, I'm still very interested in this. I would like to know:

1. HOW to interface an LCD to the robot. (TTL port?) I really need to know how to wire it to the robot.

2. how to talk to the LCD in programming.

*note that I'm not a programmer, but I can relay the information to our team programmer. So, an idea or some sample code would be helpful.
  #2   Spotlight this post!  
Unread 07-01-2008, 12:21
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Interfacing with LCD to debug

Here's a demo example we used on a Vex robot a couple of year's ago: http://team358.org/files/programming/Vex_LCD_Demo.zip

The particular LCD we used was wired to digital input 16 and didn't use either serial port. It was a lesson on the basics of serial communication.

The README.txt file talks about the communication.

We used a Scott Edwards Electronics, Inc.
BPP-420 is an LCD module with attached serial interface. The spec. is in the zip file.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 07-01-2008 at 12:32. Reason: NOT wired to the Vex TTL port
  #3   Spotlight this post!  
Unread 07-01-2008, 12:25
keen101's Avatar
keen101 keen101 is offline
Ubuntu Linux User
no team
Team Role: College Student
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Loveland, CO
Posts: 228
keen101 is a jewel in the roughkeen101 is a jewel in the roughkeen101 is a jewel in the roughkeen101 is a jewel in the rough
Re: Interfacing with LCD to debug

Thank you. That may come in very handy.
  #4   Spotlight this post!  
Unread 07-01-2008, 12:35
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Interfacing with LCD to debug

Sorry, I had to add a P.S. to my post.

The example was used as a lesson on the basics of serial communication and didn't use either serial port. It used a single digital output pin to transmit serial data to the LCD module.

If you use the TTL port instead then you can take advantage of the built-in serial support.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #5   Spotlight this post!  
Unread 07-01-2008, 12:39
keen101's Avatar
keen101 keen101 is offline
Ubuntu Linux User
no team
Team Role: College Student
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Loveland, CO
Posts: 228
keen101 is a jewel in the roughkeen101 is a jewel in the roughkeen101 is a jewel in the roughkeen101 is a jewel in the rough
Re: Interfacing with LCD to debug

Yes, since there is no camera this year. (or at least no camera is really needed to track a green light) Then, I am thinking about "stealing" the port and use it for a cool LCD. Hopefully we can come up with a neat way to display errors, for real time debugging. But, it could at least display our team number.
  #6   Spotlight this post!  
Unread 07-01-2008, 17:13
robbrad robbrad is offline
Registered User
FRC #1875 (Autonomato Autonomatons)
Team Role: Electrical
 
Join Date: Jan 2007
Rookie Year: 2005
Location: Titusville
Posts: 37
robbrad is an unknown quantity at this point
Re: Interfacing with LCD to debug

I'm not too familiar with the processor in the RC but I use USART for my hobby projects. I just send a string to a for loop and it transmits at a specific baud rate.
__________________
  #7   Spotlight this post!  
Unread 07-01-2008, 19:31
ay2b's Avatar
ay2b ay2b is offline
Registered User
AKA: Andy
FRC #2928
Team Role: Mentor
 
Join Date: Mar 2004
Rookie Year: 1994
Location: Seattle, WA
Posts: 211
ay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant future
Re: Interfacing with LCD to debug

Spark Fun Electronics has a bunch of LCDs available. If you look for the ones labeled "serial enabled", then it is trivial to connect them to the FRC controller, or a Vex controller. Then you just use the "print()" function (making sure it goes to the right serial port) and whatever you print out shows up on the controller. There are a few escape sequences you can print to do things like clear the screen or move the cursor around.
__________________

2011 - SD Quarterfinalists (980), LA Quarterfinalists (980)
2010 - LA (2404) Finalists (980), AZ Motorola Quality (980)
2009 - LA Semifinalists (980); Las Vegas Quarterfinalists (980); SD (2404); IRI #1 Seed, Finalist (980)
2008 - SD Quarterfinalists (980), LA Champions (980), LA Rookie Inspiration Award (2404); CalGames Finalists
2007 - So.Cal Finalists (980), SD Quarterfinalists (980); CalGames Finalists
2006 - So.Cal Regional Champion (4), Toronto Judge's Award Day 1 (4)
2005 - SVR Champions, Delphi "Driving Tomorrow's Technology" (980); AZ Xerox Creativity (980); So.Cal Finalists, RadioShack Innovation in Control (980); Championship Archimedes Division Semifinalists; IRI Finalists (980)
2004 - So.Cal Regional Champions, Leadership in Controls (980); AZ GM Industrial Design (980); Championship Galileo Division #2 Seed; IRI Champions
2003 - PNW Semi-finalists (488)
2002 - PNW Finalists (488)
2000 - X-bot / 488 - Mentor / Founder
1994 - Sunny Delight - Driver - champion
  #8   Spotlight this post!  
Unread 07-01-2008, 20:51
robbrad robbrad is offline
Registered User
FRC #1875 (Autonomato Autonomatons)
Team Role: Electrical
 
Join Date: Jan 2007
Rookie Year: 2005
Location: Titusville
Posts: 37
robbrad is an unknown quantity at this point
Re: Interfacing with LCD to debug

Have you successfully changed the splash screen on one of SparkFun's serial LCDs?
__________________
  #9   Spotlight this post!  
Unread 07-01-2008, 23:41
keen101's Avatar
keen101 keen101 is offline
Ubuntu Linux User
no team
Team Role: College Student
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Loveland, CO
Posts: 228
keen101 is a jewel in the roughkeen101 is a jewel in the roughkeen101 is a jewel in the roughkeen101 is a jewel in the rough
Re: Interfacing with LCD to debug

Ok, I think I am going to either get this one

http://www.allelectronics.com/cgi-bi...W-GREEN)_.html

or this one

http://www.allelectronics.com/cgi-bi...ACKLIGHT_.html

Does anyone know how to wire it up? I have no idea which pins go where. This is my first time working with LCD's. Now that I have chosen a specific model I'm hoping someone can help me out.
  #10   Spotlight this post!  
Unread 08-01-2008, 19:01
tseres's Avatar
tseres tseres is offline
obsessed with FIRST...
FRC #1565 (Think Tank Tech)
Team Role: Leadership
 
Join Date: Apr 2007
Rookie Year: 2007
Location: Cambridge, ON
Posts: 305
tseres is a glorious beacon of lighttseres is a glorious beacon of lighttseres is a glorious beacon of lighttseres is a glorious beacon of lighttseres is a glorious beacon of lighttseres is a glorious beacon of light
Re: Interfacing with LCD to debug

i have a more general question...how can i write and send a text command to the built in TTL port on the rc? without going into detail, a GPS reciever using the standard NMEA protocol accepts TTL ASCII text strings as commands, and sends the serial amswers back...how would i go about reading and writing from the TTL port like this, or at least use a digital pin to do this?
__________________


  #11   Spotlight this post!  
Unread 08-01-2008, 19:59
ay2b's Avatar
ay2b ay2b is offline
Registered User
AKA: Andy
FRC #2928
Team Role: Mentor
 
Join Date: Mar 2004
Rookie Year: 1994
Location: Seattle, WA
Posts: 211
ay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant future
Re: Interfacing with LCD to debug

Quote:
Originally Posted by tseres View Post
i have a more general question...how can i write and send a text command to the built in TTL port on the rc? without going into detail, a GPS reciever using the standard NMEA protocol accepts TTL ASCII text strings as commands, and sends the serial amswers back...how would i go about reading and writing from the TTL port like this, or at least use a digital pin to do this?
This depends on your code. If you are using Kevin's serial_port.c/h library, then the instructions are in the file. Basically make sure you have ENABLE_SERIAL_PORT_TWO_TX defined for writing and ENABLE_SERIAL_PORT_TWO_RX defined for reading, and have the appropriate baud rate set. Then you set the global variable "stdout_serial_port" to the value of "SERIAL_PORT_TWO". After that, any printf() will go to the TTL line instead of the debug line. Please note, however, that it's possible I'm getting ports ONE and TWO mixed up.
__________________

2011 - SD Quarterfinalists (980), LA Quarterfinalists (980)
2010 - LA (2404) Finalists (980), AZ Motorola Quality (980)
2009 - LA Semifinalists (980); Las Vegas Quarterfinalists (980); SD (2404); IRI #1 Seed, Finalist (980)
2008 - SD Quarterfinalists (980), LA Champions (980), LA Rookie Inspiration Award (2404); CalGames Finalists
2007 - So.Cal Finalists (980), SD Quarterfinalists (980); CalGames Finalists
2006 - So.Cal Regional Champion (4), Toronto Judge's Award Day 1 (4)
2005 - SVR Champions, Delphi "Driving Tomorrow's Technology" (980); AZ Xerox Creativity (980); So.Cal Finalists, RadioShack Innovation in Control (980); Championship Archimedes Division Semifinalists; IRI Finalists (980)
2004 - So.Cal Regional Champions, Leadership in Controls (980); AZ GM Industrial Design (980); Championship Galileo Division #2 Seed; IRI Champions
2003 - PNW Semi-finalists (488)
2002 - PNW Finalists (488)
2000 - X-bot / 488 - Mentor / Founder
1994 - Sunny Delight - Driver - champion
  #12   Spotlight this post!  
Unread 08-01-2008, 20:24
tseres's Avatar
tseres tseres is offline
obsessed with FIRST...
FRC #1565 (Think Tank Tech)
Team Role: Leadership
 
Join Date: Apr 2007
Rookie Year: 2007
Location: Cambridge, ON
Posts: 305
tseres is a glorious beacon of lighttseres is a glorious beacon of lighttseres is a glorious beacon of lighttseres is a glorious beacon of lighttseres is a glorious beacon of lighttseres is a glorious beacon of light
Re: Interfacing with LCD to debug

thanks! that really helps a lot!


also, does that send to the TTL port that the CMU cam uses? or does it send to the porgram port (rs232)?
__________________



Last edited by tseres : 08-01-2008 at 20:32.
  #13   Spotlight this post!  
Unread 18-01-2008, 01:29
keen101's Avatar
keen101 keen101 is offline
Ubuntu Linux User
no team
Team Role: College Student
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Loveland, CO
Posts: 228
keen101 is a jewel in the roughkeen101 is a jewel in the roughkeen101 is a jewel in the roughkeen101 is a jewel in the rough
Re: Interfacing with LCD to debug

Where do I wire up the TX and RX lines of the TTL port to the LCD?
Attached Thumbnails
Click image for larger version

Name:	lcd_schematic.gif
Views:	38
Size:	11.7 KB
ID:	6048  
  #14   Spotlight this post!  
Unread 18-01-2008, 02:00
ay2b's Avatar
ay2b ay2b is offline
Registered User
AKA: Andy
FRC #2928
Team Role: Mentor
 
Join Date: Mar 2004
Rookie Year: 1994
Location: Seattle, WA
Posts: 211
ay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant futureay2b has a brilliant future
Re: Interfacing with LCD to debug

Quote:
Originally Posted by keen101 View Post
Where do I wire up the TX and RX lines of the TTL port to the LCD?
Based on the diagram, that LCD is not compatible with the TTL port. The diagram shows it wired to a "printer port", which is a parallel interface. The TTL port is a serial port. (It may be possible that the LCD also has a serial interface, not shown in this diagram.)

A byte consists of 8 bits. A parallel interface uses 8 pins and sends all bits at the same time (plus some control pins). A serial interface uses 1 pin and sends each bit in sequence.

You could still use the RC to control this LCD, but you would have to use the digital I/O pins, not the TTL port.
__________________

2011 - SD Quarterfinalists (980), LA Quarterfinalists (980)
2010 - LA (2404) Finalists (980), AZ Motorola Quality (980)
2009 - LA Semifinalists (980); Las Vegas Quarterfinalists (980); SD (2404); IRI #1 Seed, Finalist (980)
2008 - SD Quarterfinalists (980), LA Champions (980), LA Rookie Inspiration Award (2404); CalGames Finalists
2007 - So.Cal Finalists (980), SD Quarterfinalists (980); CalGames Finalists
2006 - So.Cal Regional Champion (4), Toronto Judge's Award Day 1 (4)
2005 - SVR Champions, Delphi "Driving Tomorrow's Technology" (980); AZ Xerox Creativity (980); So.Cal Finalists, RadioShack Innovation in Control (980); Championship Archimedes Division Semifinalists; IRI Finalists (980)
2004 - So.Cal Regional Champions, Leadership in Controls (980); AZ GM Industrial Design (980); Championship Galileo Division #2 Seed; IRI Champions
2003 - PNW Semi-finalists (488)
2002 - PNW Finalists (488)
2000 - X-bot / 488 - Mentor / Founder
1994 - Sunny Delight - Driver - champion
  #15   Spotlight this post!  
Unread 18-01-2008, 12:58
keen101's Avatar
keen101 keen101 is offline
Ubuntu Linux User
no team
Team Role: College Student
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Loveland, CO
Posts: 228
keen101 is a jewel in the roughkeen101 is a jewel in the roughkeen101 is a jewel in the roughkeen101 is a jewel in the rough
Re: Interfacing with LCD to debug

I'm pretty sure it has serial capabilities too. I will try and find the serial diagram when I can. But, I would like to know how to use the digital I/O pins too. how would i wire that up?
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
Interfacing a digital compass with the RC Kelly Electrical 14 27-09-2007 19:01
Interfacing with Allen-Bradley Sensors doubleslash Electrical 9 31-01-2006 14:11
SERAL INSTEAD OF DEBUG... EGG0900 Programming 2 05-11-2005 18:25
Interfacing a PC with last year's Robot Controller punarhero Technical Discussion 2 21-04-2004 00:05
Debug function in programming? archiver 2001 4 24-06-2002 00:34


All times are GMT -5. The time now is 21:56.

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