I am using CC1110 development kit. I have connected the ADXL345 to the CC1110 kit for 4 wire SPI mode. Do anyone have an example program for the same? Or atleast the spi initializing routine for the CC1110 ?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I am using CC1110 development kit. I have connected the ADXL345 to the CC1110 kit for 4 wire SPI mode. Do anyone have an example program for the same? Or atleast the spi initializing routine for the CC1110 ?
Hi Prakash,
the CC1110 is based on a 8051 CPU; you can find some example code on the product page (scroll down) here http://focus.ti.com/docs/prod/folders/print/cc1110f32.html
Some ADXL345 code example were available on Sparfuns website: http://www.sparkfun.com/tutorials/240
Kind regards
aBUGSworstnightmare
When using the code, don't confuse the x-wire modes. MSP wir emode naming does not include the CS line to each slave. So teh MSP 3 wire mode is actually 3+n wire mode. 4 wire mode, however, refers to a mode where there is an additonal control input to the MSP which turns the MSP SPI on and off in slave or multi-master mode.
When the MSP is the only master, then use the MSPs 3 wire modes, even if the slave device documentation talks about 4 wire mode.
What is called 3-wire mode on some slaves is rather a weird variation of the SPI where the transfer is half-duplex, using the same wire for both transfer directions. This is not supported by the MSP hardware without heavy software support.
Jens-Michael Gross said:What is called 3-wire mode on some slaves is rather a weird variation of the SPI where the transfer is half-duplex, using the same wire for both transfer directions. This is not supported by the MSP hardware without heavy software support.
Hi JMG,
Hey the "new" port-mapping controller has made supporting this kind of slave a snap. The pin just maps back and forth between MISO and MOSI. I use this approach on a '5529 application, and it's really slick.
Jeff
On devices without port mapping, you can jsut tie SOMI and MISO together and switch them form I/O (inoput) to module usage, which is probably even faster. However, you need to do this where you shouldn't. Things got worse when you have a slave that sometimes turns into a master to address another device through the same bus. And no proper handshaking. A logistic nightmare.Jeff Tenney said:Hey the "new" port-mapping controller has made supporting this kind of slave a snap. The pin just maps back and forth between MISO and MOSI. I use this approach on a '5529 application, and it's really slick.
**Attention** This is a public forum