View previous topic :: View next topic |
Author |
Message |
joseph
Joined: 14 Jun 2010 Posts: 16
|
12f1840 and MCLR pin as input |
Posted: Wed Apr 17, 2013 3:22 am |
|
|
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: 9243 Location: Greensville,Ontario
|
|
Posted: Wed Apr 17, 2013 5:09 am |
|
|
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: 19539
|
|
Posted: Wed Apr 17, 2013 6:17 am |
|
|
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 |
|
|
|