HI2CSETUP

marky26uk

New Member
Hi all,
Can any of you guys help me with the hi2csetup commands.
My original code is :-
I2CSLAVE %11010000,I2CSLOW,I2CBYTE

How do i convert that to work with the new 28X1, i've read the manual which isn't helping at all, no code examples are on there.

Cheers,
Mark
 

marky26uk

New Member
Hi again, just an update on my progress :(
The example given in manual for the DS1307 clock is:-
hi2csetup i2cslave, %11010000, i2cslow, i2cbyte
The programmer doesn't except this it gives me syntax error.
WEIRD !!!!!

Thanks,
Mark
 

hippy

Ex-Staff (retired)
If that's the example on Page 48, Manual 2 then it looks like a conversion error while updating the manual to include the new commands.

From the description of HI2CSETUP there are three choices -

HI2CSETUP OFF
HI2CSETUP I2CSLAVE, <i>slaveaddress </i>
HI2CSETUP I2CMASTER, <i>slaveaddress </i> , <i>mode </i> , <i>addresslen </i>

As the PICAXE is a master device when talking to the DS1307 it should use I2CMASTER not I2CSLAVE in the HI2CSETUP command. The example on the next page of the manual shows it in that form.

Edited by - hippy on 05/05/2007 15:03:21
 
Top