Thats interesting. I see two pair of wires coming out of the dial. So one pair is sure the digit pulser, the other might be exactly that, the home position. Maybe they used that to mute the earpiece?
Sure I can make good use to it.
Ioannis
Thats interesting. I see two pair of wires coming out of the dial. So one pair is sure the digit pulser, the other might be exactly that, the home position. Maybe they used that to mute the earpiece?
Sure I can make good use to it.
Ioannis
The other wire might be for the rotary switch normally open and closed positions.
I found code I did if it helps. This was to time dialling zero (ten) to calibrate a dial.
The LED should land int he middle, but most dials are a little off.
It happens to know the number dialled too, though the hardware wasn’t for displaying it.
Code:' ' '*********************************************************************************** '* * '* [email protected] * '* Brek Martin 2013-14 * '*********************************************************************************** ' ' DEFINE OSC 20 ' but we are really using 8 MHz DEFINE NO_CLRWDT ' watchdog is cleared manually LCD_DATAUS CON 50 ' LCD timing LCD_COMMANDUS CON 2000 ' ' 'INTCON.4 = 1 'enable portb.0 interrupt 'OPTION_REG.6 = 0 'interrupt on falling edge of portb.0 ' ' INCLUDE "Elapsed.bas" ' ' ' ' ' execution time! ' CMCON = 7 ' set portb to digital trisb.7 = 0 ' set LED outputs trisb.6 = 0 ' trisb.5 = 0 ' trisb.4 = 0 ' trisb.3 = 0 ' trisb.2 = 0 ' trisb.1 = 0 ' trisb.0 = 1 ' set rotary dial switch input (pulse) trisa.1 = 1 ' set rotary dial switch input (home) ' @ clrwdt ; clear watchdog timer manually ' flashrate var byte timea var byte index var byte ' declare values for LED test startup indexb var byte bpattern var byte dialcount var byte ' oldlast var byte ' errstart: ' @ clrwdt ; clear watchdog bpattern = %00000001 dialcount = 0 flashrate = 8 timea = 64 ' FOR indexb = 0 TO 6 ' fancy led test startup FOR index = 0 TO 6 @ rlf _bpattern portb = bpattern pause flashrate NEXT index FOR index = 0 TO 6 @ rrf _bpattern portb = bpattern pause flashrate NEXT index flashrate = flashrate - 1 NEXT indexb portb = 0 ' @ clrwdt ; clear watchdog timer manually ' extint = 0 'reset external variables freq = 0 ticcnt = 0 ' ready var bit 'declare internal variables ready = 0 counting var bit counting = 0 thetime var byte thetime = 0 ' lasta var byte' 'bit to check for last rising edge lasta = 0 ' ' Gosub ResetTime 'Reset Time 00:00:00 ' ' ' cycle: ' main routine - 3D Cube user program @ clrwdt ; clear watchdog timer manually ' ' IF porta.1 = 1 && counting = 0 THEN portb = %11111110 ' dial not home indicator ready = 1 ' set ready to count time status thetime = 0 bpattern = 0 ' ELSE ' IF counting = 1 THEN ' IF portb.0 = 0 THEN portb = %11111110 ' flash LEDs on for break pauseus 50 portb = 0 ELSE portb = 0 ' flash LEDs off for make ENDIF ' ELSE portb = 0 ENDIF ENDIF ' ' IF ready = 1 THEN ' check ready to count status IF portb.0 = 0 THEN ' look for first falling edge gosub StartTimer 'start clock timer thetime = 0 dialcount = 0 timea = 64 counting = 1 ready = 0 ' lock routine ENDIF ENDIF ' ' IF counting = 1 THEN ' check counting and dial at home position ' IF portb.0 = 1 && lasta > 3 THEN ' look for last rising edge otherwise is overwritten thetime = Seconds*100 thetime = thetime + Ticks ENDIF ' oldlast = lasta ' IF portb.0 = 0 THEN ' dial switch debounce in software lasta = lasta + 1 ELSE lasta = 0 ENDIF ' IF lasta < oldlast THEN ' increment dial pulse counter dialcount = dialcount + 1 ENDIF ' IF porta.1 = 0 THEN gosub StopTimer counting = 0 ' timea = 10 ' IF dialcount < 10 THEN ' check that zero was dialed goto errstart ' or error condition ENDIF ' Gosub ResetTime 'Reset Time 00:00:00 ENDIF ENDIF ' ' ' ' IF thetime > timea && thetime < 75 THEN ' LED time display bpattern = %00000010 ' dial too fast ENDIF IF thetime > 74 && thetime < 85 THEN bpattern = %00000100 ENDIF IF thetime > 84 && thetime < 95 THEN bpattern = %00001000 ENDIF IF thetime > 94 && thetime < 105 THEN bpattern = %00010000 ' ideal time ENDIF IF thetime > 104 && thetime < 115 THEN bpattern = %00100000 ENDIF IF thetime > 114 && thetime < 125 THEN bpattern = %01000000 ENDIF IF thetime > 124 THEN bpattern = %10000000 ' dial too slow ENDIF ' portb = bpattern pauseus 500 portb = 0 ' ' goto cycle ' end main routine - do the next cycle ' '
Though I doubt it, European phones may be different than in the USA but here in the USA only two wires, a pair, are needed for a phone to work.
The other pair at one time was used for enhancements and power. Those old phones often had several incandescent light bulbs that wouldn't allow the main line to function because the current draw was excessive. Typically nowadays those wires are used for a second line inside the house.
I think the home position you articulate is really time. If the handset is on the phone long enough the circuit resets and waits for the pulses or the tones. When I was younger you were cool if you didn't use the dial to call someone. You had to be talented enough to bang on the phone cradle the correct number of times to dial a phone. Ah the good old days.
I'm pretty sure all the pulses are the same time on/pause ratio. You just need to count the number of pulses and not wait too long to dial.
The dials in British phones had 5 contacts. 2 of them were the pulsing contacts which were normally closed and pulsed open for the dial pulses. The other three contacts were normally open and are referred to as the "Dial Off Normal" contacts. They placed a short across the earpiece to prevent acoustic shock and also a short across the carbon granule microphone to prevent the back EMF surges from welding the granules together.
http://www.britishtelephones.com/howdial.htm
Keith
Keith
www.diyha.co.uk
www.kat5.tv
Yes only two wires are needed for the phone in Australia too. I'm assuming there's access here to only use the dial mechanism.
None of our phones have an even make/break ratio though. It's maybe because the relays at the other end will close
quicker than they will open.
Old exchange equipment was the reason I was tasked with calibrating the dials.
A prettier example for counting the digits using the same method here:
OK, this is what I came up for decoding rotary dialer. It reads and decodes the pulses and compares 3 digits from the EEPROM. If one has different needs just change the arrays accordingly.
IoannisCode:clear read 0,array[0],array[1],array[2] 'array holds the stored digits to compare. INCLUDE "DT_INTS-14.bas" ' Base Interrupt System INCLUDE "ReEnterPBP.bas" ' Include if using PBP interrupts 'wsave var byte $20 system 'depends on the PIC used '::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ASM INT_LIST macro ; IntSource, Label, Type, ResetFlag? INT_Handler TMR1_INT, _Timer1, PBP, yes endm INT_CREATE ENDASM @ INT_ENABLE TMR1_INT ; enable Timer 1 interrupts goto main Timer1: time=time+1 'Interrupt every 0,131msec for a 4MHz PIC clock if time>7 then 'time resets every 0,8 sec approximately time=0 endif @ INT_RETURN main: digit[0]=0:digit[1]=0:digit[2]=0 'clear array every time it loops here for i=0 to 2 'three digit counter. Change this for more get_digit: while !dial:pause 10:wend 'wait for dial rotation get_next time=0 while dial if time>1 then main 'every digit takes around 10 ms. If times gets 1 wend 'then it sure timed out digit[i]=digit[i]+1 'increment digit value time=0 'reset time variable while !dial 'wait for next high edge if time>4 then next_digit 'if time is more than 500-600ms then wend 'next digit has arrived goto get_next next_digit: if digit[i]<>array[i] then error 'if digit and array are different then wrong number dialed next i high green:pause 1000:low green:goto main 'SUCCESS! error: high red:pause 1000:low red:goto main 'WRONG DIGITS!!! end
Bookmarks