hi guys...i'm new to 8051....
and in the process of learning assembly language now
i wrote the below code ...a subroutine to cause the microcontroller delay for 1second...
and i tried to run it on the simulator...and found that the code keep looping on the instrution WAIT: JNB TF0,WAIT after MOV P1,#10001000B
it just wont continue to the next instructions...what's wrong with the code?
by the way...i'm working on ATMEL 89c51 with 12Mhz crystal
any 1 can help me out?...
Its been a while since I looked at 8051 assembly but if the instruction is "jump if not bit" that means that TF0 is never set to 1. My guess is that the timer isn't set up correctly. Take a look at your timer initialization code.