If you don’t know the internal registers dedicated for timer’s you will be unable to understand the tutorial and code below. Generating delays of specific time is not easy using internal timers of 8051 microcontrollers. It requires an extensive knowledge to properly generate delays.
The Project/tutorial is simple just blinking an led after every 1 minute. I calculated the delay for 2 ms and loaded the Calculated values in TH and TL register. To calculate the values go through the tutorial link given above. Now if i run 2 ms delay for 500 times it will generate 1-Second Delay. Running this 1-Second Delay for 60 Times gives me 1-Minute Delay.
8051 microcontroller 1 second delay circuit diagram
The above tutorial is very important to understand the delay function. I calculated values of TH and TL register for 2ms delay and run them for 1ms(500 Times). The code is generating exactly 1ms delay.
Port-1 Pn#0 is connected with led -(Negative) leg. Apply 5 volts to +(Positive) leg of led. Connect Oscillator(11.0592MHz) with PIN# 18 & 19 (XTAL0, XTAL1) of 89c51 Microcontroller. Apply 5 volts to Pin#40 & 31 of 8051(89c51).Ground Pin# 20.