Automatically switch

Discussion in 'Embedded Systems and Microcontrollers' started by found_day, Mar 21, 2009.

  1. found_day

    Thread Starter New Member

    Mar 21, 2009
    I have AT89S51 microcontroller n I want to build an automatic switch to control outdoor lamp by time. The lamp should be turn on at night and turn off automatically when the sun is rising up (06:00 PM). The question is how to write the code in BASCOM, because I am begginer. I try to learn by doing. I have understand about electronic part like relays, capasitor, resistor etc n how to connect it. I just don't know about microcontrol programing.
    Thank u for your attention.