janosandi
Full Member level 4
Hello Guys
i've connected an potentiometer to AN0 of PIC16F877 & read the results on 8 LEDS connected to portD & its ok
but i need to display the exact value of ADC on 2 7segment displays for Calculating Values for a Thermistor
was thinking how to get (for example) "15" on 7seg
i can send 1 to tens in my 7seg display Routine & 5 to units
But when i get 0F as value from ADC how to Seperate it to use 1 for tens & 5 for units?
i need this to make a table for a Thermistor reading
This is the routine im using to display Values on 7 segments
i've connected an potentiometer to AN0 of PIC16F877 & read the results on 8 LEDS connected to portD & its ok
but i need to display the exact value of ADC on 2 7segment displays for Calculating Values for a Thermistor
was thinking how to get (for example) "15" on 7seg
i can send 1 to tens in my 7seg display Routine & 5 to units
But when i get 0F as value from ADC how to Seperate it to use 1 for tens & 5 for units?
i need this to make a table for a Thermistor reading
This is the routine im using to display Values on 7 segments
Code:
DispRoutine
movlw b'00000001' ;Activate Units Display
movwf portE
movf units,0
call table
movwf portB
call D_10mS
clrf portB
movlw b'00000010' ;Activate Tens Display
movwf portE
movf tens,0
call table
movwf portB
call D_10mS
retlw 0x00