ORG 0000h
MOV TMOD,#01h
//Timer0 16-bit Mode
loop:
MOV TH0,#0x00
MOV TL0,#0x00
//For generating 0.05 Sec delay
CLR p0.0
//Turn ON LED
SETB TR0
// Start Timer 0
JNB TF0,$
// Wait till Timer 0 overflows
CLR TF0//Timer0 has overflowed clear the Flag
CLR TR0
//Stop Timer0
SETB p0.0
//Turn OFF LED
MOV TH0,#0x00
MOV TL0,#0x00
//Reload Timer0 For generating 0.05 Sec delay
SETB TR0
// Start Timer 0
JNB TF0,$
// Wait till Timer 0 overflows
CLR TF0
//Timer0 has overflowed clear the Flag
CLR TR0
//Stop Timer0
ajmp loop