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

12F1840 NOMCLR?

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



Joined: 08 Jan 2018
Posts: 59
Location: Finland

View user's profile Send private message

12F1840 NOMCLR?
PostPosted: Tue Sep 28, 2021 3:42 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Sep 28, 2021 6:49 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Sep 28, 2021 11:07 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Sep 28, 2021 12:02 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Sep 28, 2021 12:39 pm     Reply with quote

Okay. I’ll try to put pull-up resistor to it.
Thank you very much for your help!
Ttelmah



Joined: 11 Mar 2010
Posts: 19504

View user's profile Send private message

PostPosted: Wed Sep 29, 2021 12:40 am     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Sep 29, 2021 3:35 am     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Sep 29, 2021 4:03 am     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Sep 29, 2021 4:18 am     Reply with quote

Uh.. Embarassed
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.
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