We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
In one of my projects where I use 89v51rd2 microcontroller, I connect one O/P pin to Electric AC bell through relay. My problem is when reset during switch ON, my O/P pin goes high and come down thus generating a pulse which the bell rings unwantedly. I want to avoid this unwanted ringing till my program gets control. Can anyone please suggest a solution?
Rule #1 when designing hw around a microcontroller: Remember the reset state of all GPIO pins and design the external hardware based on this.
If you drive the relays so it is drawn then the processor pin is low, your problem goes away.
Another solution is to delay power to the relay, so the external electronics will not care about the GPIO pin state for the first 50-100ms after reset. But this is a solution that may get you into trouble in case this delay logic doesn't get properly reset when the processor gets reset - remember that the processor may get reset without loss of VCC...
i did not understand your first solution. can you please explain me again if possible.
Add an extra transistor to invert the logic for driving the relay. Then the relay will be released when the processor is reset, and only drawn when you hold the processor pin low.
That makes sure that the relay is only drawn when you are in control.
Thanks. You solved my problem.
This really has nothing to do with Keil software tools!
For many & detailed discussion on driving relays from 8051/8052/etc and derivative processors, go to http://8052.com and search for "Relay"...
www.google.com/search