reset for internal MCLR
Moderator: Benj
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: reset for internal MCLR
Hi bilal,
I'm assume you would like to have a reset and program via ICSP?
Make sure you have external MCLR set to enable.
The circuitry I thought made sense is: I found it on this website
Martin
I'm assume you would like to have a reset and program via ICSP?
Make sure you have external MCLR set to enable.
The circuitry I thought made sense is: I found it on this website
Martin
Martin
Re: reset for internal MCLR
thanks
i don't need external MCLR.
I need internal MCLR. By entering a code , through flowcode program.
i don't need external MCLR.
I need internal MCLR. By entering a code , through flowcode program.
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: reset for internal MCLR
Oops sorry, I misread your post.bilal wrote:i don't need external MCLR.
Its the opposite.
Select Build, project options.
Then select Configure tab.
Make sure you have external MCLR set to disable (or internal depending target device).
Also make sure PLL(unless pll is required) , watchdog and Low voltage programming is also set to disabled (or internal depending on target device).
Then MCLR can be used as an input if target device allows.
Martin
Martin
Re: reset for internal MCLR
sorry
in external MCLR , if i press switch for reset he will reset.
in internal there is no switch for reset what i will do to make reset?? can you give me the code in flowcode it can make reset for internal MCLR.
thank you very match
in external MCLR , if i press switch for reset he will reset.
in internal there is no switch for reset what i will do to make reset?? can you give me the code in flowcode it can make reset for internal MCLR.
thank you very match
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: reset for internal MCLR
You can use a c code block:
So you could connect a switch and pull-up resistor to any i/p port including MCLR as an i/p
Then have a decision icon.
if i/p = 1 then C code block
Other wise as far as I'm aware, you can't use a switch to reset if MCLR is configured to internal
Code: Select all
reset();
Then have a decision icon.
if i/p = 1 then C code block
Code: Select all
reset();
Martin
Re: reset for internal MCLR
thanks very match.
can you give me a file in flowcode for example.
if i but "reset" only or like this "reset_MCLR;" .
can you give me a file in flowcode for example.
if i but "reset" only or like this "reset_MCLR;" .
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: reset for internal MCLR
Thinking about it, I'm a bit confused.
Why do you want an internal reset when you can just have the standard external reset?
If using an internal reset and activated by a switch, then unless using an internal weak pull-up, a resistor and a switch are required plus some code.
If using an external reset then only a switch and resistor are required and no additional coding.
If you really want an internal reset then if you post the flowchart I will modify it for you.
Martin
Why do you want an internal reset when you can just have the standard external reset?
If using an internal reset and activated by a switch, then unless using an internal weak pull-up, a resistor and a switch are required plus some code.
If using an external reset then only a switch and resistor are required and no additional coding.
If you really want an internal reset then if you post the flowchart I will modify it for you.
Martin
Martin
Re: reset for internal MCLR
okay i will give example file:
I want to use all pin in the IC pic16f676.
I want to use all pin in the IC pic16f676.
- Attachments
-
- internal reset.fcfx
- (5.92 KiB) Downloaded 315 times
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: reset for internal MCLR
thanks.
I did not understand the meaning of the i/p in post.
(if i/p = 1 then C code block)
did my example file is correct ?! CONFIGURE AND SWITCH AND LED AND C CODE..??
in pic16f676
switch = RA0
LED = RA3/MCLR/VPP
I did not understand the meaning of the i/p in post.
(if i/p = 1 then C code block)
did my example file is correct ?! CONFIGURE AND SWITCH AND LED AND C CODE..??
in pic16f676
switch = RA0
LED = RA3/MCLR/VPP
- Attachments
-
- internal reset.fcfx
- (5.92 KiB) Downloaded 265 times
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: reset for internal MCLR
This will not work, if you check the data sheet for the chip you will see:bilal wrote:LED = RA3/MCLR/VPP
So RA3 is input only and can not be used to output to a LED.RA3 TTL — Input port with interrupt-on-change.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: reset for internal MCLR
No I pointed to my post because you have a c code block withbilal wrote:did my example file is correct ?! CONFIGURE AND SWITCH AND LED AND C CODE..??
Code: Select all
reset;
Code: Select all
reset();
That just means read an input pin.bilal wrote:I did not understand the meaning of the i/p in post.
(if i/p = 1 then C code block)
Using a decision branch:
If true (=1) then
Code: Select all
reset();
Code: Select all
reset();
Martin
Re: reset for internal MCLR
thanks, I understood
This is a new problem emerged ...... why!!! Because of that in flowcode program in simulations accept output from RA3 AND LED IS WORK IN SIMULATION!!So RA3 is input only and can not be used to output to a LED.