maybe if youAren't ports automatically set to required state by apropriate statement, when needed?
high cs or low cs
but
cs=0 or c=1
I don't think so
maybe if youAren't ports automatically set to required state by apropriate statement, when needed?
high cs or low cs
but
cs=0 or c=1
I don't think so
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 21:07.
Steve Earl www.datageo.co.uk
Bookmarks