Skip to main content
elharrar
Associate III
February 1, 2012
Question

SPI as full/half duplex

  • February 1, 2012
  • 3 replies
  • 765 views
Posted on February 01, 2012 at 15:17

Hi all ,

A simple question:

I have an external ADC, and to get the values, I need to generate cyles to obtain the values. My SPI is configured as master + fullduplex mode and to receive bytes I have to send a dummy byte for each received byte.

Now according to the datasheet I don't want send anything ( don't send this dummy byte) , I want only play with the clock and receive the values because my MOSI line should stay at ''0''.

What do I have to do ?

What do you think if after the init of my external adc I reconfigure my SPI as half duplex ( Master + receiver ) ? It should help me ? If yes , which API I have to use ?

#spi-full/half-duplex
This topic has been closed for replies.

3 replies

Tesla DeLorean
Guru
February 1, 2012
Posted on February 01, 2012 at 15:48

So why wouldn't sending a zero byte achieve exactly what you want?

Half-duplex means the input/output are connected together.

Sending ''nothing'' is a bit vague, people here would look at the datasheet if they could guess what part you're talking about.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
emalund
Associate III
February 1, 2012
Posted on February 01, 2012 at 17:16

Now according to the datasheet I don't want send anything ( don't send this dummy byte) , I want only play with the clock and receive the values because my MOSI line should stay at ''0''.

 

What do I have to do ?

 

you have to read the SPI standard

Erik

elharrar
elharrarAuthor
Associate III
February 5, 2012
Posted on February 05, 2012 at 12:51

Sorry this post is idiot ...

I send ''0'' to play with the clock only and receive datas

Thanks