Hi to everybody,
I have climbed on on the breadbord the circuit brought in the manual of the picbasic advantage related to the writing of an external eeprom.
The brought code doesn't work. Why?
thanks
chip_select
----------------------------------------------------------------------------
'PIC 16F84A & 24LC02B
'LCD DEVANTECH 16 X 4 SERIAL
include "modedefs.bas"
define osc 4
addr var byte
dati var byte
RD var byte
dpin var porta.0
dclk var porta.1
for addr = 0 to 10
dati = ADDR * 16
i2cwrite dpin,dclk,%10100000,addr,[dati]
pause 10
next addr
pause 1000
serout portb.0,2,[12,1]
PAUSE 400
for addr = 0 to 10
i2cread dpin,dclk,%10100000,addr,[RD]
pause 10
serout portb.0,2,["EEPROM CELL: "]
serout portb.0,2,[#RD]
PAUSE 40
serout portb.0,2,[12,1]
next addr
Bookmarks