Matthew Mucker wrote: > All, > > I've been debugging this problem for weeks and haven't found where my error > is, so I'm turning to the list for help. I'm trying to drive a Hitachi 44780 > LCD module in 4-bit mode from a PIC chip. > Are you sure you have a "real" 44780 ? Anyway after using a lot of displays without any problems, I got a VARITRONIX type which gave a lots of trouble. An extra delay solved the problem, see code below. success, Stef Mientki |-- I have my PIC 16F628 connected to the LCD module as follows: > > RB4 --> LCD_E > RB3 --> LCD_RS > RA0 --> LCD_D4 > RA1 --> LCD_D5 > RA2 --> LCD_D6 > RA3 --> LCD_D7 > > I have tested each of these outputs and verified that I can write a logic > '1' or '0' and get the expected voltage. > > I've used Myke Predko's page (www.myke.com/lcd.htm) as my main reference. > > According to MPLAB SIM, my code is writing the following when the LCD_E line > is blipped: > > LCD > DATA LCD > TIME 7654 RS notes > > 0 0011 0 send 0x03, wait 5msec > 5.1964 0011 0 send 0x03, wait 160 usec > 5.5218 0011 0 send 0x03 a third time, wait 160 usec > 5.8472 0010 0 Enable 4-bit mode (following commands are > two nybbles) > 6.0126 0010 0 > 6.1766 1000 0 00101000: 4-bit mode, 2 line display, 5x7 > font > 6.3248 0000 0 > 6.5068 1000 0 00001000: disp. Off, cursor off, blink off > 6.6730 0000 0 > 6.8370 0001 0 00000001: clear display, wait > 12.0356 0000 0 > 12.1996 0110 0 00000110: increment cursor/no shift > 12.3658 0000 0 > 12.5298 1100 0 00001100: display on, cursor off, blink off > 12.6968 0000 0 > 12.8608 0010 0 00000010: home cursor > 18.0618 0101 1 > 18.2258 0111 1 Letter 'W', first character to be displayed > > The LCD doesn't seem to initialize and for sure my characters aren't being > displayed. I'm getting quite frustrated with this project. I'm hoping > someone out there can spot the error of my ways for me and help me get back > on the straight and narrow. > > Thanks, > > -Matt > > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist