How to MCLR by code for 16F877
Hi everybody,
I would like to learn how could I make MCLR reset by picbasic code. I mean, during MCLR reset some processes occur like PC turns back to start address and some others, what are the process occured during MCLR reset exactly, and could I realize all these processes by code? That is because the device is away from me and it requires MCLR reset sometimes, so I thought that I could do it by code periodically, once in a specified period.
Thanks for all,
Firat
Re: How to MCLR by code for 16F877
Quote:
Originally Posted by
Dave
Firat, Yes it is possible to effect an MCLR function from within your code. Paste these lines into your code where you want to effect the reset function. I use this code on an 16F876 and it works great. I use it after waking from sleep mode.
Asm
bcf PCLATH, 3
bcf PCLATH, 4
goto 0
EndAsm
Try it and let me know....
Dave Purola,
N8NTA
Thank you for sharing . Your post did help me. Thanks
Re: How to MCLR by code for 16F877
This thread predates my membership here by a year or two, and I had never seen it. Thanks Dave for this delicious tidbit and thanks to Vett58 for resurfacing it. BTW, it works a treat!
Re: How to MCLR by code for 16F877
Quote:
Originally Posted by
Archangel
This thread predates my membership here by a year or two, and I had never seen it. Thanks Dave for this delicious tidbit and thanks to Vett58 for resurfacing it. BTW, it works a treat!
I am grateful to you and all moderators and members to have shared the vast knowledge by this remarkably useful and accurate forum. Thanks for all you do.
Re: How to MCLR by code for 16F877
The software reset is not a complete hardware reset. Keep that in mind, since some registers are not really reset as in a power cycle.
Ioannis
Re: How to MCLR by code for 16F877
also can use an output driving a Mosfet ( w/ a little cap between gate and ground ) that clamps the reset pin to gnd ...
not very smart, but damn efficient !
Alain
Re: How to MCLR by code for 16F877
I'd do like Alain. Simple, few extra parts and reliable.
Robert