Shop OBEX P1 Docs P2 Docs Learn Events
Having trouble interfacing PropSTICK & PDB's LCD — Parallax Forums

Having trouble interfacing PropSTICK & PDB's LCD

SSteveSSteve Posts: 808
edited 2006-05-22 16:42 in Propeller 1
I'm trying to get my PropSTICK to talk to the parallel LCD through the connector on the Professional Development Board. I started with Jon's Serial LCD object and modified it for the parallel LCD.

I put 10k resistors between all of the PropSTICK pins and the LCD header. I think I've got the code doing what I want. I've checked the E, RS, and data pins with a 'scope and they're all behaving the way I expect, but the LCD isn't responding. Is this a 5V vs. 3.3V problem or am I doing something else wrong?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
OS-X: because making Unix user-friendly was easier than debugging Windows

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-05-20 22:38
    Steve,

    ·· Jeff Martin has successfully interfaced to the Parallel LCDs of many sizes and brands including 4X40 (dual-controllers).· I think he even had 22K resistors so I doubt that's the issue.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • SSteveSSteve Posts: 808
    edited 2006-05-20 22:57
    Thanks, Chris. I'll keep tracing with the 'scope. If anyone sees any problems in my code, please let me know.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    OS-X: because making Unix user-friendly was easier than debugging Windows
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-05-21 00:12
    Since you have a scope then you can see the signal on both sides of the resistor.· I will see if I have time to check your code today with my own circuit.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • SSteveSSteve Posts: 808
    edited 2006-05-21 16:21
    Chris Savage (Parallax) said...
    Since you have a scope then you can see the signal on both sides of the resistor.
    That was the kick I needed. After I read that I saw that I was measuring the E & RS signals on the Propeller side of the resistor. When I measured on the LCD side I saw that I was getting zero volts. I connected the Propeller pins directly to the E, RW, & RS inputs of the LCD and I started getting some action. (On the data pins I had already been measuring on the LCD side and those voltages were OK.)

    Then it was just the small matter of having the most significant bit/least significant bit backward in my outa[noparse][[/noparse]DB7Pin..DB4Pin] statements and now everything's working perfectly.

    Edit: Attached program

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    OS-X: because making Unix user-friendly was easier than debugging Windows

    Post Edited (SSteve) : 5/21/2006 4:39:39 PM GMT
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-05-21 16:50
    SSteve,
    I just wanted to confirm that you are NOT using resistors on the E, RW, & RS and that you are using 10,000 ohm resistors on the 4 data pins.
    Also, I presume that the posted Object is working now.

    I have several parallel LCDs and only one [noparse][[/noparse]not Parallax Serial LCD], so I really would like to impliment this object.
    The nice thing about OOP seems to be that these objects are a lot easier to share than a whole application and/or snippets in PBasic.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)

    ······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • SSteveSSteve Posts: 808
    edited 2006-05-21 17:19
    Hi, Kramer. That's correct. I'm not using resistors on E, RW, & RS. I'm using 10k resistors on the 4 data pins. There's a wiring diagram in the source code.

    The posted version is working great in a few quick tests. Let me know if you have any problems.

    You're right. With OOP it is much easier to share useful code. Since it's a self-contained entity, you only need to know how it interfaces--you don't have to figure out how to merge lines of new code with lines of code you've already written. It's also easier to modify existing code. Ninety percent of the code I posted is the serial version that Jon wrote. I only had to change a few methods to get it to work with the parallel LCD.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    OS-X: because making Unix user-friendly was easier than debugging Windows
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-05-21 18:42
    Steve,

    ·· Tomorrow I will check with Jeff on the connections he used.· Often with the Propeller you will need some resistor on control lines like that since some are internally pulled high.· I will check into this further though.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • SSteveSSteve Posts: 808
    edited 2006-05-22 02:23
    Thanks, Chris. I've still got a way to go before I understand all the pitfalls on the hardware side. I'm glad someone's watching out for me. smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    OS-X: because making Unix user-friendly was easier than debugging Windows
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-05-22 15:08
    Steve,

    ·· I spoke with Jeff just now who is desperately trying to fill the need for more documentation.· He used 2.2K resistors on all 8 data lines when connecting his LCDs.· The only other resistor he used was a 10K pull-down on the Enable line.· Other than the data lines, the other lines were connected directly.· If you were using write only mode as is often done on the BASIC Stamp you could ground the R/W line and not have to have the 2.2K resistors.· I wouldn't recommend this though.· The Propeller is so fast and with an LCD object running in another COG you could write extremely fast by reading the BUSY Flag and sending data as fast as the LCD can accept it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-05-22 15:13
    Steve,

    ·· I just noticed your object is working in 4-bit mode.· You can get a substantial speed increase using 8-bit mode, and the Propeller certainly has the I/O for it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • SSteveSSteve Posts: 808
    edited 2006-05-22 15:25
    Thanks for the info, Chris. I'll swap the 10k resistors on the data lines for 2.2k. I'm also going to modify the object so that the user can specify 4-bit or 8-bit mode and so that it checks the BUSY flag.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    OS-X: because making Unix user-friendly was easier than debugging Windows
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-05-22 15:40
    Thanks Chris and SSteve.
    I have projects growing like mushrooms and in need of output display. For now, this will save me having to construct Serial to LCD from SX18s that I have set aside.

    I still prefer the serial interface as the Parallel just consumes 7 to 11 pins of the Propeller. I guess if you don't need them it is okay.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)

    ······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-05-22 16:42
    With several people developing Parallel LCD Objects/Interfaces it will be interesting to see what everyone comes up with.· My Z80 routines would always check the busy flag prior to any write.· In 8-bit mode running at the full speed of the display it's amazing just how fast some can update.· Which reminds me, many don't realize there is no set standard that is adhered to by all LCD manufacturers.· I have seen displays much slower than others and firmly believe the BUSY flag should be used if for nothing more than that reason alone.

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