Hello,
I set up a variable source of 0-25V and I intend to measure the tension and to show in one
display. I learned on the command " how much level " that is to measure of
0-5V (to See book " Experimenting with the PicBasic Pro Compiler " - Section
4-18). somebody already used that command, with the due adaptations,
to measure 0-25V? I already made 1023*/1250 to generate 5V approximately and
I multiplied for 5, to give the 25V. The results starting from the reading
of 6 or 7v they begin to present a mistake of volt hundredths that
increase with the increase of the tension of POWER. I using a PIC16F877A. Below it follows the part of the reading AD.
ADCIN PORTA.0, VALOR_AD0
AUX1 = VALOR_AD0 */ 1250
AUX2 = AUX1 * 5
TEN_VOLT = AUX2 / 10000
AUX3 = TEN_VOLT * 10000
AUX4 = AUX2 - AUX3 '
UNIT_VOLT = AUX4 / 1000
AUX5 = UNIDADE_VOLT * 1000
AUX6 = AUX4 - AUX5
DECIMAL_VOLT = AUX6 / 100
Bookmarks