Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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:
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
 
eblc1388 said:
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.

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.

Latest threads

New Articles From Microcontroller Tips

Back
Top