View previous topic :: View next topic |
Author |
Message |
-Terppa-
Joined: 08 Jan 2018 Posts: 59 Location: Finland
|
12F1840 NOMCLR? |
Posted: Tue Sep 28, 2021 3:42 am |
|
|
Hello PIC programmers!
I have little problem. I have selected fuses:
#fuses INTRC_IO,PUT,BROWNOUT,NOPROTECT,NOLVP,NOWDT,NOMCLR
but i still need a pull-up resistor in MCLR- pin. Is there no NOMCLR- function at all?
This is real hardware no simulator
CCSC PCWHD 5.092 + CCSCplugin + MPLAB IDE 8.92
Thank you for your help! |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19513
|
|
Posted: Tue Sep 28, 2021 6:49 am |
|
|
A couple of separate things.
If you are using the MPLAB IDE, and the chip gets programmed for 'debug',
then a pull up is necessary on this pin. The MCLR pin is used by the debugger.
Then, though 'NOMCLR' means the pin can be used as an input, you have
to add your own circuitry to ensure it cannot go above the supply rail.
Though the 'MCLR' function is turned off, the programming functions remain.
There is an internal weak pullup that can be enabled in software on the pin.
Commonly if the pin is allowed to go even fractionally above the supply,
it will reset the chip, even when NOMCLR is selected. |
|
|
-Terppa-
Joined: 08 Jan 2018 Posts: 59 Location: Finland
|
|
Posted: Tue Sep 28, 2021 11:07 am |
|
|
Thank you for your answer!
In MPLAB ide i have select ”release” every time. Never use ”debug” mode when i compiling code.
Hmm.. What if i select that NOMCLR and set MCLR pin to low?
I’m use Pickit 3 programmer. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19513
|
|
Posted: Tue Sep 28, 2021 12:02 pm |
|
|
You can't 'set it' to anything. It is an _input_ only.
It is not an I/O pin, just an input pin. |
|
|
-Terppa-
Joined: 08 Jan 2018 Posts: 59 Location: Finland
|
|
Posted: Tue Sep 28, 2021 12:39 pm |
|
|
Okay. I’ll try to put pull-up resistor to it.
Thank you very much for your help! |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19513
|
|
Posted: Wed Sep 29, 2021 12:40 am |
|
|
You can just enable the internal pull up. It is automatically enabled
when it is MCLR, but has to be software enabled when the pin is an input. |
|
|
-Terppa-
Joined: 08 Jan 2018 Posts: 59 Location: Finland
|
|
Posted: Wed Sep 29, 2021 3:35 am |
|
|
Actually i tested it on that way (enabling NOMCLR) but problem is it is very weak if compared example 18- series controllers. If i only touch MCLR- pin CPU will reset itself. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19513
|
|
Posted: Wed Sep 29, 2021 4:03 am |
|
|
Yes. The problem there is that touching the pin injects AC. This will take
it above the supply rail, and if if goes above the supply, this will cause a
reset. There is no built in 'input protection' on this pin, so nothing to
stop it going above the supply.... |
|
|
-Terppa-
Joined: 08 Jan 2018 Posts: 59 Location: Finland
|
|
Posted: Wed Sep 29, 2021 4:18 am |
|
|
Uh..
I'll try again and noticed my power switch make glicth every time when i touching PCB and it little bit moves.
Now it looks like working well when i replace power unit. |
|
|
|