ts-7000
[Top] [All Lists]

[ts-7000] Re: SPI Continuous Transmission

To:
Subject: [ts-7000] Re: SPI Continuous Transmission
From: "seabirds111" <>
Date: Sun, 07 Feb 2010 03:38:09 -0000
Seabirds > blackbox.

--- In  "cheezy072000" <> wrote:
>
> I am currently using the TS7200 with an SPI peripheral (ADXL345 
> accelerometer) and am having huge problems reading multiple bytes of data on 
> a single transmission.
> 
> My accelerometer has the capabilities of performing multiple byte reads while 
> only asserting the chip select once, rather than reading one register on the 
> accelerometer at a time.  
> 
> The procedure I use for single byte read is the following:
> 
>     assert Chip Select
>     send Read register command   //POKE8 -write register address of     /     
>                           //ADXL345 to SSP Data Register
>     send 8 bits of data          //clocks 8 bits of data into SSPDR
>     deassert Chip select
>     read SSP data register       //PEEK8 -read SSPDR
>     print to terminal
> 
> For multi-byte transmissions I follow the same procedure except before 
> deasserting the Chip Select, I continue to send 8 bits of data, for each 
> register on the ADXL345 I would like to read from (in my case 6 registers, 3 
> axis and 2 for each axis).
> 
> The problem I am having is I am not sure that I am reading the SSP data 
> register at the correct time or if I am even reading the SSP data register at 
> all. I see the correct data on the oscilloscope, so I know that I am 
> communicating with the ADXL345 properly and that it is functioning properly.  
> However, when I read the SSP data register after each time I send the 8 dummy 
> bits meaning new data has shifted into the RX FIFO, I don't read what I see 
> on the scope.
> 
> I am using some of the source code provided by TS in the FTP repository 
> called tempsensor.c and use the POKEXX and PEEKXX functions to write and read 
> to/from the SSP data register.  Because I have to open /dev/mem to perform 
> those POKE and PEEk functions I think something isn't working properly with 
> the way I am reading the SSP data register.
> 
> How do I know when the end of transmission has occurred?  How do I know that 
> after I have sent out the 8 dummy bits to shift in new data that the data is 
> actually in the SSP register and is ready to be read?
> 
> Can anyone please help me???????? I am working on a school project and have 
> very limited time to get this done. Anything would help, thank you in 
> advance!!
>




------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU