PDA

View Full Version : LCD with serout command



azispn99
- 6th April 2006, 12:02
greetings guys..

I am trying to study microcontroller by following tutorial in PIC robotics book, A beginner's guide to robotics project using the PICmicro, by John Iovine. I saw in that book, to use LCD he used SEROUT command instead of LCDOUT. What make me confuse is, he said that serial line from LCD must be connected to port B0. I don't use the same board like his. His board contain LCD that already connect to PIC but without explaining how to connect it. I am only use breadbord to connect the electronic part.
I don't know which cable from LCD that serial line. I only know that LCD only have RS, R/W, E data port, Vss, Vdd
Can you tell me how to connect LCD to pic16f84A so I can use SEROUT to give command to LCD. I need this information so I can continue following the tutorial in that book.

thanks

Melanie
- 6th April 2006, 13:08
This is where your tutorial may part company with reality...

An LCD with a Hitachi compatible embedded controller will require either FOUR or EIGHT Data Lines (your choice depending on whether you want to run the LCD in 4 or 8-bit Data mode), plus TWO additional lines, RS and E. The R/W line is optional depending if you want to read-back data from the LCD which most folks tend to dispense with. So, in this case you need to devote either SIX or TEN I/O lines from your PIC. These will accept commands such as LCDOUT. If you just have a bare LCD you may be stuck at this point.

The Serial LCD's have a PIC (or other microcontroller) already connected to them (also known collectively as LCD Backpacks) and are able to accept asynchronous SERIAL data at a pre-set baudrate. Only these will accept data using commands such as SEROUT, or SEROUT2 or DEBUG or HSEROUT. If you haven't got one of these, you either need to aquire or make one.

Btw... the LCD connection is not mandatory to nail it to B0. You can use any pin you want, but obviously if you're following the book and the author has it on B0, you need to connect there to run the published sample software.