the lowest possible hpwm frequency is 245 hz (for a 4mhz quartz) and 1221hz for a 20mhz quartz, now i have to calculate the frequency of 400 pulses.....
the lowest possible hpwm frequency is 245 hz (for a 4mhz quartz) and 1221hz for a 20mhz quartz, now i have to calculate the frequency of 400 pulses.....
400*300+300=240.000 us
1.000.000 us /240.000 us =4,1666666667
4,1666666667*400 pulses =1.666,66666668 hz for one second if the quartz is precise.......
the pwm work good and the frequency counter confirm the exact frequency and its possible to stop it at a fixed point, now i need a second timer to count the y pulses other than 400) with a same time of x. The x train with 400 pulses do the work in: 400*300+300=240.000us. I need the same time for y, with pulses other than 400....
what's the lowest possible increment in uS units of the two other timers with 20mhz quartz?
i think thats the wrong questionwhat's the lowest possible increment in uS units of the two other timers with 20mhz quartz?
1. first thing is what time intervals are required to toggle the output at to achieve for the given number of pulses in the time frame
2. are they all possible within the available timer resolution ? how many pulses do you really need ? steps of 5 10, 50 ,1 ,2 ?
3. what method will be fast enough to toggle the output and count the pulses too .ie an isr or a fast loop to monitor timer overflows
PULSES TOGGLES PERIOD uS
100 199 1204.52
101 201 1192.54
150 299 801.67
200 399 600.75
250 499 480.36
300 599 400.17
350 699 342.92
400 799 300.00
450 899 266.63
500 999 239.94
550 1099 218.11
599 1197 200.25
600 1199 199.92
hi richard, to match the x pulses (1666hz) for the y pulses i need to set a range from 500us (250high+250low) to 7500us (3750high+3750low) the increment can be 50us. For your 3rd question i need your help....
Bookmarks