Hi
Take a look at the 3rd post for circuit diagram (without LM35 sensor)
take a look at 5th post for code, and 7th post for modification to code
also this line (27th) in the code:
ADCON1 = %10000101 'AN0 ANALOG I/P + right justify result
needs changing to:
ADCON1 = %10001110 'AN0 ANALOG I/P + right justify result
this will set AN0 only to analog and the rest of portA to digital, this where you connect a LM35 temperature sensor output.
I believe this code should work with a 16F877 aswel but not 100% sure
Bookmarks