POT and RCTIME instructions
Hi all,
i've been studying the PBP manual and decided to test the POT and RCTIME instructions.
The idea is to use a temperature variable resistor and check it's readings with a lcd.
The code to read and display it should be simple and i'm guessing it's something like this :
using pot instruction
.
.
.
read1:
pause 500
pot porta.1,255,r1
lcdout $fe,1,r1
pause 1000
.
.
.
and using RCTIME
.
.
.
read2:
high porta.1
pause 500
low porta.1
pause 10
RCTIME porta.1,0,r1
lcdout $fe,1,r1
pause 1000
.
.
.
Since i'm working with a 16F84 pic i do not have any analog input like other pics.
My question:
Will any of these 2 methods work to read temperature ? Or is it better to change pics and get one with analog input ?
Thanks
.
LM335 (good low-cost temp sensor)
I don't think you could use rctime or pot to accurately measure temperature. You'll find that, in order to get some decent resolution; i.e. 0.5° steps - you'll need an ADC with 10 bit capability. Many senors, LM335 for example, induce 10mV changes p/ degree. So, if we have a 10 bit ADC we can detect changes as low as 5mV. (5 /1024) = 4.88mV actually.