inglewoodpete
Senior Member
I have a project which uses a 20M2 on the AXE118 board. I need to implement a 40 to 50mS timer for regular checking of an ADC input.
My processor of choice would be a 20X2, due to its more flexible timer and interrupt configuration but I need to use multiple PWM channels. Hence the 20M2.
The 20M2 has a Timer word which increments every second (4 MHz and 16 MHz). I presume it would increment every 500mS at 8 or 32 MHz: still too slow for my needs.
I'm wondering if there is another, perhaps less visible byte or word that counts at a faster rate, causing the Timer variable to increment every second. My idea would be to read and count this system variable to create a non-blocking timer that increments every 40 to 50mS.
Note: This project is for client. I will receive a modest payment for the solution I provide.
My processor of choice would be a 20X2, due to its more flexible timer and interrupt configuration but I need to use multiple PWM channels. Hence the 20M2.
The 20M2 has a Timer word which increments every second (4 MHz and 16 MHz). I presume it would increment every 500mS at 8 or 32 MHz: still too slow for my needs.
I'm wondering if there is another, perhaps less visible byte or word that counts at a faster rate, causing the Timer variable to increment every second. My idea would be to read and count this system variable to create a non-blocking timer that increments every 40 to 50mS.
Note: This project is for client. I will receive a modest payment for the solution I provide.