| ??? 05/17/03 13:08 Read: times |
#45740 - RE: DMTF and Pulse Dialing Responding to: ???'s previous message |
Hallo Waqar,
before coding, you must have a good look on pulse train coming from telephone with good oscilloscope. Very important for distinguishing between several keys that were hit is the pause between the pulse trains of each key. Means the following: Assume that '3' was hit. Then you will see three pulses. Assume that you hit very fast two keys one after the other. E.g. '3' and '7'. Then you will see three pulses, then a pause and afterwords 7 pulses. Your code must be able to detect the pause, to decide when first pulse train has ended and next pulse train has started. The problem of writing a code for this purpose is not to detect these pulses, but to handle all those many cases where the keypad was not hit as it is supposed to. Assume, e.g. that operator is waiting acertain time after hitting the first key. Then your pulse train looks different and you have to decide hao to proceed. Ignore it after pause is too long, or is second hit key representing first key of the new command? These, dear Waqar are the real traps of such code. And to achieve a 100% satisfying solution would need many hours of analyzing. For thios purpose you have to take into account psychology of operator. So, you must play with many situations where an operator sits in front of his telephone and is hitting keypad. So, first you have to decide the time intervals of such application. What Michael wants to tell you (if my english is good enough) is a methode how to count pulses. If signal is noisy you will have a big problem to find out when there is low/high ramp of beginnening and high/low ramp of end of such a dialing pulse. If you would start at a noise peak you will measure the pulse length wrong. So, he suggested a methode not relaying totally on edges. You just sample the input where the pulse train arrives your application many more times the pulse lasts. Assume pulse high time lasts 8msec. Then you sample signal every 1msec. So, when starting with detected low/high edge and sampling 8 times signal (every 1msec) you would see '111111111'. If there is some noise speaks during high pulse, you would see '11101111' or '11111001' or '10111001' or etc. You understand? When you now counts '1' on your sample you can use folowing criterion to decide whether the oulse you detected was really such pulse and NOT a noise pulse. If '1' is more often than 4 times then it would actually a high pulse. What when there was no high pulse, but a noise pulse? Then you would sample something like this '1000000'. Ok? This methode is working like a filter. But to write good working code for handling very noisy signals is NOT easy! And may be that some of the guys who wants to solve problem with less than 100 instructions would fall on their bottom, when they actually would dry it... Waqar, what makes situation completey difficult, may be even impossible, is that you want to detect 8 lines at the same time! As it is reall complicated to write some good code for only detecting ONE line, it seems to me realy, realy difficult to solve problem with 8 lines. And to solve this problem eith only 100 instructions seem to me absolutely ridiculous. Why not detecting each line with a very small '51 derivative? You know the ones that does have all memory inside. These slaves could be connected to some master. This seems to be the only way to proceed in your application. Would you proceed with DTMF situation would be much easier. Because their are peripheral chips arround just doing this decoding. Bye, Kai |



