Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Erratic working of PIC16F676.

Status
Not open for further replies.

swapan

Member
Friends,

I have assembled a code for experiment purpose which works fine. During testing the project a peculiar behaviour of the microcontroller was noticed. While powering up the circuit from battery, there was interruption of power supply due to poor connectivity causing some small spark between the battery terminal and the connecting wire to the circuit. After connecting the power properly/tightly, it is seen that the working of the MCU is erratic. I thought, that was due to fault in my code. I disconnected the supply and re-connected carefully such that no interruption/spark takes place. Now the MCU works fine. Again I, intentionally, made some interruption/spark in supply wire and saw the erratic operation of the MCU. Is it natural for MCU to work wrong if there is any interruption/spark in powering it up? Incidentally, please note that using a capacitor (470uF/ 16V) across the supply rails the problem was overcome.

Regards

swapan
 
Hi, Swapan

the problem is known : the brownout reset function has been implemented to try to avoid this kind of behaviour.

personnally, I always use a MC 33064P5 ( or TC 54VNxx from µChip ) to drive the Reset pin.

No more problems, then ...

Alain
 
I more prefer external MCLR rather than internal MCLR.In theory those two likes same but it has a effect when powering up.

Also enabling brown out will notify you the minimum voltage requirements.

Thank you, Mr. Soyza. In my program, the MCLR is disabled and used the pin as digital I/O. BODEN disabled. However, PWRTE is enabled. Your comment on preference of external MCLR to internal MCLR may kindly be explained some more detail.

swapan
 
Hi, Swapan

the problem is known : the brownout reset function has been implemented to try to avoid this kind of behaviour.

personnally, I always use a MC 33064P5 ( or TC 54VNxx from µChip ) to drive the Reset pin.

No more problems, then ...

Alain

Thanks Acetronics for your post. Would you kindly elaborate to some extent how to implement brownout reset function to avoid such problem?

regards.

swapan
 
Hi, Swapan

For MC33064P5 ...

Just download the Freescale Datasheet ...

Everything ( and more ) clearly explained.


For Pic internal Brownout function ...

just open your Pic Datasheet on $ 9.1 and have a look to the BODEN bit of the CONFIG register ...

Everything also explained ...

Alain
 
Last edited:
Hi Acetronics,

Many thanks for your cooperation. Implementing BODEN bit, I noticed the performance of my code. Now it is OK. No problem at all. Again thanks.

regards.

swapan
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top