----- Original Message ----- From: "Phil Cross" To: Sent: Friday, September 15, 2006 5:40 PM Subject: [PIC] - LCD module interface power-up initialization. > There is lots of stuff on this topic, and I have looked at lots, but I > find > it bewilderingly inconsistent. Finally, I decided to use Microchip AN587 > as > my guide. > > I have assembler programmed an 18F452 to initialize a Powertip PC1602F > 16X2 > display, which I believe to be compatible with the HD44780. I use the > 4-bit > interface. I have tested it by running power-up initialization, and then > sending a 'T'. However, it doesn't work, and I am really at a loss to know > what is wrong. .. Hello Phil & PIC.ers, I've been using the self-same Powertip 1602 lcd for a number of years. No problems, here is the intialisation segment:- INIT_LCD ;initialise lcd, execute once only @ pup call DELAY_100ms movlw 0x03 movwf scratch1 ;use reg as scratch iter init_lcd1 movlw 0x03 ;this looping per Hitachi specs to initialise call lcdwrite1 ;blast out a nibble from w contents call DELAY_5ms decfsz scratch1,same bra init_lcd1 movlw 0x02 call lcdwrite1 call DELAY_200us bcf lcd_next_rs_flag ;take rs LO for cmd function set movlw b'00101100' ;function set. 2lines:5x10pixel:4bit tx call lcdwrite2 ;blast out full byte to 8574 ->powertip movlw b'00001000' call lcdwrite2 ;cmd. display off movlw b'00001100' call lcdwrite2 ;cmd. display on:cursor off:blink off movlw b'00000110' call lcdwrite2 ;cmd. increment cursor:no shifting movlw b'00000001' call lcdwrite2 ;cmd. cls:reset cursor to 00 call DELAY_5ms return Most of this should be self-explanatory. Routine lcdwrite1 sends a nibble to the 44780, as in: lcdwrite1 ;send single nibble out to 8574->powertip. enter routine with w ;loaded x rs rw en n n n n ;rs+nibble preset .. .. return lcdwrite2 sends two nibbles. I'd give you those routines but at the risk of just adding confusion, they are written in my apps. for transmitting data over an i2c bus to the 44780. Hope this helps. best regards, John email from the desk of John Sanderson. JS Controls, Manufacturer & Purveyor of laboratory force testing apparatus. PO Box 1887, Boksburg 1460, Rep. of S. Africa Tel / Fax: +27 11 893 4154 Cell: 082 741 6275 Web: www.jscontrols.co.za -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist