just a thought use the hardware PWM output then AND that with a hardware serial port. if you happen to have a spare and gate floating around. I haven't used the comparator module in a PIC before but I seem to recall some of them had an external output that you could use something like this I'd imagine. James Cizek wrote: > This was what I was hoping would work, just setting the pin to input to "turn it off" > temporarily. Unfortunately, it doesn't work. setting the pin to an input in the middle > of the code seems not to effect the output at all, I see 38khz on B3 after the command executes. > > I saw some excellent code from user Jinx a few posts ago that is very nicely setup. But instead > of programming by fumbling around in asm like i usually do, I'm trying to learn PICbasic PRO to blast out > a few quick projects (it's amazing how learning a higher level language can sometimes be more difficult) > Any other ideas on switching the PWM output on and off ? I will probably use the TMR's to time > the pulse, but I cant get past the actual turning on and off the output yet! Changing the T2CON > resgister does work, but depending on where the output is in cycle, it may leave the output high or > low... Is it an acceptable method to change the TMR2 control and then just low the port to make sure > the LED is off?? Doesn't seem to "precise" to me...... > Thanks for you patience and help as I learn 8-) > > -James > > > > > >> 2) how about setting the I/O pin to input? >> >> -- >> >> Wouter van Ooijen >> >> -- ------------------------------------------- >> Van Ooijen Technische Informatica: www.voti.nl >> consultancy, development, PICmicro products >> docent Hogeschool van Utrecht: www.voti.nl/hvu >> >> -- >> http://www.piclist.com PIC/SX FAQ & list archive >> View/change your membership options at >> http://mailman.mit.edu/mailman/listinfo/piclist >> >> >> > > -- Vapour Forge Jake Anderson Project Manager Mobile: 0412 897 125 Email: jake@vapourforge.com Web Page: www.vapourforge.com Your source for custom IT services -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist