Mark Scotford
- 20th December 2004, 00:08
Can somebody help me please with some sample code. I have not used I2C before and I need to store a variable (B28), with a value between 1-9999 in an external memory EEPROM device, 24A65. All of the device address pins are held down to ground. My code does not work, please can you help.
HOME1:
I2CREAD PORTB.4,PORTB.5,%10100000,#B28
B28 = B28 + 1
PAUSE 500
I2CWRITE PORTB.4,PORTB.5,%10100000,#B28
LCDOut $FE,1,#B28
PAUSE 500
GOTO HOME1
Thanking you in anticipation.
Mark in Spain
HOME1:
I2CREAD PORTB.4,PORTB.5,%10100000,#B28
B28 = B28 + 1
PAUSE 500
I2CWRITE PORTB.4,PORTB.5,%10100000,#B28
LCDOut $FE,1,#B28
PAUSE 500
GOTO HOME1
Thanking you in anticipation.
Mark in Spain