Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

SPI Perph useless for Word data ????

2005-01-16 by sig5534

I've been fighting trying to get this damn SPI module to work with 
some ADC's and DAC's.  These use 16, 24, and 32 bit word sizes.

As far as I can tell the SPI module only works with Byte data!  I was 
not able to make it work at all with these ADCs/DACs.  The SPIF flag 
pops up based on 8 bit data.  What good is any of this SPI register 
setup if the word size is not 8 bits?

Finally I shut the SPI module down and reprog the pins for GPIO.  I 
wrote my own manual SPI control routines.  My ADCs and DACs started 
working the first time!  Very easy, stupid simple.

I don't get it.  There are all these complex registers and flags 
trying to track errors and status in this SPI module, but it only 
supports 8 bit data!  Geez, they have plenty of extra bits around 
where they could have used a few to define a word size.

I just can't understand what the point is of having a 32bit MCU and 
crippling the legs of the SPI module to 8 bits.  Why????

Maybe I missed something, but I don't see anyway to use this SPI 
module unless all your data is 8 bits.  But the ADCs and DACs don't 
work that way.  They want all the bits shifted out contiguous: 16, 
24, 32, whatever.

Chris.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.