![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Apr 2006
Posts: 2
Rep Power: 0
![]() |
pyparallel
I am trying to program an lcd through the parallel port. I am using the pyparallel module and tryin to work off of the "example" code provided (lcd.py). I am using two 2x20 hd44780 character based lcds. I believe my pin setup is fine, since I can write to one line on each display. I cannot however initialize the display to have both lines writable. I have tried to send the instruction 0x38 when initializing the display, but then none of the lines work. Does anyone have experience working with this module and an lcd? I can provide my init sequence if needed.
Thanks |
|
|
|
|
|
#2 |
|
Newbie
Join Date: Apr 2006
Posts: 2
Rep Power: 0
![]() |
This is what I have in my init function, the commented is what I tried to get 2 lines but didnt work...
def __init__(self): self.data = 0 self.setRS(0) self.out(0) #reset pins time.sleep(0.050) #wait more than 30ms #send the reset sequece (3 times the same pattern) self.out(LCD8BITS) #set 8 bit interface #self.out(0x38) #set 8 bit and 2 lines self.toggleE() #toggle LCD_E, the enable pin time.sleep(0.005) #wait a bit self.toggleE() #toggle LCD_E, the enable pin time.sleep(0.005) #wait a bit self.toggleE() #toggle LCD_E, the enable pin time.sleep(0.005) #wait a bit self.instr(LCDCURSOROFF) #hide cursor self.instr(LCDCLEAR) #clear display self.toggleE() time.sleep(0.005) |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|