??? 05/02/04 16:25 Read: times |
#69690 - RE: calculating time in 89C52 Responding to: ???'s previous message |
Hi Adnan,
I am unclear on what you are trying to do. Please let me explain. Are you trying to determine the length of a pulse, that is to say a pulse that you do not know the period of? Or do you know the period and duty cycle of a pulse and you just want to wait until it is past before executing the next step. If it is the first case, the timers built into your ยต-controller will do the trick nicely. You may need to use two of them together if the period is too long (how long that will be depends on your crystal frequency), but there are good tutorials right here on this site to explain how. Also, Michael Karas' tutorial that was referenced by Ijas is very good. But if you just want to wait until the pulse is past before proceeding, I would suggest using one of the interrupts. Let the pulse trigger an interrupt, and then inside the interrupt routine just test for the appropriate condition before executing a RETI. (Remember to use RETI, not RET. The tutorials will explain why.) |
Topic | Author | Date |
calculating time in 89C52 | 01/01/70 00:00 | |
RE: calculating time in 89C52 | 01/01/70 00:00 | |
RE: calculating time in 89C52 | 01/01/70 00:00 | |
RE: calculating time in 89C52 | 01/01/70 00:00 | |
Tutorials | 01/01/70 00:00 | |
RE: calculating time in 89C52 | 01/01/70 00:00 | |
calculating time in 89C52 (MrJoseph) | 01/01/70 00:00 | |
It's Waqar again! | 01/01/70 00:00 | |
RE: It's Waqar again! | 01/01/70 00:00 | |
Irrelevant Subject Line | 01/01/70 00:00 | |
RE: Irrelevant Subject Line | 01/01/70 00:00 | |
RE: Irrelevant Subject Line | 01/01/70 00:00 | |
is it <b>un</b>fortunate | 01/01/70 00:00 | |
RE: thank u Mr erik | 01/01/70 00:00 | |
RE: link required | 01/01/70 00:00 | |
RE: link required![]() | 01/01/70 00:00 |