As i remind some PM Darkman solved his problem and much more.
FIRTS of all add
before your main loop.
those are working. Just change your Shiftin/Shiftout statements
Code:
eeread:
CS = 1 ' Enable serial EEPROM
Shiftout DI, CLK, MSBFIRST, [%110\3, addr\6]
Shiftin DO, CLK, MSBPOST, [B0] ' Read data
CS = 0 ' Disable
' Subroutine to write data at addr in serial EEPROM
eewrite:
CS = 1 ' Enable serial EEPROM
Shiftout DI, CLK, MSBFIRST, [%10011, 0\4] ' Send write enable command and dummy clocks
pause 10
CS = 0 ' Disable
CS = 1 ' Enable serial EEPROM
Shiftout DI, CLK, MSBFIRST, [%101\3 ,addr\6,B0]
pause 10
CS = 0 ' Disable
You don't need any resistor
Bookmarks