Log in

View Full Version : Digital inputs



Christopher4187
- 25th May 2006, 03:28
Speaking specifically for a 16F870 but also for all PIC's, I need some info about the input threshold for a logic 1. Are all of the pins supposed to be the same? I thought if you configure a pin as a digial input, it should trigger at 1.2V; is this true? Can you adjust this?

Thanks,

Chris

Acetronics2
- 25th May 2006, 09:41
http://ww1.microchip.com/downloads/en/DeviceDoc/30569b.pdf

See $ 14.2 ...

Alain

Christopher4187
- 25th May 2006, 10:24
OK, I'm guilty! Thanks

Christopher4187
- 3rd June 2006, 23:18
Unless I don't understand the datasheet correctly, for a 16F876, if a pin is configured as an input it should trigger at either 2.0 for TTL and .8 for Schmitt. Am I reading this correctly? If so, some of my inputs don't trigger at 2.45 VDC.....what gives? I know if I increase the voltage to around 2.8, they all trigger. In the datasheet, it says something like TTL buffer is 2.0V. Then, right below that, it says .25 VDD for entire VDD range and right below that, it says .8 but nothing next to it. Does this mean you have to add it to the 2.0? Can someone clarify this for me?

Thanks,

Chris

Archilochus
- 4th June 2006, 00:59
The .25 Vdd and the +0.8 thing I read as...

"For the full operating voltage range (not just 4.5 to 5.5 volts), the Vin HIGH minimum spec is (Vin*0.25) + 0.8 volts"


The Schmitt trigger input specs are 0.8 Vdd, or Vdd * 0.8, not .8 volts - this value seems kind of high to me...

Note that those values are the minimums, not the typical (unspecified) or maximums.

Arch

Christopher4187
- 1st August 2007, 23:14
I need to revisit this question for a moment. Speaking specifically about the 16F688, I am using pin RC3 as an input and I have ansel=0. The code is really simple in that once the input goes to 1 (If sensor=1 then......), then it lights a light. Everything works fine but I wanted to get the threshold voltage a little lower. Right now, it triggers around 1.2VDC. I looked at the datasheet again and it is inconclusive to me if I am using the correct pin. I know it mentions voltages that are .8VDC and some that are 1.2VDC. I can use any pin on the 16F688 but can someone tell me which one, if any, will trigger at .8VDC. I probably overlooked something in the datasheet (I referred to section 14) which is why I am writing this question.

Thanks,

Chris