8051 micro to control a relay
**I moved this from general hardware as I believe it belongs here**
Hi Smart People :)
I am finally working on my project that entails the use of an 8051 micro. I have the program all written for it and the simulation is working great. I now need to hook it up to a real life circuit.
Issue: I have a motor driver controlled by the micro. When I start my vehicle I will obviously have power going to my micro and the motor driver chip but I need it to stay on when I turn off the ignition and then kill the power once the micro program terminates.
Back ground is I have an automatic screen that will open when I turn on the ignition and it will close when I turn off the ignition. The kicker is when I turn off the ignition I can't lose power to the controller and motor until the screen closes. I would like for the micro to send a signal to a relay to kill the power once it senses that the screen has closed.
How could I drive a signal to the relay as the digital output of the micro is not enough to drive the coil of a relay.
Any ideas or thoughts.