Electro Tech,
I'm using a TMP36 device and a 16F88 to read the temperature.
I have one program that uses RB7 as an a_to_d and converts the
temperature to F. Then it uses the uart to send the results
to my laptop. Works great.
In this program portB is configured as:
TRISB = %11010001 'set portb 0,4,6,7 pins as input
PORTB = %00000000 'all portb outputs pins low
RCSTA = %10000000 'configures RB2 and RB5 as serial port pins
ANSEL = %01000000 'configure RB7 as analog input
In a very similar program portB is configured as:
TRISB = %11110001 'set portb 0, 4, 5, 6 & 7 as input
PORTB = %00000000 'all portb output pins low
INTCON = %10011000 'enable external interrupts INTF & RBIF
OPTION_REG = %00000000 'pull-up resistors on, falling edge on RB0
ANSEL = %01000000 'configure RB7 as analog input
Using the second program I can see the correct voltage level
at RB7 but the a_to_d reading is off by about 100mv.
The only read difference is the second program uses external
interrupts. Is there some kind of conflict?
jerryd
I'm using a TMP36 device and a 16F88 to read the temperature.
I have one program that uses RB7 as an a_to_d and converts the
temperature to F. Then it uses the uart to send the results
to my laptop. Works great.
In this program portB is configured as:
TRISB = %11010001 'set portb 0,4,6,7 pins as input
PORTB = %00000000 'all portb outputs pins low
RCSTA = %10000000 'configures RB2 and RB5 as serial port pins
ANSEL = %01000000 'configure RB7 as analog input
In a very similar program portB is configured as:
TRISB = %11110001 'set portb 0, 4, 5, 6 & 7 as input
PORTB = %00000000 'all portb output pins low
INTCON = %10011000 'enable external interrupts INTF & RBIF
OPTION_REG = %00000000 'pull-up resistors on, falling edge on RB0
ANSEL = %01000000 'configure RB7 as analog input
Using the second program I can see the correct voltage level
at RB7 but the a_to_d reading is off by about 100mv.
The only read difference is the second program uses external
interrupts. Is there some kind of conflict?
jerryd