Need help about PIC Input

Status
Not open for further replies.
Voltage divider.

Also, I'm not sure if a resistor & zener diode will work well for this purpose.
 
Last edited:
Thuria said:
I want to use 24 volts signal to input signal of PIC 16F84A. How can I convert?

Try Connecting an optocoupler in series with a resistor......
make the optocoupler input closer to 5v..calculate the resistor value for 19v ......
 
Last edited:
Let's say we limit the input current to 1mA which is quite reasonable when the datasheet says input max clamp current is +/-20mA.

With 10 inputs at 24 volt, the current through the input protection diodes is sufficient to power my PIC as it takes only a few mA normally.

The 5V regulator shuts down, Vdd shoots up, PIC killed. You come back to this forum asking why?

Use at least a voltage divider or a very large value resistor.
 
You obviously have to consider the current through the resistors (and make sure you choose inputs with protection diodes!), but it's a perfectly valid method, and is approved by MicroChip (to the extent it features in many of their applications notes).
 
Thanks to all, but I'm a beginner to PIC and electronic. Please explain in detail. I want to know detail circuit diagrams.

Thanks
 

Surely, an LED to indicate power on will be sufficient to absorb the 10mA that will be supplied via the input diodes. If you don't have an LED then the max voltage of 7.5V on Vdd (=8.2 on each pin) would raise the current consumption to at least 10mA. That is assuming no output pin has any load on it.

Mike.
 
You may consider a saturated bjt or a mosfet. The transistor is switched on/off by the signal and the input of the uC is protected.
 
The problem comes into play if you try to make an efficient circuit with no power LED and especially if you try to use SLEEP mode which will lower the PIC current to near 0.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…