Shop OBEX P1 Docs P2 Docs Learn Events
LCD displays. — Parallax Forums

LCD displays.

GabeGabe Posts: 24
edited 2005-09-14 17:06 in BASIC Stamp
Hi Guys,

I was using this LCD which·uses parallel transmission for data transfers during my project's testing stage. So after some time, I decided to buy this LCD, but due to my inexperience, I bought a LCD which actually uses serial transmission for data transfer.

I was just wondering how different is it in terms of issuing commands to·LCD using serial transmission·instead of·parallel transmission·with·the Pbasic 2.5 language?

And also, with the old LCD, i could connect to each pins on the LCD to each pin of the BS2p40 that I am using. Now the new serial LCD has a serial port 9 pin connector. I am wondering how do i connect it to my BS2p40?

The new LCD in question is actually the·4x20 Serial LCD with Keypad Interface which can be found on this URL: http://www.parallax.com/detail.asp?product_id=30058.

Any help would be greatly appreciated.

Thanks in advance,
Gabe

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-09-09 14:06
    There is a manual attached to that page ... have you read through it?· With the BS2p you could use SEROUT or I2COUT to send data to the display; which command to use depends on how you decide to connect it.· Also, Matrix Orbital (the manufacturer) has additional documentation and demo programs on their web site.

    http://www.matrixorbital.ca/appnotes/basic_stamp/

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-09-09 14:08
    Gabe,

    ·· That LCD is controlled differently than your last one.· This one uses one or two I/O lines (depending on how you connect/use it.· You would use SEROUT in place of the LCDOUT and LCDCMD commands.· It's actually pretty easy.· Please be sure to download the errata sheet from the bottom of the page you linked, since if you bought the module from us, it will not have the DB9, but will be set up for easy connection to the BASIC Stamp via a header instead.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Tom-Matrix OrbitalTom-Matrix Orbital Posts: 38
    edited 2005-09-09 18:02
    Hi Gabe,

    A serial interface LCD uses a significant less amount of wires for connection. Only power, ground, transmitt, and receive. Everything from contrast control, bargraphs, custom characters, etc. is done in the firmware, so there will be a significant less amount of coding involved. Check out the appnotes at the link which Jon has posted, and you will know what i'm talking about. You can look at the manuals at http://www.matrixorbital.ca/manuals
  • vincentvincent Posts: 11
    edited 2005-09-14 09:28
    hi guys,

    i am gabe groupmate on this project.

    We just got the LCD the and started to do some testing to see if it works. But unfortunately, it have been to no avail . As Jon have referred us to the following website, http://www.matrixorbital.ca/appnotes/basic_stamp/bs_text/bs_text_serial

    we have tried to the testing procedure(connection and program)as instructed in the website but all we got was the LCD flickering non-stop. We had tried to change some things like the baud rate, pin number but nothing works. Therefore i was wondering whether does serial LCD have to be initialise before using. If yes, it would be good to give us some advice cause we are totally clueless right now.

    Vincent
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-09-14 14:47
    Vincent,

    ·· Please post the code you are using.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • GabeGabe Posts: 24
    edited 2005-09-14 15:07
    Hi guys,

    Just to fill in on what my groupmate has said. I have attached a rough diagram showing how our serial was connected up.

    Basically we tried different baud rates as indicated in the manual, which includes switching the jumper settings.
    The jumper settings could be found on Page 10 of the online manual (which is available here http://www.parallax.com/dl/docs/prod/audiovis/molcd4x20.pdf.)

    From the manufacturer's website, we found these example codes to output words onto the LCD.
    '{$STAMP BS2p}
    SEROUT 1, 84,[noparse][[/noparse]"Hello World"]
    

    The website also indicated that the value '84' in the codes is actually used for the baud rate of 9600. So·we tried the 2 jumper settings under both slave address allocated to 9600 baud rate as shown in the manual but to no avail. The LCD flickered on and off at different rates asif it did not have enough time to initialise or process the data that is sent. I tried adding a "PAUSE 2500" at the end of the codes and run it, but with the same results. It really had us scratching our heads.

    We were wondering if there is a need to initialise the LCD before inputting these commands. As we used some initialisation commands with a parallel LCD before, we used LCDCMD commands to send commands to the LCD, so I was wondering if LCDCMD could also be used here. If not, is it possible if there is anyone with some simple codes to initialise a Serial LCD?
    900 x 900 - 62K
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-09-14 15:15
    Gabe,

    ···You·would not use the LCDCMD/LCDOUT commands with serial displays.· Please post the code you have.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • GabeGabe Posts: 24
    edited 2005-09-14 15:21
    Chris,
    This is basically the codes my groupmate has tried. He changed the value of '84' to '240'. The BS manual says that for the BS2p , in order to transmit 8bits,no parity, and 1 stop bit.
    ' {$STAMP BS2p}
    Init:
     PAUSE 1000
     GOSUB InitLCD
    Start:
     SEROUT 1,240,[noparse][[/noparse]"Hello World"]
     PAUSE 1000
     LCDCMD 1,1
     PAUSE 3000
    GOTO Start
    '----subroutine----
    InitLCD:
    PAUSE 1000
    LCDCMD 1, 30
    PAUSE 10
    LCDCMD 1, 30
    PAUSE 1
    LCDCMD 1, 30
    PAUSE 1
    LCDCMD 1, 32
    LCDCMD 1, 40
    LCDCMD 1, 12
    LCDCMD 1, 6
    LCDCMD 1, 1
    RETURN
    

    Thanks,
    Gab
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-09-14 15:22
    Gabe,

    ··· That code won't work with the serial display.· You have mixed Parallel and Serial code there.·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • GabeGabe Posts: 24
    edited 2005-09-14 15:28
    Chris,

    Alright, point noted. So was there any problems with the connections? By the way, is it possible if you could give me some pointers as to how to initialise the LCD?

    Thanks,
    Gab
  • Tom-Matrix OrbitalTom-Matrix Orbital Posts: 38
    edited 2005-09-14 16:29
    You won't need to initalize anything on that serial interface display. It's done all in the firmware. You will only need to do the serout commands as shown in the samples at the matrix orbital website.
  • GabeGabe Posts: 24
    edited 2005-09-14 16:36
    Tom,

    If that is the case, the codes below alone should work, isnt it?
    '{$STAMP BS2p}
    SEROUT 1, 84,[noparse][[/noparse]"Hello World"]
    
    

    or should it be·these codes·below:
    '{$STAMP BS2p}
    SEROUT 1, 240,[noparse][[/noparse]"Hello World"]
    
    

    Assuming my connections are correct.

    Thanks,
    Gab
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-09-14 17:06
    The second code is correct if you're using a BS2p module...The first one is the value for the BS2.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
Sign In or Register to comment.