Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Interfacing robot with LCD (http://www.chiefdelphi.com/forums/showthread.php?t=60957)

keen101 07-01-2008 12:10

Interfacing robot with LCD
 
I really hate to post this twice, but I'm not getting any responses in the Electrical forum. I'm pretty sure it should be in the Programming section anyway. I'm really sorry about double posting.

Quote:

Originally Posted by keen101 (Post 669547)
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 (Post 669563)
First, it's my understanding that the CMUcam2 (and CMUcam3) can be used in the 2008 game.

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.

EHaskins 07-01-2008 12:22

Re: Interfacing robot with LCD
 
http://www.sparkfun.com/commerce/cat...s.php?cPath=76

Towards the bottom of the page there are several "serial enabled" LCDs.

Any of those, or any oher one that wil connect to their serial backpack will connect to the TTL serial port, then there are few commands, mostly you just write whatever you want to showup, and it does.

If you want to know I have two of the 16x2 black on green w/backlight

keen101 07-01-2008 12:28

Re: Interfacing robot with LCD
 
Thanks. That helps a little. cool.

(Maybe I should have left the other one going for awhile. Oh, well.
Again, sorry about double posting.)

EHaskins 07-01-2008 12:33

Re: Interfacing robot with LCD
 
1 Attachment(s)
Attached is some of the code I used to drive it. It needs Kevin's serial port code already installed.

Its not totally complete, since I finished it as I needed it.

You should read the datasheet for the serial adapter.

Alan Anderson 07-01-2008 12:36

Re: Interfacing robot with LCD
 
The question is too general to permit a simple answer. "How" depends entirely on what LCD panel you use. Its documentation will explain what signals it needs.

Filtering programming information through a non-programmer is usually a bad idea. It's very easy for useful suggestions to get misinterpreted and miscommunicated. Once your programmer has specific questions, it would be best for him or her to ask them himself/herself.

keen101 07-01-2008 12:45

Re: Interfacing robot with LCD
 
Quote:

Originally Posted by Alan Anderson (Post 671142)
Filtering programming information through a non-programmer is usually a bad idea. It's very easy for useful suggestions to get misinterpreted and miscommunicated. Once your programmer has specific questions, it would be best for him or her to ask them himself/herself.

Good point. I will try and get him to use chief delphi. but, sometimes he likes to do his own things.

as for wiring. I see your point about different LCD's having different inputs. But, I had not seen any "wiring diagrams for TTL" connections. I know it's a type of serial communication, but I am a little confused. there has to be a general guideline to wiring doesn't there?

Capt. Quirk 07-01-2008 17:39

Re: Interfacing robot with LCD
 
A problem with serial LCD that I have had, is they require to many programming delays and may interfer with interrupts. On the other hand a Parallel LCD is very fast, but requires too many I/O pins.

If you are using it just temporarily, perhaps a self contained data acquisition - LCD would do the trick. A cheap Parallax SX chip (aprox $3.50 + $14.00 for a 4 line LCD (ebay) ) and use the SX/Basic example in the SX-IDE. That way you don't have to add any unnecessary code that may interfere with your actual program.

keen101 07-01-2008 23:42

Re: Interfacing robot with LCD
 
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.

Kevin Watson 07-01-2008 23:52

Re: Interfacing robot with LCD
 
3 Attachment(s)
Quote:

Originally Posted by Capt. Quirk (Post 671516)
A problem with serial LCD that I have had, is they require to many programming delays and may interfer with interrupts. On the other hand a Parallel LCD is very fast, but requires too many I/O pins.

If you are using it just temporarily, perhaps a self contained data acquisition - LCD would do the trick. A cheap Parallax SX chip (aprox $3.50 + $14.00 for a 4 line LCD (ebay) ) and use the SX/Basic example in the SX-IDE. That way you don't have to add any unnecessary code that may interfere with your actual program.

Using serial LCDs is actually really easy (I suspect you're thinking about the interface to the Hitatchi 44780 LCD controller, which was pretty ugly). Attached are a few files from a project that had a seetron.com LCD attached to the programming port.

-Kevin

Kevin Watson 08-01-2008 00:01

Re: Interfacing robot with LCD
 
Quote:

Originally Posted by keen101 (Post 671940)
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.

No, these have the ugly Hitatchi 44780 interface I mentioned above. An example of a display that will work is the BPP-420L, which I've been using for some time with the FRC RCs.

-Kevin

Capt. Quirk 10-01-2008 02:05

Re: Interfacing robot with LCD
 
Quote:

Originally Posted by Capt. Quirk (Post 671516)
A problem with serial LCD that I have had, is they require to many programming delays and may interfer with interrupts. On the other hand a Parallel LCD is very fast, but requires too many I/O pins.

If you are using it just temporarily, perhaps a self contained data acquisition - LCD would do the trick. A cheap Parallax SX chip (aprox $3.50 + $14.00 for a 4 line LCD (ebay) ) and use the SX/Basic example in the SX-IDE. That way you don't have to add any unnecessary code that may interfere with your actual program.


With the SX/B LCD project, you can make your own serial LCD for cheap. But I left out the price of the Programmer and that will set you back another $30 to $50.00. The SX/B Serial LCD is similar to older Seetron units without any bells and whistles. For the price you would be better off purchasing a Serial LCD from Seetron or somebody else.

tseres 11-01-2008 19:07

Re: Interfacing robot with LCD
 
Kevin,

just to clarify, on your serial code, what ports are serial 1 and 2? is it the programming port and TTL that we used with the CMUCam?

Kevin Watson 11-01-2008 22:19

Re: Interfacing robot with LCD
 
Quote:

Originally Posted by tseres (Post 675539)
Kevin,

just to clarify, on your serial code, what ports are serial 1 and 2? is it the programming port and TTL that we used with the CMUCam?

The programming port is serial port one and operates at standard RS-232 voltage levels. The TTL/CMUcam2 port is serial port two and operates at TTL voltage levels.

-Kevin

basicxman 11-01-2008 22:40

Re: Interfacing robot with LCD
 
www.basicx.com by Netmedia, they have great serial LCD's, only takes 1 I/O line with no additional circuitry, i have one, and they work great! barely any code

Bomberofdoom 12-01-2008 04:30

Re: Interfacing robot with LCD
 
Wonder why you'd want to use and LCD, a touch screen for controling the robot?? :S :confused:

tseres 12-01-2008 13:02

Re: Interfacing robot with LCD
 
Quote:

Originally Posted by Kevin Watson (Post 675696)
The programming port is serial port one and operates at standard RS-232 voltage levels. The TTL/CMUcam2 port is serial port two and operates at TTL voltage levels.

-Kevin

thank you! :)

wireties 18-01-2008 15:21

Re: Interfacing robot with LCD
 
"Wonder why you'd want to use and LCD, a touch screen for controling the robot??"

For debugging the robot (displaying operating parameters etc) w/o the programming port. And probably just to be kewl!

JimWright949 18-01-2008 16:23

Re: Interfacing robot with LCD
 
Another way of using a LCD display with the Robot Controller is to use the digital pins. The digital pins can be configured to be outputs. Most LCDs have a 14 pin connector. If you use the LCD at is fully configurable and fastest state you will need to use 11 pins! The pins are DB0-DB7, E, R/W, RS.

Whoa that is too many, but this can be reduced. First the data lines (DB0-DB7) can be cut in half by doubling the number of commands sent to the LCD, which is ok. The R/W line can be connected to GND since we don’t really care about reading bytes back from the LCD. So now we are down to 6 digital lines. DB4, DB5, DB6, DB7, RS (register select), and E (enable).

We can even get it down further. If we use a 74164 serial shift register we can get the number of pins down to three.

Now, not only can we get down to a small amount of your digital pins, but the heavy lifting of designing and coding all of this has been done for you. The Seattle Robotics Society has a document about all of this. It can be found:
http://www.seattlerobotics.org/Works...vel2/index.php

The code is for a Atmel AVR processor, but with a little bit of work it can be translated for the RC.

If you use this and are at an event with team 1318, Issaquah High School, thank their mentor Cathy Saxton for this work.

-Jim


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

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