the code you gave me works with just a minor tweak. i had to make the eeproms address (addr) increment by 2. so i used addr= 0, addr=2, addr=4,...etc..
heres the working code. refer to my 1st post for the port settings,variables, n stuff.
eeread:
for addr = 0 to 5 step 2 'eeprom address 0
'read from eeprom
CS = 1
Shiftout SI, SCK, MSBFIRST, [%110\3, addr\6]
Shiftin SO, SCK, MSBPOST, [B0]
cs=0 ' Disable
if addr = 0 then
d = B0
endif
if addr = 2 then
t = B0
endif
if addr = 4 then
ED = B0
endif
pause 10
next addr
return
eewrite:
for addr = 0 to 5 step 2
if addr = 0 then
B0 = D
endif
if addr = 2 then
B0 = T
endif
if addr = 4 then
B0 = ED
endif
CS = 1 ' Enable serial EEPROM
Shiftout SI, SCK, MSBFIRST, [%10011, 0\4] ' Send write enable command
CS = 0
pause 10
CS = 1 ' Enable
Shiftout SI, SCK, MSBFIRST, [%101\3, addr\6, B0] ' Send address and data
CS = 0
pause 10
next addr
Return
end
thank you SO much!!!
Bookmarks