LCD Direct Hardware Interface
Hi.· I'm a college student working on my Senior Project.· I purchased the parallax 4x20 LCD (#27979).· I have the datasheet and have wired it up properly...the test works fine, and I've verified my connections.· I don't know what STAMP is, so forgive me if I'm circumventing this forum heading.· But, I see posts in here for the LCD that I'm using, so I guess this is the best place to get the information I need.
I'm writing a controller using a Xilinx Virtex 1000XCV Field Programmable Gate Array·(FPGA) and Verilog in the Xilinx Foundation ISE development software.· Basically this allows me to completely control the RX pin on the LCD.· But, I cannot find any documentation on the actual hardware signal waveforms required to display a character on the LCD.· For example, there's no information on if there is a start bit, stop bit, parity bit, etc.· Here's what I'm doing now:
RX=1;· //I hold this high initially for several seconds.
//Now I·set the RX pin at the selected baud rate to send a hex 41 which is an ASCII 'A':
RX=0;
RX=1;
RX=0;
RX=0;
RX=0;
RX=0;
RX=0;
RX=1;
//then I set RX=1 and hold it there.
Nothing happens...the cursor just sits there like I didn't do anything.· Does anyone know exactly what the signals are for the LCD RX pin to just send a single character?
thanks,
Steve
I'm writing a controller using a Xilinx Virtex 1000XCV Field Programmable Gate Array·(FPGA) and Verilog in the Xilinx Foundation ISE development software.· Basically this allows me to completely control the RX pin on the LCD.· But, I cannot find any documentation on the actual hardware signal waveforms required to display a character on the LCD.· For example, there's no information on if there is a start bit, stop bit, parity bit, etc.· Here's what I'm doing now:
RX=1;· //I hold this high initially for several seconds.
//Now I·set the RX pin at the selected baud rate to send a hex 41 which is an ASCII 'A':
RX=0;
RX=1;
RX=0;
RX=0;
RX=0;
RX=0;
RX=0;
RX=1;
//then I set RX=1 and hold it there.
Nothing happens...the cursor just sits there like I didn't do anything.· Does anyone know exactly what the signals are for the LCD RX pin to just send a single character?
thanks,
Steve
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
Now, serial handshaking comes in two flavors...hardware and software. Obviously, hardware handshaking is not going to work since it requires two more wires for the RTS/CTS signals. Thus, the remaining handshaking is software which is usually ACK/NACK where one device sends a byte of data...usually FF then the other replies with 00. But, no handshaking signals are provided. The only information on any handshaking is that the RX pin must be held high when not sending any data. Plus, there doesn't seem to be a TX pin on the LCD, so communication appears to be in just one direction.
I'm trying different configurations of start bits and stop bits, but nothing is happening.
What I need is the exact bit stream to send a character...preferably 'A'.
I know that is doesn't work to keep the RX pin high and then drop it low and set the RX pin to 01000001 at the required baud rate:
I've tried adding a stop bit (dropping it low again then back to high after sending 01000001) but that hasn't worked either.
Could someone connect their STAMP thing it to a digital analyzer and post the bitstream or waveform of sending the 'A' character?
Or, is there some tech support where the timing diagrams or waveforms or bitstreams are available?
basic stamp 2 code
SEROUT 15,16468, [noparse][[/noparse]"A"]
Not sure what the LCD takes for serout if its different let me know and Ill run it again.
aww gees I looked it up here it is.
TxPin CON 15
Baud19200 CON 32
HIGH TxPin ' Set pin high to be a serial port
PAUSE 1000 ' Pause for Serial LCD to initialize
SEROUT TxPin, Baud19200, [noparse][[/noparse]"A"]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think outside the BOX!
Post Edited (metron9) : 10/23/2006 6:53:14 AM GMT
OK...help me understand the images.· The attachment on the left·named serialA.png is showing the STAMP system sending an·inverted serial 'A' using the SEROUT 15,16468,[noparse][[/noparse]"A"] code while the attachment on the right named seriallcd.png is showing the STAMP system sending a non-inverted or true serial 'A' using the SEROUT 15,32,[noparse][[/noparse]"A"] code.· I gather that the lcd required the non-inverted signal.
I've read Chapter 6 of Parallax Signals.pdf file titled Asynchronous Serial Communication, which agrees with what I'm seeing from you.
However, it looks like the signal which the STAMP system is calling "non-inverted" is actually inverted...in otherwords the image named seriallcd.png is showing a bit stream of 101111101 before it returns to the steady idle state of 0.· That bit stream is sending low to high trigger follwed by hex ED which is an inverted·82 which is the reverse of a 41·('A').·· This means that the lcd requires that the RX pin be kept low when not sending any data (this is standard ANSI RS232), then pulled high to start the lcd timer followed by the inverted code (character or comman) LSb first followed by the idle state again for·a required delay.· Yes...this is very different from the serial communications I've dealt with before, but now that I've got it I'll give it a try.
Thanks again,
Steve
·
The seriallcd.png image waveform is exactly what I needed.
The details are that the Parallax LCD serial controller requires an idle high RX signal.· It then looks for RX to go low which signals the lcd to start it's timer.· It then waits 1-1/2 clock cycles then latches 8 non-inverted bits LSb first in the middle of each cycle.
Thanks.
Steve