Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

pic16f877 driver motor stepper

Status
Not open for further replies.

lats

Full Member level 4
Joined
Oct 27, 2005
Messages
216
Helped
13
Reputation
26
Reaction score
6
Trophy points
1,298
Activity points
2,945
reseting a pic

hello,
I'm designing a project wherein I'm counting some pulses from a proximity sensor. Whenever there is a power failure I have to store the last value in memory(eeprom). I'm bound to NOT to use any battery. So I'm using a bigger condensor in power failure so that it provides enough enegy & time to let me store the value. I have put approx. 11,000 uF. This is working fine. But when there is a power failure just for a fraction of time (let's say 1 second) & power resumes the controller hangs up. I tried putting a seprate 5 volt supply(without condensors) on MCLR circuit but the things became worst. I'm attaching the MCLR circuit. What can I do to make the things proper.I'm using PIC16F877A.

Thanks for giving me your precious time.
 

Re: Resetting a PIC

1. If you don't have very many proximity events, you could write every one of them to the EEPROM. Then you wouldn't need a big capacitor. Of course, the caveat is that the EEPROM has a limited number of write cycles.

2. Try attaching a reset supervisor chip, such as MAX809, MCP809 or MCP130.
 

Re: Resetting a PIC

Can you show us your full power-supply schematic?
 
  • Like
Reactions: hieu_dh

    lats

    Points: 2
    Helpful Answer Positive Rating

    hieu_dh

    Points: 2
    Helpful Answer Positive Rating
Re: Resetting a PIC

Thanks for replying.
Kender your solution is not possible cause the pulses are very fast.
secondly what are the benefits of using reset supervisor chips? I'm new to them.

CMOS thanks once again. I have attached the circuit diagram please have a look. I'm using BC548 transistor section on PIN 33 of controller to detect the power failure.
 

Re: Resetting a PIC

I would suggest you use two 1N5819 diodes as shown in attached schematic near 7805 to prevent 4700uF caps from discharging through it when power fails. Change bax capacitor to electrolytic 10uF.

And as Kender suggested, use Voltage supervisor for reset. Is brown-out detect enabled in PIC fuse settings?

Try to capture waveforms of 5V supply and power-supply failure detector output when there is short power failure.

Why don't you use switching regulator like LM2575/LM2576? That way you dont have to use 7812 at all.
 

    lats

    Points: 2
    Helpful Answer Positive Rating
Re: Resetting a PIC

The problem could be generated with LVP pin when LVP is enabled.
 

Re: Resetting a PIC

From my experience, doing the same thing, I can tell you not to use external RC reset circuit . Activate PWRT and BOR. Under BOR voltage controller will be held at reset state. BOR voltage is about 4V, so with this big capacity /11000uF/,I think you'll have enough time to write eeprom,until Vdd reaches 4V.
 

Re: Resetting a PIC

lats said:
But when there is a power failure just for a fraction of time (let's say 1 second) & power resumes the controller hangs up.

Could this be because the EEPROM write is still in progress?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top