The difference is that SI and SO pins are tied together in 2nd code, via 1k resistor.
The difference is that SI and SO pins are tied together in 2nd code, via 1k resistor.
From the first code
' Subroutine to write data at addr in serial EEPROM
eewrite:
CS = 0 ' Enable serial EEPROM
Shiftout SI, SCK, MSBFIRST, [$06] ' Send write enable command
CS = 1 ' Disable to execute command
CS = 0 ' Enable
Shiftout SI, SCK, MSBFIRST, [$02, addr.byte1, addr.byte0, B0] ' Send address and data
CS = 1 ' Disable
Return
You are shifting out on the data in pin? Which is the same in the original SPIX.htm so I guess I am confused.
Last edited by EarlyBird2; - 22nd July 2014 at 22:07.
Steve Earl www.datageo.co.uk
Bookmarks