electronicsman
Full Member level 5
I am referring to the microchip dspic33ep micro controller. I am trying to read the adc of the pot, the adc is initialized for signed fractional format and in the data sheet it is shown as
. The test point at POT reads 3.3V and when i debug the variable is 32736 which when converted into binary will be
My first doubt is the number of zeros are 5 but in the data sheet image is should be 6. Why is the difference?
Second doubt i want to get the original voltage at the ADC of X (32736) value, i will right shift X by 6 bits. 512 value corresponds to 3.3V then X >> 6 correponds to what voltage? (X >> 6) * 3.3/512? Am I correct and any other methods available? Please advise.
Code:
0111 1111 1110 0000
Second doubt i want to get the original voltage at the ADC of X (32736) value, i will right shift X by 6 bits. 512 value corresponds to 3.3V then X >> 6 correponds to what voltage? (X >> 6) * 3.3/512? Am I correct and any other methods available? Please advise.