I have tried to change it, but did not waste more time on it. I have written A program to read the temperature from 5 1621 Dallas I2C temp. Sensors. If you need a part of it let me know -----Original Message----- From: Walter Crauwels [SMTP:ON4BCB@MAIL.DMA.BE] Sent: Saturday, December 13, 1997 6:22 PM To: PICLIST@MITVMA.MIT.EDU Subject: help with I2C and Picbasic << File: ATT00001.htm >> 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