Hi!.
I need to decode a Rs-232 signal who is encoded using a modified NRZ coding.
This is easy, the 0 from the Rs-232 are coded in a 5uSeg pulse, and the 1 logic is only GND. So when a 0 value starts, a 5Useg pulse apears.
Now i want to decode this signal, for that i need to use INTs and a Timmer?.
SoftSerial will be the point to start? other thing that use a similar coding?
Best Regards
Frank
Some interface to some device use a similar coding?, only to beging to learn who works the timers and how to rebuild or decode this RS-232 signal.
This 5uS pulse comes from a IR led. What i do to pick this 5us pulse is use a BP104 photodiode. What i see playing with severals configurations (a NPN transistor and a Hex Inv) and several R values to pol. the diode is this.
The rising edge change with the distance and position from the IR led to the photodiode. The falling edge never change.
I meen the start of the 5us pulse varies with the diode position and with the current through it. With a small current the pulse looks complete, but with more current the pulse go small and only the falling edge keeps the same position the start moves to the stop position of the edge.
Now, i select a bad IR receiver?, i must use a phototransistor and not a photodiode (for me are the same), the speed of this diode is 100nSeg so i hope this is not the problem.
My idea is use only the falling edge of the pulse, and waits for this edge to start the conter/delay to recovery the 416uS to generate the correct serial baud rate.