Re: 38Khz IR carrier - best way to turn it on and off
[QUOTE=Art;135608]Does it happen with x10 attenuation probes and setting on the scope?
Yes. Here is the image:

I also had the thought that I did not have a decoupling capacitor on Vdd - no difference. I also tried hooking a regular LED up to the port as I only had the scope hooked up to the port before. No difference.
I also realized that I did not have to keep turning the PWM on and off, all I had to do was the HPWM command once, and then change the port back and forth. No difference, but here is the code now.
Code:
HPWM 1, 254, 38000
MAIN:
pauseus 1000
TRISC = $FF
pauseus 1000
TRISC = $0
GOTO MAIN
You'll notice, I tried switching the whole port - no joy. This is getting frustrating, any other ideas?
*Update* I had the bright idea that, maybe, if I turned a MOSFET on and off with another port and used the MOSFET to switch the pwm signal on and off, it would get better. Not really, its about the same, but as the MOSFET turns off, that slope has the pwm signal messing it up. So its worse. Back to the way it was - I guess I'll have to try it. Of course, I can't try it until after Christmas...... 
Thanks
Andy
Last edited by andywpg; - 29th November 2015 at 16:43.
"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