I have a problem with I2CWRITE command.
I am using LAB X1 with 16F877 and with PicBasicPro v.2.6.
To pins C3,C4 is connected a LCD display having I2C interface BV4512 from ByVac.
Here is my test program:
SCL VAR PORTC.3 ' Clock pin
SDA VAR PORTC.4 ' Data pin
adr_bv VAR WORD ' address for I2C LCD
cmd_bv VAR BYTE ' command to I2C LCD
data_1 VAR BYTE ' Data 1
data_2 VAR Byte ' Data 2
adr_bv = $42 ' I2C address
cont CON %10100000 ' control
cmd_bv = $05
I2CWrite SDA,SCL,cont,adr_bv, [cmd_bv] ' Reset I2C LCD display
Pause 100
cmd_bv = $03
I2CWrite SDA,SCL,cont,adr_bv,[cmd_bv,$9A] ' write character $9A on position 0,0
PAUSE 500
cmd_bv = $20
I2CWrite SDA,SCL,cont,adr_bv,[cmd_bv,$41] ' write character A on position 0,0
Pause 1000
End
The commands $05 and $03 are working (control is not important), the command $20 and all other commands defined by ByVac don't work.
My first question is, what purpose has "control" in the I2CWRITE command. In the online manual is nothing about that.
Second, does somebody has an experience with ByVac I2C interface? Any suggestion is welcomed.
Bookmarks