|
|
View previous topic :: View next topic |
Author |
Message |
jaikumar
Joined: 15 Dec 2006 Posts: 109
|
Regarding i/o port question |
Posted: Fri Mar 10, 2017 4:06 am |
|
|
Hi all,
I would like to know if whether i can feed 5V in i/o pin configured as a input without a resistor in between.
Thanks and Regards,
Jai. |
|
|
RF_Developer
Joined: 07 Feb 2011 Posts: 839
|
|
Posted: Fri Mar 10, 2017 5:26 am |
|
|
Simple answer: Yes, generally.
Longer answer: on 5V PICs powered from 5V, which is most of the time on 10, 12, 16 and 18 series PICs, yes, no problem. On PICs powered from lower voltages, e.g. 3.3V, then maybe yes, often no. This depends on whether the input is 5V tolerant, as is the case on many IO pins on many 24s (possibly dspics and 33s but I have no practical experience of those). Not all 24 series IO pins are 5V tolerant!
So, in a 5V application, yes, you can wire IO pins directly to the supply. You can even drive them a little (no more than 0.2-0.3V generally) above the supply rail - read the datasheet carefully - but this is NOT advised. This can happen when an analogue source, operating off higher voltage than the PIC, is used to drive an IO pin. Excess current in this mode can cause unexpected, incorrect operation, such as incorrect ADC readings, restarts, lock-ups and in some cases damage to the PIC.
What's the reason for this? A common mistake is to try and drive a 3.3V peripheral with a 5V PIC, but that's the other way round to this. It is sometimes possible (I'm doing it) to drive a 5V peripheral with a 3.3V PIC, provided the input lines are 5V tolerant and the Voh/Vih and Vol/Vil specs are compatible. |
|
|
jaikumar
Joined: 15 Dec 2006 Posts: 109
|
|
Posted: Fri Mar 10, 2017 5:43 am |
|
|
Thank you. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19513
|
|
Posted: Fri Mar 10, 2017 6:22 am |
|
|
and also there is the issue that if you direct connect to another 5v source, and then the PIC power goes 'off', your circuit can end up powering itself off this signal.... |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|