RumpinRufus
New Member
I'm trying to use a potentiometer to input one of four values to a 16F84 PIC chip, but I'm having problems. The value seems to go up exponentially as I slide the potentiometer, which doesn't make sense to me. As I slide it constantly, it will read:
0.........................1............2.....3.4.6.16......................................
Smaller capacitors increase the size of the range that gives me 0, but decrease the range in which it goes from 1 to 16. I get that same effect when I change the scale value on the pot command.
Thanks for any help. If I posted in the wrong forum or somesuch, I apologize.
edit: I have a diagram of the circuit, in case it helps.
**broken link removed**
My program is:
0.........................1............2.....3.4.6.16......................................
Smaller capacitors increase the size of the range that gives me 0, but decrease the range in which it goes from 1 to 16. I get that same effect when I change the scale value on the pot command.
Thanks for any help. If I posted in the wrong forum or somesuch, I apologize.
edit: I have a diagram of the circuit, in case it helps.
**broken link removed**
My program is:
Code:
Symbol TrisB = 134
Symbol PORTB = 6
Poke TrisB, 1
Poke PORTB, 0
loop1: Pot 0, 255, B0
Poke PortB, B0
GoTo loop1