??? 12/05/09 14:51 Read: times |
#171468 - giving up without proof that ... Responding to: ???'s previous message |
I was not successful in measuring frequency with the timer . So i used the timer 0 in 16 bit auto reload mode and the external interrupt 0.
giving up without proof that the original idea is wrong is just about the safest way to never getting any better at this. anyhow does your zero crossing detector fire once or twice per cycle? if once and 12MHz and plain vanilla '51 1MHz/100Hz = 10.000 not the 2400 you expect. if you get a lower reading you have noise, if you get a higher reading you have a faulty zero crossing detector (I hope you use a comparator with hysteresis) have you scoped on your zero detector output? is your interrupt set to edge? Erik |
Topic | Author | Date |
Using timer 2 for frequency measurement | 01/01/70 00:00 | |
Latencies | 01/01/70 00:00 | |
Big differences | 01/01/70 00:00 | |
I'm using a PLC and a Oscilloscope !! | 01/01/70 00:00 | |
2% jitter... | 01/01/70 00:00 | |
Try a free-running timer and average 10 periods | 01/01/70 00:00 | |
Dear Per | 01/01/70 00:00 | |
You may use timer2 if you want | 01/01/70 00:00 | |
Latency... | 01/01/70 00:00 | |
Frequency Measure | 01/01/70 00:00 | |
now using timer 0 and ext intr 0 | 01/01/70 00:00 | |
giving up without proof that ... | 01/01/70 00:00 | |
Your calculations are OK![]() | 01/01/70 00:00 |