Shop OBEX P1 Docs P2 Docs Learn Events
LCD Display with SX28 — Parallax Forums

LCD Display with SX28

monkless2monkless2 Posts: 1
edited 2009-03-02 21:39 in General Discussion
Hey guys,

I'm a total noob when it comes to this stuff. As part of my college course I have to do a project which is making a digital alarm clock using the SX28. We are using a JM162A LCD display. I have the datasheet attached. I was just wondering if anyone has any experience with using an LCD as I have no idea where to start or how I go about displaying anything on it.

Thanks in advance!

Comments

  • PJMontyPJMonty Posts: 983
    edited 2009-02-23 19:42
    Monkless2,

    1 - Open the SX/B help file by running the SX-Key IDE and clicking Help->SX/B Help.

    2 - Click on the section in the help file labeled "Example Projects"

    3 - Click on and read "Serial LCD" and "Clock / Timer"

    4 - Build both projects so you understand what they are doing and how they do it.

    5 - Combine elements from both projects to create your desired project.

    If you're a "total noob," then you need to do the work of learning from the examples first. Don't try and build something until you at least understand how others have build working projects, then you can move forward with your project

    Thanks,
    PeterM
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2009-02-24 03:10
    4-bit LCD; been there, done that. You can, too.

    http://search.parallax.com
  • Brian218Brian218 Posts: 92
    edited 2009-03-01 09:23
    Here's a link for an easy to understand tutorial on parallel LCD displays.
    http://www.electronics-lab.com/articles/lcd/lcd1.pdf

    One thing to keep in mind regarding LCDs on this forum is that a lot of forum members use serial LCDs, but the LCD you're using is a parallel display.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    This post is a work of art. Variations in spelling and grammar are intentional, artistic endeavors that add value to all of mankind.
  • NetHogNetHog Posts: 104
    edited 2009-03-01 18:40
    Interestingly I've been playing around with a parallel LCD display myself. I got it as part of a grab-bag of parts (so was just luck). Had it working with the Propeller and the Stamp. Not coded directly to SX28 though, but the material should help with your question.

    Main things to keep in mind

    1) Timing (particularly for Propeller and SX28). Make sure the E pulse widths and data hold time minimums are kept. It's always safe to go slower than the specification.

    2) Make use of the 'busy' status.

    I've included the Stamp code here, which you should be able to trivially adapt to SX/B. I didn't have to add wait time for the Stamp because·each command·runs much slower than SX28 will.·This should provide a good leg up to adapt to SX28 to get you going. Let me know if you need additional help.

    The project/code was targetted at a younger age crowd introducing them to microcontrollers, so please forgive the over-simplistic comments. I also just·added some notes for porting to SX/B prior to uploading.
  • JonnyMacJonnyMac Posts: 9,412
    edited 2009-03-01 20:01
    I use parallel LCDs all the time; attached you'll find my 4-bit code which should cover everything you need, including numeric output in binary, hex, and decimal formats. Note that this program requires SX/B 2.00.16 or later.

    [noparse][[/noparse]Edit] Fixed typo in CON section

    Post Edited (JonnyMac) : 3/1/2009 11:18:44 PM GMT
  • NetHogNetHog Posts: 104
    edited 2009-03-01 23:11
    Jonny - is this intentional? ..

    Yes CON 1
    No CON 1 ' <-- should this be 0?
  • JonnyMacJonnyMac Posts: 9,412
    edited 2009-03-01 23:13
    Yep, clearly typo on my part -- I fixed it.
  • John CoutureJohn Couture Posts: 370
    edited 2009-03-02 21:39
    Getting students started in microcontrollers is difficult so some kind of immediate feedback is essential to keep their interest.

    In light of that, one· way to quickly connect an LCD to the Professional Development Board (PDB) and enable the student to display "Hello World" on the display is to use a "wiring harness".· Jon's program above is an excellent example of a nice clean software design that the student can study also.

    Photo 1 shows the PDB with the wiring harness in place (blue CAT5 cable across top and along left).·

    Photo 2 shows the 40 x 2 Parallel LCD modules that the college bought from All Electronics for about $6 each.· These had the cable and IDC connector already attached.· The nice thing about them is that you program them the same way as a standard 20x4 parallel module.· The photo also shows the red connector (see photo3) and the punch down tool for the red connectors (the tool is pricy at $21 but you can do the same thing with careful use of a small screwdriver.

    Photo 3 is a closeup of the red connector and the strip header pins used to change the red connector from a female connector to a male plug.

    Stock #'s
    1) PDB,· 28138, $159.99, Parallax
    2) LCD,· LCD-60, $5.50, All Electronics
    3) Red Connectors, #750881, $0.33, Jameco
    4) Punch Down Tool, #365974, $20.89, Jameco
    5) .100" Pin Strip Header, 36pin, #517-834-02-36, Mouser
    6) Cat 5 cable, local hardware store

    ASSEMBLY INSTRUCTIONS:
    1) Cut the pin strip header into groups of 8
    ··
    2) Cut about 12" of Cat5 Cable

    3) punch down the wires to the red connector, remember to punch the colors in the same SEQUENCE on both connectors.

    4) Insert one end of the cable into RC

    5) Insert the second end of the cable into the X2 Connector (upper right on the PDB).· Now here is the tricky part.· The X2 connector is 7 pins wide and the Red Connector is 8 pins wide.· So you need to let one pin hang out.· Notice in photo 4 that the hanging out pin is the one that is connected to RC.0 on the other end.· Also note that the Red Connector is on the OUTSIDE pins of X2 (the inside socket connect to different parts of the LCD).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John J. Couture

    San Diego Miramar College
    640 x 326 - 115K
    640 x 470 - 127K
    640 x 413 - 115K
    640 x 529 - 193K
Sign In or Register to comment.