Driving a relay with a CPU

For view click Driving a relay with a CPU schematic diagram