Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 10th, 2006, 8:05 PM   #1
engineuity
Newbie
 
Join Date: Apr 2006
Posts: 2
Rep Power: 0 engineuity is on a distinguished road
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
engineuity is offline   Reply With Quote
Old Apr 10th, 2006, 9:51 PM   #2
engineuity
Newbie
 
Join Date: Apr 2006
Posts: 2
Rep Power: 0 engineuity is on a distinguished road
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)
engineuity is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:17 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC