JoeFromOzarks
Senior Member
Hello folks!
Please help a good friend and me out here, where we can read the documentation on this "odd" event:
Using a 20M2, connect an LED to b.7 and your frequency counter to c.2.
Download and run this program first, check the PWM frequency with your meter and observe the flash rate of the LED.
Frequency counter will read about 38KHz, as expected.
-=-=-=
Then download this code and again, observe the PWM frequency and observe the flash rate of the LED.
Frequency counter will read about 153KHz. The LED on b.7 flashes at about the same rate with either program.
What’s up with this? Multitasking causes a 4x increase in PWM? Where can I read more about this because I've made my eyes bleed reading and reading and reading.
Thank you!!
-joe
Please help a good friend and me out here, where we can read the documentation on this "odd" event:
Using a 20M2, connect an LED to b.7 and your frequency counter to c.2.
Download and run this program first, check the PWM frequency with your meter and observe the flash rate of the LED.
Code:
SYMBOL IR_LED = c.2 'pin out2
PWMOUT IR_LED, 25, 52 'start 38 kHz for IR
#NO_DATA
do
toggle b.7
pause 1000
loop
-=-=-=
Then download this code and again, observe the PWM frequency and observe the flash rate of the LED.
Code:
Start0:
suspend 1
SYMBOL IR_LED = c.2 'pin out2
PWMOUT IR_LED, 25, 52 'start 38 kHz for IR
#NO_DATA
do
toggle b.7
pause 1000
loop
start1:
do
loop
Frequency counter will read about 153KHz. The LED on b.7 flashes at about the same rate with either program.
What’s up with this? Multitasking causes a 4x increase in PWM? Where can I read more about this because I've made my eyes bleed reading and reading and reading.
Thank you!!
-joe