Short answer is:
Have you tried yourself with 4MHz? What did you change and why? What did it do, why do you think it didn't work?
Long answer is:
First, PWM period:
Thanks Henrik. Is it possible to do with 4mhz oscillator? I'm testing on breadboard, and with 20mhz oscillator it behaves badly.CuriousOne Yesterday, 15:44
And this tells how to pass data.
No need for assembly code.
You want a PWM period of 1/38000 = 26.315us. Assuming 20MHz operating frequency your instruction cycle time is 200ns so you want a PWM period of 131-132 instruction...
and by the way, this code does nothing to built-in HPWM, right?CuriousOne Yesterday, 12:31
Thanks, so I need this part of code, right?
bcf IRTX,PIN ; 1uS, LED=on
goto $+1 ; + 2uS = 3uS
goto $+1 ; + 2uS = 5uS
goto $+1 ...
http://www.picbasic.co.uk/forum/content.php?r=278-Pentax-Nikon-IR-Remotemackrackit Yesterday, 12:20
| PICBASIC PRO™ Compiler 3.0 PBP is a BASIC programming language for Microchip's PIC microcontrollers.
Version 3 is a major evolution of this popular product, making it even more capable, stable, and reliable. All the years of development culminate here, with many new capabilities and improvements. Come see why thousands of engineers, educators and hobbyists have depended on PBP for more than a decade.
Software activation keys are delivered electronically after purchase.
15 Day Trial Before Activation Key is Required
If installed without an activation code, the software will be fully functional for 15 days.
Read about Product Activation