At 05:40 PM 6/01/97 GMT, you wrote: >> I have done bits and pieces... I've used a Sharp module connected to >> a PIC 16C84. > >Which Sharp module did you use and how did you connect it to the PIC ? >I've bought some samples of IS1U621, but havn't looked at them >yet. The module is GP1U52X(the only thing, IMHO, worth buying at Tandy/Radio Shack). The circuit must have been the simplest PIC circuit I've ever built. The module just connects to an input line with a pullup. The Tx from the PC has a resistor in series. That leaves just the crystal and the caps on either side. The PC and the VB program did the rest. > >Still, I feel that using receiver modules restricts your freedom >when it comes to decoding IR remotes. You will probably only get >signals modulated in the 36-42KHz range and miss those outside these >frequencies (that will cover most remotes, but still...). Also, There probably aren't many that have a different frequency. At least the stuff I buy is one of the common brands and they all seem to operate in that band. >you might have problems with some of the very long >headers as well as headerless protocols, but that might depend on >the receiver. Given that you have enough RAM storage available, >an idea would be to sample the raw IR signal, and demodulate it >in software later. A sample rate of 100KHz would be enough for >most IR remotes, provided the processor can trigger on the start >of the IR sequence as it's being received. I assume sampling can be >performed with the remote to be sampled very close to the IR receiver >diode and with little other IR noise. That way it should be possible >to get good samples with a crude transistor amp and without a proper >filter. Part of the problem might be to isolate the IR signal from other IR clutter tough I have heard of people decoding it. The Sharp module seems to do a pretty good job of detecting the signal. I suspect it uses one of those single chip units where the whole thing is built into a TO-126 type of package using an IR transparent plastic and has three pins - Vcc, Gnd and output. The metal box does the all important job of shielding. >I've never implemented raw IR capture on a PIC (and I don't intend to), >but I've done it on PCs and Amigas and it does work. PIC capture of >totally unknown remotes without IR receiver/demodulators can >probably be done, but I've never seen the need in my applications. Me neither. > >What unit are these values ? A good base value would be 25uS, since >that the modulation carrier speed. According to >http://falcon.arts.cornell.edu/~dnegro/IR/REMOTES/TABLE.HTML, the >longest signal from a Sony Remote is the 2.2mS header pulse, which >would correspond to 88 40KHz units. That should indicate that you may >send all values below 128 uncompressed and values between 128 and 200 >divided by two, between 201 and 254 divided by 50 and 255 as any >longer period. According to the table, no remote will send >any signals (low or high) longer than (200 * 2 * 25)= 10000 uS, >so longer values are only of value to detect retransmission speed and >are (to my knowledge) not critical (a compression factor of 50 on >retransmission delay would pose no problem with any remotes I know >of). As luck would have it, I had bought a cheap, old Phillips remote which was to be the transmitter. It wasn't the usual RC5. It was a signal where the time periods were really long - I don't remember what it was. Besides, I was trying to squeeze the mark and space timings into the same byte. This gave me a value from 0 to 15 to play around with. The compression wasn't uniform - the level of loss of accuracy was not always in ranges of 4. Most of details are a little hazy right now but I have the code somewhere... As the whole point was to display a waveform on the screen, accuracy was not very important as long the general pattern was discernable. >Bob (tm) Is that bob the process or Bob the name? :-)--------------------------------+--------------------------------- Prashant Bhandary | Tel: +61-2-9662 5299 Spatial Information Solutions | Fax: +61-2-9662 5348 Roads and Traffic Authority | Email: prashb@rta.nsw.gov.au Rosebery NSW 2018, AUSTRALIA | "2b|!2b" - William Shakespeare --------------------------------+---------------------------------