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.
Doesn't the Datasheet tell you this? Is there nothing (Application Notes, etc) available on the manufacturer's website?
I was able to get the code for that. But datasheet doesnt tells about the sign bit. If anybody worked on this microcontroller, please tell me how to get the sign bit.?
"doesnt tells about the sign bit" So what's this, then: "When in Differential Mode, conversion codes are represented as 10-bit signed 2's complement numbers ... Example codes are shown below..." That's from the datasheet. What more do you want?
Dear Andy, I think there is some confusion. The C8051F060 has 16 bit ADC. I really dont know which controller you are talking about. Please clear my doubt or tell me the link to the data sheet you are referring. Thank You in advance.
If you look at the 'reference' for the 16 bit A/D you will see: (DC, -0.2 to 0.6 V). This indicates that, as opposed to thq 10 bit A/D the 16 bit is NOT differential. thus Andys post refer to the 10 bit A/D also in the f060 which IS differential Erik
Yes, I also think Andy referring to another ADC. But I am talking about 16 bit ADC in differential mode. I am unable to get a solution what will be the output if the differential voltage is negative, since in my application both positive and negative voltage may come in the input.
there is NO differential mode for the 16 bit ADC (see previous post) Erik
Hi Eric, We can tieup both ADC's together and make them work in differential mode. But we cant use them independantly in differential mode. I went through the manual, it says in the differential mode it will work as 15 bit ADC. So I think the 16th bit will be used as the sign bit. But I am not sure. Still going through the manual. If you got an idea please inform me. I am using C8051F060 microcontroller. Thanx in advance.
the 'header' say so, but I can find nodocumentation in the datasheet proper. try posting here: http://www.cygnal.org/scripts/Ultimate.cgi?action=intro Erik
When talking about chips with more than one ADC (or whatever) it would be sensible to state which one you're actually referring to... The Datasheet, Rev 1.2, is here: http://www.silabs.com/public/documents/tpub_doc/dsheet/Microcontrollers/Precision_Mixed-Signal/en/C8051F06x.pdf The table on p64 shows examples of the 16-bit ADC0 Data Word in differential mode; 3 positive examples, zero, and 3 negative examples are given. Doesn't that answer the question?
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