|
|
View previous topic :: View next topic |
Author |
Message |
darryl_co
Joined: 11 Nov 2015 Posts: 21 Location: India
|
|
Posted: Thu Dec 10, 2015 10:02 am |
|
|
I will surely consider the 12f1840 as soon as I complete my first project. As per your description I feel I should have started on this chip. Meanwhile just looking out for some sample C code for 12f1840. |
|
|
darryl_co
Joined: 11 Nov 2015 Posts: 21 Location: India
|
MCLR pin |
Posted: Sat Dec 12, 2015 11:52 pm |
|
|
hi,
If I do not use the MCLR pin and set the fuse to NOMCLR, do I still have to tie the pin to plus line via a resistor?
Can I leave the pin open?
or I have to tie it to ground via a resistor. Does declaration of NOMCLR make the pin available as a normal input pin or it can be used only as a master reset pin? |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19549
|
|
Posted: Sun Dec 13, 2015 1:27 am |
|
|
This is a 'beware' one.
If NOMCLR is selected, the pin can be used as a normal input pin (not output). However 'beware'. The pin has no input protection.
Now a normal input, that is allowed to float, is a 'bad' thing, potentially increasing power consumption, and noise inside the chip. However the MCLR pin if allowed to float is very dangerous indeed. It can in high RF environments still result in the chip resetting (the reset circuit is still there, just disconnected by a FET), and even worse, it can result in some cases in spurious erasure of some cells of the chip!... Basically on all but the oldest PIC's the current needed on the Vpp supply to trigger programming is tiny, and the diode structures inside the chip can result in a 'charge pump' effect, resulting in the chip actually going into 'program' mode.....
Generally, all unused pins should be set as 'output', or if this cannot be done (as with this pin), you should have as the minimum a resistor to provide a lower impedance path to one of the supply rails (doesn't matter which - historically on some logic families one way gave lower consumption than the other - on the PIC it doesn't matter). Other thing you can do is tie it to another pin, which is set as an output. |
|
|
darryl_co
Joined: 11 Nov 2015 Posts: 21 Location: India
|
|
Posted: Sun Dec 13, 2015 2:36 am |
|
|
Thanks once again Ttelmah |
|
|
|
|
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
|