??? 04/26/04 03:26 Read: times |
#69179 - RE: how can a slow pulse period be known? Responding to: ???'s previous message |
Hi Leonard,
Actually there is a way to do this. You use Timer0 as the primary counter, and configure timer1 to count overflow events from timer0. This effectively turns them into a 16-bit timer register. Instead of a period limit of something like 50 or 60 ms, you can measure a period up to something like 35 minutes (actual values depend on crystal frequency). Now if you use the builtin hardware interrupt to turn on timer0, it will stop counting as soon as the signal goes low. You will only measure the period of the high part of the pulse. You will then need to either use external circuitry to toggle the timer interrupt on the rising edges, or make sure you know the duty cycle of the pulse and calculate the total period. This is described in detail in the tutorial on this web site (menu bar over there <-- on the left), and is discussed in the FAQs (also over there <--). |
Topic | Author | Date |
how can a slow pulse period be known? | 01/01/70 00:00 | |
RE: how can a slow pulse period be known? | 01/01/70 00:00 | |
RE: how can a slow pulse period be known? | 01/01/70 00:00 | |
RE: how can a slow pulse period be known? | 01/01/70 00:00 | |
RE: how can a slow pulse period be known? | 01/01/70 00:00 | |
RE: how can a slow pulse period be known? | 01/01/70 00:00 | |
RE: how can a slow pulse period be known?![]() | 01/01/70 00:00 | |
RE: how can a slow pulse period be known? | 01/01/70 00:00 | |
RE: how can a slow pulse period be known? | 01/01/70 00:00 |