|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hey guys! Its been an amazing year so far. We bought an LCD from sparkfun. I have no idea how to get it to work? I checked Kevin's site but he has no diagram or code on it. I saw one called serial driver but I have no clue how to use that code to make the LCD work. Is it possible someone can give me some directions? for example how to wire it and what code to use? Please be as clear as possible.
|
|
#2
|
|||||
|
|||||
|
Re: How to Hook up LCD
Which LCD did you buy?
Serial input? |
|
#3
|
|||
|
|||
|
Re: How to Hook up LCD
You're going to have to write the code yourself. The LCD communicates via serial, and does things based on different commands. There is documentation on these commands.
|
|
#4
|
|||
|
|||
|
Re: How to Hook up LCD
http://www.sparkfun.com/commerce/pro...roducts_id=255
The link leads to the LCD we are using. I am so confused on how to hook it up. I know that i have to attach it using RS32 but how do i connect RS232 to this LCD device since it has this small adapter attached to it???? and where do i connect this RS232 on the operator interface? Seems kinda a weird, its like i am going in circles. |
|
#5
|
|||
|
|||
|
Re: How to Hook up LCD
http://www.sparkfun.com/commerce/pro...roducts_id=258
this is the link to the adapter that is attached at the back of the LCD already called "Backpack." Also our adapter has the female end for the "GND 5V RX" pin because in the image you sill see two different adapters. One with male end and one with female end. Please let me know if you guys can come up with solution. |
|
#6
|
||||
|
||||
|
Re: How to Hook up LCD
Quote:
In short, you'll need to connect the RS (register select), R/W (read /write), E (clock), and either 4 or 8 of the data lines to I/O pins on your microcontroller... in addition to providing power and a contrast adjustment pot. Here are some links you may find helpful: http://www.sourceboost.com/Products/...ampleCode.html A posting in the sourceboost forum http://panda.bg.univ.gda.pl/~janusz/software.html#lcd If you poke around on the SourceBoost website, I was able to find several different versions of HD44780 compatible drivers written by a few different people. Hopefully that will get you pointed in the right direction... |
|
#7
|
|||
|
|||
|
Re: How to Hook up LCD
Hey Dave thanks for the message. Just to clear up, I want to use this LCD for OI so the drivers can view the heading angle of the robot etc. So, how can I connect? Like its not clear. Using the adapter which sparkfun has already attached to LCD there are only 3 holes I see, 1) 5V 2) GND 3) RX. I have looked at many codes infact kevin has written one as well but what I understand so far is that these codes are written so that the LCD can be mounted onto the robot not on Operator Interface. Please let me know Dave if I misunderstood something. I really appreciate your input.
|
|
#8
|
|||||
|
|||||
|
Re: How to Hook up LCD
The Backpack handles the serial communication and can be hooked up directly to the TTL port on the RC (gnd-to-gnd, 5v-to-5v, Backpack/Rx-to-RC/Tx). I do have example code that uses a digital output instead to communicate through, but the TTL port is the easiest way to do so and has the advantage of using more efficent dedicated hardware. Kevin's example is very clear too.
The OI does not have a serial port that you can control well enough to allow you to hook your LCD up directly to it. You'd need something to take input from the OI's Dashboard port, decipher the format, extract the data you wish to display, then issue the appropriate sequence of LCD commands. Last edited by Mark McLeod : 04-03-2007 at 14:07. Reason: different word, but no change |
|
#9
|
|||
|
|||
|
Re: How to Hook up LCD
Thanks Mark for clearing up. So with the help of "Backpack" I don't have to do anything, absolutely no wiring but simply attach that LCD to the serial port. Also for the coding I can simply use Mr. Kevin's code for serial driver.
What if I am also using a camera? How do I manage to use serial driver than? |
|
#10
|
|||
|
|||
|
Re: How to Hook up LCD
Also mark as you stated that we can use digital input/output pins to use the LCD. Is it possible you can share that example code with us so we can probably elaborate on it? Please let me know thanks.
|
|
#11
|
||||
|
||||
|
Re: How to Hook up LCD
It sounds like you are trying to set up a system that connects to the OI dashboard, parses the data, and then prints it out onto a LCD.
If you are looking at just doing the current angle, why don't you use the 3 number display already on it? if you still want to do the LCD, I would suggest using a 16f628 and decoding the dashboard data. The specs on the data packets are on IFI's website. |
|
#12
|
|||
|
|||
|
Re: How to Hook up LCD
Quote:
What exactly do you plan to use this LCD for? |
|
#13
|
|||||
|
|||||
|
Re: How to Hook up LCD
Quote:
Quote:
|
|
#14
|
||||
|
||||
|
Re: How to Hook up LCD
Quote:
As Mark corrected pointed out, the 'backpack' will need something in between the dashboard port and the backpack's serial port. Also keep in mind that the 'dashboard' port has RS-232 levels on it, whereas the backpack is expecting a TTL level signal. The Backpack uses a PIC16 CPU that is FLASH based, and the programming header at JC1 could be used to reprogram the PIC with your own custom software. This would allow the display to work directly from the dashboard data, but for that you not only need to write the display drivers (which I've already provided pointers to) but also the serial port parsing code to interpret the dashboard data and turn it into something meaningful on your display. You will also need an in-circuit programmer. Microchip's ICD2 is about $160, but if you search around you'll find clones for less and information on how to homebrew them. The PIC16F688 only has 7K of program memory, which might be a little small if you want to write the new program in "C", so unless you can avoid doing anything that requires one of the "C" libraries to be linked in, you might end up needing to write the new program in assembler. Writing new code would be the cleanest way to do it, but certainly inserting a small microcontroller with two serial ports in series would be another way to do it. |
|
#15
|
|||
|
|||
|
Re: How to Hook up LCD
Thank you very much everyone. This post has been really helpful to me. Thanks Mark for sharing your code. The purpose of this LCD is to check the flow of current in our robot, check robot's current angle and distance travelled which is monitored by Gear Tooth Sensor and Gyro. However, the LCD adds the cool factor to the control system. Since its difficult to attach this LCD to the Operator Interface. Now we are planning on attaching a tablet to the OI and have it setup up so the drivers can see all motor values, gyro value, gear tooth value and infact they can precisely control the robot by looking at these values. Also, it helps in troubleshooting our autonomous after every game because we will have record of what went wrong where. So ya!
Is it possible I can change between the two codes in my robot? for example a default code and camera code in robot without downloading back and forth? So I can have control over which code will be used during each game just by flicking some switches on and off? |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to hook up a Police light on the Robot?? | xur2007 | Technical Discussion | 4 | 13-11-2006 18:27 |
| how to mount a lcd display onto a robot | mechanicalbrain | Electrical | 9 | 07-09-2005 20:57 |
| How do you hook up the camera? | SpeakerSilenced | Programming | 18 | 16-02-2005 15:00 |
| How do u hook up the digital input to the sensor's wires | Fares | Technical Discussion | 2 | 14-02-2003 16:41 |
| how do u hook up things through the fuse panel? | chrisw | Technical Discussion | 9 | 12-01-2002 19:51 |