- Sun Oct 11, 2015 10:46 am
#31101
Here's a simple test routine for the pwm issues I experience.
For visual I have leds on pins 12 and 14, as well as an analyser on them.
Print "Step 1 sends pwo 12 250"
Print "Step 2 sends pwo 12 750"
Print "Step 3 sends pwo 12 0 and pwo 12 250"
Print "Step 4 sends pwo 12 0 and pwo 12 750"
Print "Step 5 sends pwo 14 250"
Print "Step 6 sends pwo 14 0 and pwo 14 250"
Print "Step 7 sends pwo 14 0 and pwo 14 750"
Print "Step 8 sends pwo 12 0 and pwo 14 0"
Start up and I'm seeing some other previous Statpin etc being sent via the serial.
Into edit and load up this file.
Run this file.
Step1 ... pin 12 into pwm 250
Step2 ... pin 12 goes high
Step3 ... pwm of 250 on pin 12
Step4 ... pwm of 750 on pin 12
Step5 ... pin 14 goes low pin 12 high
Step6 ... no change
Step7 ... no change
Step8 ... ( just sends zero's pwm to both)
Step5 ... no change
Step6 ... pwm 250 on pin 14
Step7 ... pwm 750 on pin 14
Step8 ... (sends zero's to both)
Steps 1 2 3 4 5 6 and 7 now make no change, until use step 8
Then Steps 6 & 7 will function.
cls
button "Step1" [pwm1]
button "Step2" [pwm2]
button "Step3" [pwm3]
button "Step4" [pwm4]
button "Step5" [pwm5]
button "Step6" [pwm6]
button "Step7" [pwm7]
button "Step8" [pwm8]
button "Step9" [pwm9]
button "Exit " [TestExit]
Print "Step 1 sends pwo 12 250"
Print "Step 2 sends pwo 12 750"
Print "Step 3 sends pwo 12 0 and pwo 12 250"
Print "Step 4 sends pwo 12 0 and pwo 12 750"
Print "Step 5 sends pwo 14 250"
Print "Step 6 sends pwo 14 0 and pwo 14 250"
Print "Step 7 sends pwo 14 0 and pwo 14 750"
Print "Step 8 sends pwo 12 0 and pwo 14 0"
wait
[pwm1]
pwo 12 250
wait
[pwm2]
pwo 12 750
wait
[pwm3]
pwo 12 0
pwo 12 250
wait
[pwm4]
pwo 12 0
pwo 12 750
wait
[pwm5]
pwo 14 250
wait
[pwm6]
pwo 14 0
pwo 14 250
wait
[pwm7]
pwo 14 0
pwo 14 750
wait
[pwm8]
pwo 12 0
pw0 14 0
wait
[pwm9]
wait
[TestExit]
end