Hello all,
 
I'm using the picbasic compiler from MEL or dontronics.
It has the I2Cout and in command designed for EEprom's
Could any one help me to change the pbh.inc file so that it can work
with the pcf8574 i/o expander ???
 
This is the problem:
 

Looking at the example:

The syntax will be: I2Cout control,adres,data,data,......

I would like to use the pcf8574 which is an IO expander it's slave adress is: 0100A2A1A00 (last 0 for write)

If I understand well, to set all the outputs high the syntax will be:

I2Cout %01000000,%11111111

The compiler give an error: token expected

The problem is the Control and adress syntax of the i2cout command.

It should be changed in the pbh.inc file so that for example the syntax will be:

i2cout slave_adress,data,data,....

Any one who can help

this is the supplied syntax info

' I2CIN and I2COUT Commands

'

' Write address to the first 16 locations of an external serial EEPROM

' Read first 16 locations back and send to serial out repeatedly

 

6.05. I2CIN and I2COUT

I2CIN

I2CIN Control, Address, Var {, Var}

I2CIN sends Control and Address out the I2C clock and data lines and puts

the byte(s) received into Var.

Symbol con = %01010000

Symbol addr = B5

addr = 17 ' Set address to 17

I2Cin con,addr,B2 ' Read data at address 17 into B2

Looking fwd