Shop OBEX P1 Docs P2 Docs Learn Events
Parallel LCD — Parallax Forums

Parallel LCD

SawmillerSawmiller Posts: 276
edited 2006-08-09 04:31 in Propeller 1
heres a object i made this morning for a generic 4 x 20 PARALLEL LCD
using 4 bit mode ( that was hard ) hope i didnt kludge it too bad
oh, and it is one of the older models, runs line1, line 3 , line 2 , line 4.... so i had to do some work there
but hey, for $6 (shipping inc) what can ya expect ....
dan

Comments

  • HarleyHarley Posts: 997
    edited 2006-07-24 20:39
    Sawmiller said...
    heres a object i made this morning for a generic 4 x 20 PARALLEL LCD

    using 4 bit mode ( that was hard ) hope i didnt kludge it too bad
    oh, and it is one of the older models, runs line1, line 3 , line 2 , line 4.... so i had to do some work there
    but hey, for $6 (shipping inc) what can ya expect ....
    dan

    I was watching to see if anyone would get to LCD i/f'ing before I could. I've downloaded your code to study it. Thanks Dan.

    Yes, I think most of the 4xN LCDs have screwy addresing. I ran into that fact years ago when getting into PICs. And the 4-bit mode saves valuable 4 I/Os at a wee bit of extra time to complete filling of a screen. I just got a 4 x 40 LCD I plan to i/f to PropSTICK. (You got a real good price on yours)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Harley Shanko
    h.a.s. designn
  • SawmillerSawmiller Posts: 276
    edited 2006-07-24 22:02
    this is the way i got nibbles out of bytes....

    is there a easier way ?

    pri Send_Inst | temp1··········· ' can we use byte move, then shift· 4 times ?

    ··· temp1 := Inst
    ··· temp1 := temp1>>4
    ···
    · outa[noparse][[/noparse]RS] := 0······························· ' Set Instruction Mode


    · outa[noparse][[/noparse]15..12] := temp1······················ ' Send High Nibble
    · bs2.PULSOUT(E,3)
    · Wait_Busy
    · outa[noparse][[/noparse]15..12] := Inst······················· ' Send Low Nibble
    · bs2.PULSOUT(E,3)
    · Wait_Busy
    · outa[noparse][[/noparse]RS] := 1······························ ' Set LCD Back To Text Mode
  • SSteveSSteve Posts: 808
    edited 2006-07-25 02:39
    You could eliminate temp1 and change the "Send High Nibble" command to
    outa[noparse][[/noparse]15..12] := Inst >> 4
    


    Also, "outa[noparse][[/noparse]RS] := 0" can be changed to "outa[noparse][[/noparse]RS]~" and "outa[noparse][[/noparse]RS] := 1" to "outa[noparse][[/noparse]RS]~~". Probably not a significant saving of clock cycles, but it seems to be more in keeping with Spin style.

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

    links:
    My band's website
    Our album on the iTunes Music Store
  • Drew_EhrlichDrew_Ehrlich Posts: 1
    edited 2006-08-09 04:31
    I am not a fan of hijacking threads but I'm trying to learn more on this subject. To be brief I wan to run a full color CSTN or other LCD. I gather that I need a Propellor chip, the object for the Hitatchi controller/driver, and the monitor. Is that essentially correct?
Sign In or Register to comment.