hi, I am trying to use TIMER0 for delay in 89C4051 and this delay is working on Keil at debug time. But when I am trying same code on hardware it is not working. plz suggest me. code is given below
void T0delay(unsigned char t) // if t=1 then delay=1 sec { for(i=0;i<t;i++) { for(j=0;j<20;j++) { TMOD=0X01; TL0=0XB0; TH0=0X3C; TR0=1; while(TF0==0); TR0=0; TF0=0; } } }
Thank You in advance.
right over the place you enter your post it says: NOTE: When posting messages, use the following HTML tags to make your message easier to read and understand. For more information, refer to Tips for Posting Messages. ¦Use )b> and )/b> for BOLD text. ¦Use )i> and )/i> for ITALICS text. ¦Place source code source code between
and
. ¦Your e-mail address is not published in the forum.
NOTE I changed the '<' to make the tags show
Erik
as it did not should you not have tried to figure out what was wrong?