LK162-12

LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT Series

Moderators: Henry, Mods

Post Reply
3space
LCD?
Posts: 1
Joined: Tue Oct 26, 2004 2:03 pm

LK162-12

Post by 3space »

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
Tom
Matrix Orbital
Matrix Orbital
Posts: 1030
Joined: Mon Jul 19, 2004 4:43 pm
Location: Calgary
Contact:

Post by Tom »

Hi,

If you email me at support@matrixorbital.com, I will send you a sample I2C C code you can use. There is also a guide for developing or using I2C with our displays at http://www.lcdforums.com/forums/viewtopic.php?t=910.

Best Regards, :D
Post Reply