Yahoo Groups archive

Lpc2000

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

Message

Re: [lpc2000] SPI Perph useless for Word data ????

2005-01-16 by Robert Adsett

At 03:18 PM 1/16/05 +0000, you wrote:
>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?

So do most SPI peripherals.  Surely in this case you just read and write 
multiples of 8 bits.  The peripheral won't be able to distinguish between 
two writes of 8 bits and one write of 16 bits.  Even if there were a 
significant pause between them there shouldn't be an issue, that's what the 
clock is for.

Robert

>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.

I think you must be missing something, why can't you send them out in a 
contiguous fashion using the SPI?  If you were trying to send 13 bits I 
could understand the problem but I haven't seen an SPI peripheral in some 
time that didn't use a multiple of 8 bits (too many micros only use 8 bit 
shift registers for serial I/O).

Robert


" 'Freedom' has no meaning of itself.  There are always restrictions,
be they legal, genetic, or physical.  If you don't believe me, try to
chew a radio signal. "

                         Kelvin Throop, III

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.