hello people I'm in big trouble i2c, I'm using a pic 16F628A a 24c32a and eeprom proteus simulator
I am using this code
PORTB DEFINE LCD_DREG
DEFINE LCD_DBIT 4
PORTB DEFINE LCD_RSREG
DEFINE LCD_RSBIT 1
PORTB DEFINE LCD_EREG
DEFINE LCD_EBIT 2
SCL var PORTA.0 'Clock pin
SDA var PORTA.1 'Data pin
E0 var byte 'Address <<<< I changed this to "WORD"
B1 var byte 'Data 1
B2 var byte 'Data 2
B3 var byte 'Data 3
ADCON1 = 7 'Set PORTA and PORTE to digital
Lcdout $ fe, 1, "1 EEPROM"
pause 1000
Lcdout $ fe, 1, "writing"
pause 100
Lcdout $ FE, 1
PAUSE 100
Pause 100 'Wait for LCD to start up
b1 = e0 + $ 80 'B1 is the EEPROM data
b2 = e0 + $ B0
pause 100
I2CWRITE SDA, SCL, $ A0, E0, [B1, "pic basic pro"] 'WRITTEN
pause 100
the phrase "pic basic pro" is a stored eeprom, which do happen to read this sentence and appears on lcd
you guys could help me with this
thank you
fernandocsouza
I am using this code
PORTB DEFINE LCD_DREG
DEFINE LCD_DBIT 4
PORTB DEFINE LCD_RSREG
DEFINE LCD_RSBIT 1
PORTB DEFINE LCD_EREG
DEFINE LCD_EBIT 2
SCL var PORTA.0 'Clock pin
SDA var PORTA.1 'Data pin
E0 var byte 'Address <<<< I changed this to "WORD"
B1 var byte 'Data 1
B2 var byte 'Data 2
B3 var byte 'Data 3
ADCON1 = 7 'Set PORTA and PORTE to digital
Lcdout $ fe, 1, "1 EEPROM"
pause 1000
Lcdout $ fe, 1, "writing"
pause 100
Lcdout $ FE, 1
PAUSE 100
Pause 100 'Wait for LCD to start up
b1 = e0 + $ 80 'B1 is the EEPROM data
b2 = e0 + $ B0
pause 100
I2CWRITE SDA, SCL, $ A0, E0, [B1, "pic basic pro"] 'WRITTEN
pause 100
the phrase "pic basic pro" is a stored eeprom, which do happen to read this sentence and appears on lcd
you guys could help me with this
thank you
fernandocsouza