Re: 38Khz IR carrier - best way to turn it on and off

Originally Posted by
Art
Have you tried turning it off and on again?
Code:
MAIN:
HPWM 1, 127, 38000
pauseus 1000
HPWM 1, 0, 38000
pauseus 1000
GOTO MAIN
Strictly speaking of course, the HPWM takes some instructions so the loop takes longer than 2ms to execute,
but you could make your own time wasting routine for accurate delay, so that shouldn’t be a problem.
I mentioned that since I noticed you had more accurate timing before using HPWM only once.
But you have a scope, you don’t even have to do the math to calculate a time waste routine.
Hmm, tried it, but I couldn't get the frequency up high enough due to the 'setup time' of HPWM. See below though.....got it looking great now.
Thanks Art,
Andy
"I have noticed that even those who assert that everything is predestined and that
we can change nothing about it still look both ways before they cross the street"
-Stephen Hawking
Bookmarks