CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Easy method of percentage calculation
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
darryl_co



Joined: 11 Nov 2015
Posts: 21
Location: India

View user's profile Send private message

PostPosted: Thu Dec 10, 2015 10:02 am     Reply with quote

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

View user's profile Send private message

MCLR pin
PostPosted: Sat Dec 12, 2015 11:52 pm     Reply with quote

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: 19552

View user's profile Send private message

PostPosted: Sun Dec 13, 2015 1:27 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Dec 13, 2015 2:36 am     Reply with quote

Thanks once again Ttelmah
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
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