24-bit address, SPI EEPROM

edmunds

Senior Member
Dear all,

Some of the larger EEPROMs (like this, page 8) require 24-bit address to access a byte. How can this be done on picaxe? Word variable followed by byte variable?


Thank you for your time,

Edmunds
 

hippy

Technical Support
Staff member
SPI only handles 8-bit data so you would have to send any word variable as its constituent byte parts but otherwise yes, as described.

Untested but this should read a byte at location $123456 into b0 ...

b3 = $12 : b2 = $34 : b1 = $56
HSpiOut ( 3, b3, b2, b1 )
HSpiIn ( b0 )

w1 = $1234 : b1 = $56 would achieve the same.
 
Top