LK162-12
Posted: Tue Oct 26, 2004 2:15 pm
HI,
I'm using a PIC16F877A to communicate with my LCD. I can send text to the LCD, however, when I try sending commands (e.g. clear display) nothing happens. Here is what i have for writing to the display:
movlw 0x50 ;LK162-12 address (write)
banksel SSPBUF
movwf SSPBUF
movlw 0xFE ;FE=command prefix, 0x58 (clear display)
banksel SSPBUF
movwf SSPBUF
movlw b'01011000'
banksel SSPBUF
movwf SSPBUF
I have ommitted the I2C initialization code. Can anyone tell me if there is something wrong with the way I'm sending the command.
Thanks,
Mark
I'm using a PIC16F877A to communicate with my LCD. I can send text to the LCD, however, when I try sending commands (e.g. clear display) nothing happens. Here is what i have for writing to the display:
movlw 0x50 ;LK162-12 address (write)
banksel SSPBUF
movwf SSPBUF
movlw 0xFE ;FE=command prefix, 0x58 (clear display)
banksel SSPBUF
movwf SSPBUF
movlw b'01011000'
banksel SSPBUF
movwf SSPBUF
I have ommitted the I2C initialization code. Can anyone tell me if there is something wrong with the way I'm sending the command.
Thanks,
Mark