Irregular Pulse counting
SSchaaf
Posts: 6
Hello.
I have a situation I need help on, PLEASE!
I have to decode a string of pulses like those from an old rotary telephone. I intend to use 567 tone decoders to 'hear' the pulses. The pulses go: "1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 " would be 54321. Pulse width would be 10 or 20 BPS. I need to not only separate each digit, ie.5 4 3 2 1, but also determine the BPS rate, (10 or 20 BPS). In 'analog land', I used a missing pulse detector to tell the space between the digits, but this time, I don't know if they'll be 10 OR 20 BPS...
I considered using PULSEIN to measure the first pulse for BPS, and count to count the number of pulses. However, how do I detect the end of one digit, and the start of another, OR, the end of the pulses altogether?????
Any help will be GREATLY appreciated.
Thank you,
Scott...
I have a situation I need help on, PLEASE!
I have to decode a string of pulses like those from an old rotary telephone. I intend to use 567 tone decoders to 'hear' the pulses. The pulses go: "1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 " would be 54321. Pulse width would be 10 or 20 BPS. I need to not only separate each digit, ie.5 4 3 2 1, but also determine the BPS rate, (10 or 20 BPS). In 'analog land', I used a missing pulse detector to tell the space between the digits, but this time, I don't know if they'll be 10 OR 20 BPS...
I considered using PULSEIN to measure the first pulse for BPS, and count to count the number of pulses. However, how do I detect the end of one digit, and the start of another, OR, the end of the pulses altogether?????
Any help will be GREATLY appreciated.
Thank you,
Scott...
Comments
"1 1 1 1 1_____1 1 1 1_____1 1 1_____1 1_____1"
Hope this makes more sense....
Scott..
You could use a PULSIN PIN, low, Datain (low=0). This, placed in an appropriate loop, will detect pulses going from high to low and up again. You will see the duration of the low levels.
If you have an oscilloscope, or know somebody who has one, you can see more of the behavior of your signals. Experimenting with PULSIN and some clever debug statements in your code can give you similar information in the longer run.
Success,
Klaus