Parallel LCD
Sawmiller
Posts: 276
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
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
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
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
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