Re: Compare value ...
not sure whats going on here
my LM35 has a 0.3 volt output @30c, adc value 61 [10mV/deg]
an adc read of 675 would need 329 deg
i think i see the problem, if louis is using a 16f690 then the adc settings used are totally inappropriate
adc control on a 16f690 is quite different to a 16f88
define osc 4 ;there is no define called osc
adcon1.7=1 ;bit 7 is unimplemented
ADCON1 = %10001110 ;fosc/2 adc clk bits 0:3 and 7 are unimplemented
should be
define OSC 4 ;OSC = 4
adcon0.7=1 ;right justify result
adcon1= %00110000 ; frc adc clk
Last edited by richard; - 10th April 2020 at 05:05.
Warning I'm not a teacher
Bookmarks