PDA

View Full Version : adc help



mpardinho
- 24th October 2006, 20:52
in my circuit i have - 16f872

pin 1 = 0,5 to 4 v
pin 2 = 0,5 to 4 v
pin 3 = 0,5 to 4 v

pin 4 = 0,5 to 4 v
pin 5 = 0,5 to 4 v
pin 6 = 0,5 to 4 v
pin 7 = 0,5 to 4 v

then i press 1 and 4,
pin 1 = 0v
pin 4 = 0v

obs: 0,5 to 4 is variant not estable
0 v = estable


i use this circuit for read one keypad, but i can't
because 0,5 = 0 then keypress all time

can i help me?

BigWumpus
- 24th October 2006, 21:42
It is not possible to read this voltages by a digital input.
You have to use a lot of analog-inputs or design another keyboard !

mpardinho
- 24th October 2006, 21:58
i use 16f872 and adc input A0, ...
I use 4 pin for test 2 row and 2 col,
if i read with 4 pins....i'll be change the pic 16f877 or other 40píns

ErnieM
- 24th October 2006, 22:19
I'm not sure what your input is, are you saying with no key pressed you have between 0,5 and 4 volts, but with key pressed you get a solid 0V?

If so, then you need to use the analog to digital input feature. Unfortunately, the 16f872 only has 5 such inputs, and you need 7 inputs.