> You could have a timer0 interrupt each 104uS (about 521 instructions) > and use RB0 to detect an start bit and sync the timer with the serial input. > When you got RB0/INT going LOW (start bit) you put a value on timer0 so it > will overflow in 52uS and you confirm the start bit. Then timer0 will > overflow in 104uS and you got the first bit. So on untill you got the stop > bit. I have done this with great success on a 16f84a running at 4mhz except my first delay was at 156us. (who cares about start-bit confirmation ;-D) It works very well. You just set up the PIC to use the RB0/INT for detecting the start bit, then you turn off RB0/INT's and use TMR0 INTS to call your handler every 104us (aiming for the center of the bit). When you get the stop bit, switch back to RB0/INT's. There's even time for inserting the data into a circular queue that (auto-magically) uses all the unused RAM locations. Then at main level you just pull the stuff out of the queue and process it at leisure. If the receive queue gets full, just apply some hardware flow-control. Cake. Really. ;-) michael brown -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads