| Along with the popularization of Calling Identity Delivery (CID) in China, integrating with the feature as CID, one-touch dialing, automatic on-hook/off-hook, telephone recording, etc, the telephone which takes a microcontroller inside to control and process various kinds of Telecom information, can both meet the growing market demand and give full play to various function provided by Public Switch Telephone Network (PSTN).Based on AT89S52 as the master microcontroller, the method of detecting and processing CID data in FSK standard, DTMF signal, ring and busy tone on PSTN is expounded in the article. HT9032C which is a low power and high-precision integrated circuit, is used to demodulate FSK signal. UART interrupt of the MCU is used to receive the demodulator in asynchronous serial standard. Then the demodulator will be processed and displayed on the screen. HT9032C is also used to detect ring. Then automatic off-hook is achieved through the ring counted by the MCU. MT8880 which contains a codec circuit with stable performance, is used to encode and decode DTMF signal. Through appropriate peripheral circuit design, both one-touch dialing and remote setting are achieved. Additionally, a call progress mode, using the MT8880, can be selected allowing the detection of busy tone. The MCU detect busy tone in order to automatically hang up. There is a preamplifier and a Automatic Gain Control (AGC) circuit in the system to regulate the voice to a clear and smooth effect.Simulating communication timing of MT8880 and I2C bus timing are used to transmit the data from MCU to MT8880 or E2PROM. In the software design, cyclic query and five interrupt sources of AT89S52 are used to complete the function as ring and busy tone detection, CID data receiving, and one-touch dialing. Through using a kind of efficient algorithm to process the CID data, the system can achieve real-time display. 12864 LCD with Chinese font meet the design requirement well.All the tests and debugging programme prove that the system can both detect various signals and encode/decode data accurately. All functions are stable and reliable. |