Andrew wrote:
I'm interested in using the CC16 to control a small automatic switchboard (PAX) for the old decadic dial type telephones. This would be used as a demonstration unit for a collection of old phones.Could one of the inputs count a variable number of pulses (i.e. 1 to 10) at a rate of 10 pulses per second for a second and then have the program store the count as the digit dialled?
According to an old telephony training manual the dial ratio break to make was 66% to 33%. So one impulse was 100 mS long with a 66.6 mS break and a 33.3 mS make. This drove an 'A' relay which acted as an inverter so that the pulse to the selector became approximately 67 mS long. I intend to use a 555 timer IC as a schmitt trigger/pulse shaper to ensure that the pulse length is correct even if the old dial runs to slow/fast.I am looking at using a microprocessor to substitute for what was done with relay logic in a real PAX. I have tried using a PICAXE but it does not have sufficient I/O lines. The basic idea is to use sets of modern relays to do the switching that was done with uniselectors and two-motion selectors. I could build a relay register or a binary counter with ICs to count dial pulses but it would be neater if the microprocessor could do the job.
Andrew,
Decoding those dial pulses should be easy.
- Clear the digit value counter
- Wait for the start of a pulse (break)
- Delay about 50mS (not critical)
- Wait for make again (get the trailing edge)
- Count the pulse.
- Wait for (say) 100 mS max for the start of the next pulse.
- If nothing happens in the 100mS, the counter contains the digit value. Emit the digit and use it, go to step 0. Otherwise goto step 2.
If you structure this as a MultiTrack task or object, you can have it just sit there in the background quietly producing digits. Another task could simultaneously generate on hook/ off hook status.
Tip: Use InputF or InputFM instructions. All other input instructions have debounce filtering of 8-16mS, which could muck up your timing. You can actually use them on top of what I have above to provide filtering. I'd probably do a WaitOff after step 3.
David
PS: I wish I had time to play with this properly. Looks like fun!
