Control Byte must be 8 bits... not 9...and you don't have to modify it. I2CREAD/I2CWRITE will handle it for you.
One other thing, not sure of me for that one, I don't know if...
I2CREAD plahplahplah...[MyVar]
wich MyVar is pre-define as a word sized variable is a valide statement. BUT
I2CREAD plahplahplah...[MyVar.LowByte,MyVar.HighByte]
Is a valid statement.
NOW...

Originally Posted by
YourCode
DEFINE I2C_SLOW 1 'Use for >8MHz OSC with standard speed devices
DEFINE I2C_SDA PORTB,1 'Data pin for I2C (12-bit core only)
DEFINE I2C_SCL PORTB,4 'Clock pin for I2C (12-bit core only)
SSPSTAT.7=0
SSPSTAT.6=0
SSPCON.5=1
SSPCON.4=1
SSPCON.3=1
SSPCON.2=0
SSPCON.1=1
SSPCON.0=1
Duh???
Last edited by mister_e; - 16th March 2006 at 03:32.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks