Re: help setting up 16F886 for ADC
Also I'm confused about "
40 deg = 4500 mv would be a 921 count" , the maximum scale what I need is 1750 mV, 40 deg = 900mv ( 40 deg = 400mV + 500mV = 900mV)
I must have up past my bedtime , managed to multiply 40 * 10 mv and got 4000
(
Code:
mvolt = tc */ 1249 )
@5v vcc each adc count is 4.88 mV
4.88*256=1249
pbp divides/multiplies have internal 32 bit results there are various commands the allow convenient
access to this result in useful ways
@40 deg tc would be about 184 counts
so our calc is (184*4.88*256)/256
since pbp can't do real numbers
we do the 4.88*256 =1249
and 184*/1249 does the rest ie 184*1249/256
Warning I'm not a teacher
Bookmarks