Steve,
sorry for not having reply soon because of " family duty ".
I wrote this small program and I am able to control Backlight :
DEFINE OSC 40 ' 10 MHz XTAL AND X 4 INTERNAL PLL
DEFINE I2C_SLOW 1
C VAR portd.3 ' S_CLOCK
D VAR portd.2 ' S_DATA
ADDR VAR BYTE
ADDR = %01001110 ' dec 78 , hex 4E
CMD VAR BYTE
LCD_CMD VAR BYTE
E VAR LCD_CMD.BIT2
RS VAR LCD_CMD.BIT0
E=0:RS=0
LCD_CMD = 0
PAUSE 1000
MAIN:
I2CWRITE D, C, ADDR, [%00000000] ' bck_lt= off
PAUSE 200
I2CWRITE D, C, ADDR, [%00001000] ' bck_lt=on
PAUSE 200
GOTO MAIN
The I2C address is new.
Now, my LCD has 20 chrs X 4 lines.
The PCF controls the LCD using the upper four bits of its output port.
I have to initialize the LCD in four bit mode , four lines at the required PCF port pins.
How could I do that ?
Thanks
Ambrogio




Bookmarks