Hi,
I'm stuck on a program. That I'm driving a 16X2 LCD from a PIC12F675 via a PCF8574 I2C module.
I'm confused on how to write the LCD Enable Line make transition from Low TO High state on each nibble in 4 bit mode?
I'm stuck on a program. That I'm driving a 16X2 LCD from a PIC12F675 via a PCF8574 I2C module.
I'm confused on how to write the LCD Enable Line make transition from Low TO High state on each nibble in 4 bit mode?
Rich (BB code):
LCD_Send_CMD movwf Temp
andlw b'11110000'
movwf Data_U
swapf Temp,W
andlw b'11110000'
movwf Data_L
;
call I2C_Start
;
movf Slave_Address,W
call I2C_Out
call I2C_NAK
; ;
movf Data_U,W
iorlw 0x0C ;enable=1 and rs =0
call I2C_Out
call I2C_NAK
;
movf Data_U,W
iorlw 0x08 ;enable=0 and rs =0
call I2C_Out
call I2C_NAK
;
movf Data_L,W
iorlw 0x0C ;enable=1 and rs =0
call I2C_Out
call I2C_NAK
;
movf Data_L,W
iorlw 0x08 ;enable=0 and rs =0
call I2C_Out
call I2C_NAK
;
call I2C_Stop
return