If these are low-going pulses, then if you set the UART's baud rate to 1KHz, you'd read 0x01, 0x0F or 0x7F for the three pulse lengths. Note that the UART would take the first 1msec of each character as being the start bit, so the pulses would each be truncated by 1msec, as far as actual data is concerned.
what speed are you using? Rs485 could reach a few Mb/sec ( chip and distance depending)
do you want this detector to detect the transmission speed?
Or is it just an interface to detect a pulse and no byte transfer takes place?
in case 2 start and stop a clock @ 64 x the fastest pulse and read the counter .
first one use auto baud rate mechanism look at internet for the code.
Picbuster
I am using 9600 speed.
I want to decode the IRIG-B signal from GPS for time sync.
basically I want to detect 2ms,5ms and 8ms pulsed which according to IRIG-B protocol are 0,1 and position identifier.