Hey guys, I have always wondered this and after reading the wiki and doing some research myself I don't know if I'm right on this or how to exactly do it. I can right now make the PIT run every 10 ms I think. Is there a way to make this faster? Like half a mili second or less?
Thanks, Matt
Max PIT Speed?
Re: Max PIT Speed?
The PIT can go up to 1.193182 MHz. The code example on the wiki has a section 'Program the PIT channel', which sets the frequency division. So if you set that to 1, the PIT will fire interrupts at 1.193182 MHz = every 0.838μs; if you set it to 2, the PIT will fire interrupts at 1.193182 / 2 = 0.596591 MHz = every 1.676μs. For 0.5ms, you want 2kHz, so you need to set the frequency division to 1.193182 MHz / 2 kHz ≈ 597.
Re: Max PIT Speed?
Thanks!