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 support@ccsinfo.com

12f1840 and MCLR pin as input

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
joseph



Joined: 14 Jun 2010
Posts: 16

View user's profile Send private message

12f1840 and MCLR pin as input
PostPosted: Wed Apr 17, 2013 3:22 am     Reply with quote

Hi,

i'm trying to use the pin a3 (MCLR) as a input on my pic 12f1840. In spite of NOMCLR fuse, the level applied on the pin control the reset.....
If anyone have an idea !
thanks in advance

CCS version :4.130

Code:

#include <12f1840.h>

#fuses INTRC_IO,NOWDT,NOMCLR,PUT,LVP
#use delay(internal=8000000)
temtronic



Joined: 01 Jul 2010
Posts: 9205
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Apr 17, 2013 5:09 am     Reply with quote

That pin(RA3) is used for 3 other internal peripherals.
Odds are real good, you'll have to disable those uses of the pin as well.
Just checked your 'code'...and
Also unless you really, really have a Low Voltage programmer use the NOLVP fuse! Otherwise you'll have a problem.

hth
jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19454

View user's profile Send private message

PostPosted: Wed Apr 17, 2013 6:17 am     Reply with quote

Quote from the data sheet:

"If low-voltage programming is enabled (LVP = 1), the
MCLR Reset function is automatically enabled and
cannot be disabled. See Section 7.4 “MCLR” for more
information."

You have LVP selected, so MCLR cannot be turned off.
Are you sure you want LVP?. It is a rarely used option.

Best Wishes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
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