On 07/02/2012 02:25 PM, Tony Duell wrote:
at eight bits,
while SPI can transfer arbitrary word widths. (this is
handy for, say, ADCs and DACs).
Hmm.. I am not convinced.
You're not convinced that SPI supports multiple word widths?? I can
show you the datasheet of the microcontroller in my current design,
where it's configurable, if you like.
No, of course I am, convinced of that. I have read the data sheets for
SPI decvices. I am not convinced that having arbitrary word lengths
(which might not even be a multiple of 4 bits) is an advantage.
You're certainly entitled to not be convinced, but as I sit here this
evening writing a driver for an SPI-interfaced flash chip, literally in
the window next to this one, it's quite useful.
As a
digression, normally, assuming programming in C, you'd place a
"unsigned short" variable at the address of the SPI data register. (I'll
AFAIK sizeof(unsigned short) is not defined anywhere :-).
(looks around office, sees six different architectures where it's
sixteen bits)
Huh? It's pretty well-defined here.
-Dave
--
Dave McGuire, AK4HZ
New Kensington, PA