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.

PIC analog input protection

Status
Not open for further replies.

Peet19

Member
Hello!
Should the analog input of the PIC be protected with a resistor? In this case, does the current flow into the PIN?
I want to measure the voltage at the center terminal of a potentiometer.
Thanks in advance for your help!
 
I don't understand the graph on page 406.
If 25mA is the output current then 0.5V voltage drops?
That is, if the supply voltage is 3.3V, will it drop to 2.8V at 25mA?
 
Képernyőkép 2022-06-02 21-35-36.png

One more question.
Don't need a diode between MCLR contact and R1?
If I program the PIC within a circuit, the voltage will be higher than the 3.3 V displayed on the VDD branch. No?
 
View attachment 137331
One more question.
Don't need a diode between MCLR contact and R1?
If I program the PIC within a circuit, the voltage will be higher than the 3.3 V displayed on the VDD branch. No?
No, historically that was always done - but it was changed to just a 10K resistor a VERY long time ago. The 10K limits the current to low enough not to upset any voltage levels.
 
I think the supply voltage for this PIC is 3.3 V. I want to put a 130 ohm resistor on the digital outputs. That's good?
Maximum 25mA, if I count correctly.
25mA is the sink current - with a load connected between power and output.

Also note the maximum total current allowed for the device VDD and VSS pins; 350mA absolute maximum through VSS, and ideally no more than 120mA for long term reliability.

VDD pin absolute max and preferred max are 250mA & 85mA.

In other words you cannot use all pins at high currents without cooking the IC.

If 25mA is the output current then 0.5V voltage drops?
That is, if the supply voltage is 3.3V, will it drop to 2.8V at 25mA?

Yes. The internal MOSFETS that switch the output pins have "on" resistance, so there is a voltage drop across each FET dependant on the output pin load current.

With a 25mA load between an output and VDD, the FET will have about 0.5 - 0.6V across it.

If you put a load between an output and ground / VSS, the output voltage would be around 0.6V less than VDD at just 6mA, as the upper FETs are smaller and have higher on resistance.

On 3V supply, you could think of the FET that outputs high as having around 100 Ohms on resistance, and the output low one as 20 Ohms.

Ideally, use a separate buffer IC or external transistors to drive high current loads. That way any fault is separated from the PIC and has less chance of damaging it.

Darlington driver ICs are cheap and can run vastly higher load power than the PIC pins.
 
Thanks to everyone for their help. I understand things now. Sorry to answer so late, but unfortunately I work a lot. I want to make a development panel for myself that I can use to practice PIC programming. I'll put the wiring diagram tomorrow.
 
Thanks for the suggestion on CR2032. I try it for now, then edit it into a normal outlet.
My further question would be, can the PIC drive the LED display like this?
I don't understand how to rotate Q1.
I set up a beep to play certain frequencies on the output.
 
With that chip there is no real need for an external crystal as it has very useful internal oscillators that have several common frequencies up to16mhz.
 
With that chip there is no real need for an external crystal as it has very useful internal oscillators that have several common frequencies up to16mhz.
Notice that my board above doesn't include an external crystal, and my 'pic of choice' is the 18F27K42 which runs internally at 64MHz maximum, and has huge amounts of memory.

I would suggest that with any devices of this era, you use the MCC to setup the oscillator options :D
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top