Shop OBEX P1 Docs P2 Docs Learn Events
LCD Direct Hardware Interface — Parallax Forums

LCD Direct Hardware Interface

Rockn-RollRockn-Roll Posts: 4
edited 2006-10-23 13:17 in BASIC Stamp
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

Comments

  • FranklinFranklin Posts: 4,747
    edited 2006-10-22 22:58
    As you can see from this documentation the display takes serial input. I would think (but did not confirm) that it takes 8 bits, no parity, 1 stop bit. if you can make your device talk to a terminal it should talk to this display. Take a look at the documentation for more info. www.parallax.com/dl/docs/prod/audiovis/SerialLCD-v2.0.pdf

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Rockn-RollRockn-Roll Posts: 4
    edited 2006-10-22 23:58
    Thanks for your post. Yes, the communication is serial and I do have the documentation. Yes, I can communicate with a PC and every other device which provides a timing diagram. But, nowhere in the documentation does it provide the serial port configuration, i.e. whethere there is a start bit, stop bit, parity, etc. There's just the buad rate selection.

    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?
  • metron9metron9 Posts: 1,100
    edited 2006-10-23 06:43
    Here is 9600,No parity,8-bit,Inverted one byte "A"

    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
    641 x 324 - 10K
    543 x 361 - 10K
  • Rockn-RollRockn-Roll Posts: 4
    edited 2006-10-23 10:49
    Thanks metron9!· I'm very glad that I've encountered an active forum with helpful members.· Making these images must have taken some doing...let me know if a computer engineer, musician, and gamer can do anything in return...I owe you one.

    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

    ·
  • Rockn-RollRockn-Roll Posts: 4
    edited 2006-10-23 13:17
    Success!jumpin.gif

    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
Sign In or Register to comment.