Posts

Showing posts with the label shift

10 Output Shift Registers

Image
By this stage I'm nearing the point where pretty much everything needed to connect a call over two phones is in place; on the source phone I can detect OH (and potentially send a dial tone) as well as detect a dial pulse train. On the destination phone I can send it ringing current to operate the bells and detect OH if the call is answered. What I'm going to need next are some outputs to activate the relays to bridge and route calls, send ringing current and operate the dialing tones. So it pretty obvious I'm going to need many more outputs than the ones available on the Arduino. To get round this I'm going to use a couple of daisy chained  SN74HC595's   shift registers to give me 16 outputs for the price of three on the Arduino, as shown below. I end up with an output map something like this... #define C595SourceRly1 1  // 1 to 8 will operate the relay matrix #define C595SourceRly2 2 #define C595SourceRly3 4 #define C595SourceRly4 8 #define C595DestRly1 16 #define ...

8 Input Shift Registers and Pulse Dialing

Image
On the Arduino I have only a limited amount of IO pins, 20 in all. This would probably be enough pins if I just wanted 4 inputs for call sensing, 2 for pulse and off hook detection and the rest to operate the relays but I want to add a DTMF transceiver and to connect to an outside line so I'm going to need quite a few more. Enter stage right the  74HC165 shift in register for the inputs. This has 8 inputs which will be configured as per the map below... #define ShIn_L1_OH_Pin 128 // call sense line 1 #define ShIn_L2_OH_Pin 64  // line 2 #define ShIn_L3_OH_Pin 32 #define ShIn_L4_OH_Pin 16 #define ShIn_OH_Pin 8 // source phone off hook and used for the pulse dial train #define Dest_Phone_OH_Pin 4 // call answered, ie destination phone off hook //#define Call_Progress_Pin 2 // not used #define External_Ring_Pin 1  // incoming call from outside exchange #define SHIN_CLEAR 0  // used to check no inputs are active With the shift register IC at the top right, below shows t...