Too many errors to be good
Why testing TF1 in your ISR? If the ISR is trigged TF1 will be high so no need of testing. So at 01Bh you should only have
with no reti command.
Why clearing TF1 in your "Reach" routine? TF1 is set by hardware on Timer/Counter overflow and cleared by hardware when processor vectors to ISR. So no need to clear in software!
What's the point of setting P0.1 when you never reset it?
You wrote
Code:
MOV P3,0FFH ;INPUT
MOV P1,#0ffH; input
Do you know the meaning of "#" ??
You need to be accurate with µC's. They do what you tell them to do even if it's meaningless... ...
So what will it be, with or without the "#" ??
Please don't mov 8 bits into IE. Use the predifined symbols ET0, EX1, EA and so on, that will be much easier to read. Thanks for that.
Why loading TL
0 and TH
0 when using Timer/Counter
1 ISR and control bits??
Why changing IP when you have only 1 interrupt??
What's the point of setting P0.5 when you never reset it?
What is it exactly what you want to do?
When we know that we can help you further...