Yahoo Groups archive

Lpc2000

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

Message

Re: SPI questions/observations

2004-05-21 by Art Sobel

--- In lpc2000@yahoogroups.com, MaxStream - Ryan Bedwell <ryanb@m...>
wrote:
> Art Sobel wrote:
> 
> > In the process of attaching some SPI peripherals to the chip I ran
> > into some strange  behaviour.  There are 4 pins to use, SPICLK, MISO,
> > MOSI and SSCS, First the SSCS pin must be configured as an SPI PIN or
> > the other parts of the SPI don't work at all, Next the SSCS signal is
> > not generated, This means that I must use another GPIO as the CS
> > signal. So now it uses 5 pins - with one more GPIO pin for every SPI
> > peripheral. 
> > 
> > Using the fastest selection of clocks the output rate is about 12,500
> > D/A samples a second (each D/A sample requires 2 bytes of data
> > output). This just about scratches the idea that the chip could
> > produce medium quality sound output. One channel just barely then if
> > you want to have analog in on the SPI too then the throughput just
> > dives. How the heck did they ever think this chip could do modems?
> 
> A couple of thoughts:
> 
>   - If the 21XX is always only going to serve as SPI master
>     (i.e. it will never be selected as a SPI slave), then
>     it makes sense to use a pullup on SSCS.
>   - Not sure I follow your throughput math.  The max PCLK
>     rate is 60 MHz (divide by 1 with a 60 MHz CCLK).  The
>     max SPI clock is PCLK / 8, or 7.5 MHz.  At 7.5 MHz
>     2 bytes should take 2.13 usec (468,750 samples/sec), no?
> 
> Ryan

You'd think that but i did put an 8 into the counter and all I got was
12,000 samples a sec. I programmed the port as master but the SSCS is
never generated.

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.