| With the fast development of telecom industry in China, There are several telecom companies can provide telecom access" service now. Also there are big differences in call fees at the same time because of the differences call way between the companies or inside companies. Customer should have the right to select a company's telecom network as one call access of his or hers. However, the PSTN network hasn't distributed or can't distribute all over the China now, obviously, wireless access is an ideal selection in this case.Based on above, we designed a device that a telephone and a wireless access device made together in a system and they are controlled by a MCU. So some numbers dialed will be redialed by the MCU through the GSM modem according to customers' will, also the IP number can be added automatically, which not only reduce call fees but also make convenience and improve efficiency for customers:We design the hardware circuits first. Interface circuits include auto-routing, load switch, polarity-reverting signal inverting and on-off hook checking. Telephone circuit produce DTMF signal, receive ring signal and perform speech function. DTMF receiver lets it becomes binary code for MCU to read. Analog circuit process speech signals between phone and GSM modem. MCU and its peripherals are central control unit. Display system is used to show work states and device information. In the last section of this party, we discuss voltage level shift and its application in the system.The software is divided two parts, main and interrupt. The former performs initial and setting of itself and drive of peripherals, et al. The later includes serial communication, external and timer/counter interrupt. They fulfill communication with the GSM modem, read ring signal, and check on-off hook timely respectively. The GSM modem is controlled by AT commands and the operation is such as its initial setting and number dialing. Other software program includes the receiving of decoded FSK signal from PSTN network, the receiving of decoded DTMF signal, auto-routing and the query of bypass data frame et al.The design method not only can complete system function but also reduce thecomplexity of device, make the circuits clearly, lighten the burden of MCU and let the system extend easily and simply. |