> i am new to pic processors, and have a question. i am using a pic to > record the pulse widths of low pulses from a remote control. the > remote i am using is a standard 40khz modulated remote control for my tv > (hitachi). i am then wanting to take those pulse widths, and output it to > a pin connected to an ir led, to change the television channels, volume, > power, etc. > > i am using picbasic pro, and am programming everything in basic. the > problem is, i am trying to use the pulsin function to record the time a > pin stays low. i know that my remote control sends > out about 50 pulses, the shortest being about 1ms. i am running the > pulsin function in a while loop, looping back if pulsin returns a zero. i > am using a 16f874 with a 20mhz clock, but pulsin doesnt seem to be > catching all the pulses. i have also tried using the ccp1 interrupt to > count low pulse edges, however, if i want to reproduce the data sequence, > i will need to generate an interrup on both rising and falling edges, > since i believe the pulses are not pwm. > > so can i use pulsin/pulsout under basic? or should i code it in > assembly? or should i just use interrupts? has anyone else done > something similar to this? any help would be greatly appreciated. It might be better to use an IR receiver module to receive the signals, the receiver module will filter out the 40kHz carrier resulting in much slower pulses for you to detect. The only problem is you would have to regenerate the carrier when outputting, which is easily done with a 555 timer. TTYL -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body