| ??? 02/17/03 02:04 Read: times |
#39196 - RE: only using timers for 1 second delay Responding to: ???'s previous message |
Is there any particular reason that you do not want to use interrupts? With interrupts the processor is free to continue with other tasks during that one second delay. What you are trying to do will tie up the processor servicing the delay routine.
Aside from some minor typographical errors the biggest problem is that the instruction JNB TF0,$ should be placed before the instruction immediately above it. As it stands I think the program will decrement R0 very quickly and once it reaches zero then you start looking at the timer overflow flag. The typos I found are Ro instead of R0. Line 5 ,01B instead of ,#01H. Line 4 ,#B0H instead of ,#0B0H. If this is a stand alone program, do not end it with RET, that will cause all kinds of stack problems. Better to end with a do-nothing loop such as SJMP $. Hal |
| Topic | Author | Date |
| only using timers for 1 second delay | 01/01/70 00:00 | |
| RE: only using timers for 1 second delay | 01/01/70 00:00 | |
| RE: only using timers for 1 second delay | 01/01/70 00:00 | |
| For Hal Albach | 01/01/70 00:00 | |
| RE: That's an ill concept: Waqar. | 01/01/70 00:00 | |
| It is all in the mind... | 01/01/70 00:00 | |
| RE: It is all in the mind... | 01/01/70 00:00 | |
| RE: It is all in the mind... | 01/01/70 00:00 | |
RE: It is all in the mind... | 01/01/70 00:00 |



