Thank you, David > I'd be more concerned about what you're wanting to do with the data, and > how > big the data is. Yes, thats sure important for calculating the maximum counter duration. The maximum length of a datastream is 23 x 8 = 184 bits, however there is in every block of 8 bits at the beginning and/or end at least one zero (edge), so the counter can comfortably count several miccroseconds over 104. > > Getting the data itself can't be that bad. You'll need a timer that you > can > set to interrupt you when you should go check the input line, and an edge > triggered int to start the timer off when you see the start of the flag > byte. Now that was helpful in understanding that I really can have the timer interrupt other code and the edge restart the timer. > > You're going to have a guaranteed maximum run time in any state, so you > need > to assure that you don't drift significantly during that time. Yes, right, but that seems to be no problem since I found to have an edge in every block of 8 bits. Thanks a lot. now I'm pretty confident that I can make it work (with a lot of help from this friendly list :-) ) Lembit > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.375 / Virus Database: 267.15.2/252 - Release Date: 06.02.2006 > > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist