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.

Using the SUSCI in SPI mode to send just 9 bits

I need to communicate with a dual digital pot using an SPI protocol. The number of bits needed is 9 and if more are sent then the pot's internal register captures the wrong value.

I would like to use the SPI mode of the USCI in an MSP430F233-- or any other MSP430 --but I see no way to send just 9 bits.

I could just bit-bang the information to teh digital pot, but I would rather use the USCI peripheral.

Any suggestions on how to do this would be most appreciated.

Thanks,

José

  • Jose,

    The devices I have seen with strange shift register sizes allow you to send as many bits as you like as long the the ending bits are the ones that count.

    So to send 9 bits, first send 7 garbage bits then 9 real bits.  Will that work for your digital pot?  It's two 8-bit transfers for the USCI.

    Jeff

  • Jeff:

     

    The data sheet for the pot does not say what will happen, but it is worth a try. It should work  since the data is not captured until the CS line for the pot is broght low.

    Thanks for the tip.

    José

  • The USI module in soem of the 22x devices, including the LaunchPad G series, supports sending of any number of bits up to 16. It is, however, not as efficient as the USCI module and has no double-buffering for the inputs/outputs, so it does not reach a similar throughput.

**Attention** This is a public forum