We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Have anybody help me with the ADC interface code for C8051F060 ?. How to get the sign bit for the ADC output for the same. Thank You.
Hi Andy, You are correct. You showed me the correct page. We cant measure negative voltage in single ended mode. But we can in differential mode. The 16th bit will be used for the sign bit. Thanks once again Andy and Eric for spending your valuable time in helping me.
"The 16th bit will be used for the sign bit." Actually, isn't the entire 16-bit value in 2's Complement form...?
Yes, true. The data is in 2's complement. But the datasheet says that the output data is in 15bits for a differential mode. So the 16th bit will give idea about the sign of the bit. 16th bit is 1 for negative voltage and will be 0 for a positive voltage. I think I am correct. Please give suggestion if I am wrong.
why not fire the thingy up in the SILabs debugger and see? Erik
Do you understand the difference between having a sign bit plus 15 magnitude bits, and having a 16-bit 2's complement value? In both cases, a 1 in the "sign" bit indicates a negative number - but the way that works with the other 15 bits is different...
Yes Andy, I found out the difference and I am confident of extracting the value now. I will now try with what Eric says using the debugger.Once again thanking you all.