Re: AT91SAM7S64 SPI question
- From: "MK" <nospam@xxxxxxxxxx>
- Date: Sat, 20 Jan 2007 08:43:00 -0000
<to.vic.man@xxxxxxxxx> wrote in message
news:1169273151.608235.293050@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
I'm trying to read data from a Maxim MAX1231 ADC (slave) with the
AT91SAM7S64 (master).
Problem:
The Maxim chip buffers the data from it's acquisition in a FIFO. It
sends the data out Dout (MISO) a byte at a time triggered on (I
believe) the chip selects (NPS0 is the particular SPI chip select I'm
using).
I don't know how to do this since the AT91SAM7S64 SPI expects to
receive data in on MISO during it's transmission on MOSI. I'm using
the conversion command to trigger the acquistion on the ADC, i.e.
"clock mode 10".
So, I need to use PDC right? That is, AT91F_SPI_ReceiveFrame()? Can
AT91F_SPI_ReceiveFrame() be used without using AT91F_SPI_SendFrame()?
I would think so. Does the PDC process use the configured chip select
to receive data (AT91SAM7S64 SPI is configured for 8-bits packets) on
MISO?
Thanks for any help, I'm a newbie feeling like I'm in over my head.
Next I've got to tackle USB to offload the data from my board (CDC
class mode to a Linux board).
Regards,
Victor
Hello Victor,
Read that Maxim data *** carefully, then read it again.
The SPI master will provide the SCK, even if the MAX1231 is using internal
ADC timing.
The master will clock out data on MOSI as it clocks it in on MISO.
The MAX 1231 command is word won't do anyhting if its all zeros (data ***
pages 13 and 14).
So if you set your data out to all zeros when you just want to read the
MAX1231 set up won't change.
(I've never used this chip so take care - maybe read that data *** again.)
Good luck - but don't ask me about the USB :-)
Michael Kellett
www.mkesc.co.uk
.
- Follow-Ups:
- Re: AT91SAM7S64 SPI question
- From: to . vic . man
- Re: AT91SAM7S64 SPI question
- References:
- AT91SAM7S64 SPI question
- From: to . vic . man
- AT91SAM7S64 SPI question
- Prev by Date: microcontroller related
- Next by Date: Details on compiler behaviour for 8051 bit manipulation
- Previous by thread: AT91SAM7S64 SPI question
- Next by thread: Re: AT91SAM7S64 SPI question
- Index(es):