Hi Tim, As with any type of serial communications, you must sample anytime that you might expect to receive something. If you have no idea when something might come in,you must sample continuously and look for a "start sequence" which you know your transmitter will begin with. In some cases,you may be able to have your serial input attached to an input pin which can cause an interrupt on change,and by that means, avoid having to sample all the time. However, if you do this,noise will sometimes trigger the interrupt,so you will only be able to do it in some situations. In the case of the parallel port,when operated in standard mode, some computers won't respond to the interrupt generated by it(because the logic to transfer the interrupt signal to the processor isn't there),and even if they do, you will have to use a pin which can cause the interrupt,and you will have to set up a handler for it,which is more challenging than on a PIC :-) Sean At 12:24 AM 5/8/99 EDT, you wrote: >PICsters, > >While we're on the topic of IR, I got a question that's baffled me for some >time. I recently hooked up an IR detector (GPU125?) to my parallel port, and >sampled it. I was able to rec'v the bit stream, but what I wondered was, >WHEN do I start sampling? There are lots of things that I try to master on >the parallel port -- because the results are instant, and it's easier. Then >later I implement it on the PIC. Anyways, if I start sampling the port TOO >soon, I'll just get back bunches of 0's, and if it's too late, I might miss >something. And as usual, I very much appreciate everyone's knowledge! > >Thanks in advance, > >Tim H. > | | Sean Breheny | Amateur Radio Callsign: KA3YXM | Electrical Engineering Student \--------------=---------------- Save lives, please look at http://www.all.org Personal page: http://www.people.cornell.edu/pages/shb7 mailto:shb7@cornell.edu ICQ #: 3329174