Hi;
I am using the LPC 802 and LPC804 Microcontroller with 15MHz of Frequency. I wants to toggle the pin for every 400ns.
Where I can able to toggle the pin using timer only up to 10 microsecond and in polling method can able to toggle upto 3-5 microsecond(nearly 300 KHz) only. Please suggest the Idea to generate the Clock up to 2.4 MHz or toggle of LED for every 400 ns in the LPC802 and LPC804 Microcontroller.
Thank you
Solved! Go to Solution.
Hi,
I suppose that you use CTimer to generate interrupt with a fixed period, in the ISR, you clear the CTimer status bit and toggle a LED. Because the interrupt handling requires a lot of time, for example pushing core registers to stack, pop the core registers from stack, jumping ISR, so the ISR frequency is low.
I suggest you use CTimer to generate PWM signal to drive LED, I am sure that the PWM frequency can reach up to 2.4mhz, pls check if the solution can meet your requirement.
BR
XiangJun Rong
Hi,
I suppose that you use CTimer to generate interrupt with a fixed period, in the ISR, you clear the CTimer status bit and toggle a LED. Because the interrupt handling requires a lot of time, for example pushing core registers to stack, pop the core registers from stack, jumping ISR, so the ISR frequency is low.
I suggest you use CTimer to generate PWM signal to drive LED, I am sure that the PWM frequency can reach up to 2.4mhz, pls check if the solution can meet your requirement.
BR
XiangJun Rong