GRAEME SMITH email: grysmith@freenet.edmonton.ab.ca YMCA Edmonton Address has changed with little warning! (I moved across the hall! :) ) Email will remain constant... at least for now. On Sat, 8 May 1999, Tim Hamel 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. > I don't know all that much about IR.... But isn't that what a "SYNCH" mark does in a HD? IE. poll the port until you get some 1's, then test to see how long they run, (A sync mark is a certain length) if they exceed one byte, you have found a sync mark, so then continue listening until the RX line goes to 0, and set your frame for future reads. GREY