cancel
Showing results for 
Search instead for 
Did you mean: 

SPI as full/half duplex

elharrar
Associate II
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
3 REPLIES 3
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
Up vote any posts that you find helpful, it shows what's working..
emalund
Associate III
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
Associate II
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