 |
| Author |
Message |
|
|
Posted: Aug 29, 2011 - 07:21 PM |
|

Joined: Jul 04, 2011
Posts: 5
|
|
Hello everybody.
I want to read the conversion result from a MAX186 using SPI module in Xmega128.
I follow the instructions in datasheet and the communication is perfect, I get the two conversion bytes RB2 and RB3.
In the data sheet says :"Bytes RB2
and RB3 will contain the result of the conversion
padded with one leading zero and three trailing zeros."
and the problem is that these bytes don't have this form. I mean, RB2 not always has zero on the MSB and RB3 never has 3 zeros on the LSB. So I don't know if I must move RB3 three positions to the right losing the three LSB and the RB2 one to the left losing the MSB and then work with both.
Or if they must be as in the data sheet says.
Thank for your help. |
|
|
| |
|
|
|
|
|
Posted: Sep 01, 2011 - 10:54 PM |
|

Joined: Apr 01, 2010
Posts: 68
Location: San Diego, CA
|
|
| How do you know the communication is perfect? It seems like it might not be in this case as the device is not quite SPI. Just because it's a serial interface that's not I2C or RS232 doesn't mean it will work out of the box with the SPI controller. Have you looked at the communication signals with an oscilloscope or logic analyzer? Perhaps posting the relevant portions of your code here would help a diagnosis of the issue. |
|
|
| |
|
|
|
|
|
|
|