Telephone network data communication based on FSK information decoding

Abstract: Introduce the basic principle and data transmission format of FSK information decoding, use the interface of FSK decoding chip (SM8220P) and single chip microcomputer to realize the data transmission of telephone FSK information; give the related circuit diagram and program flow chart of data communication using telephone FSK information And FSK information receiving assembly source code

Telephone caller identification information sending and receiving (commonly known as caller ID), referred to as CID (Calling IdenTIfy Delivery), is a service item provided by the telecommunications bureau to the called telephone user, which refers to the display of the calling phone on the terminal device of the called user Caller identification information such as number, calling user name, calling date and time, and stored for the user to consult the service items. The called user decides whether to answer the call based on the displayed caller identification information, and can avoid some unwilling or unfriendly calls. Using this function, FSK information decoding telephone network data communication can be used in real life.

1 Phone caller identification principle and transmission protocol

The basic method for realizing the caller information identification service is that the originating program switch transmits the caller's phone number and other information to the terminal switch through the inter-office command system. The terminal switch then uses the frequency shift keying FSK (Frequency- Shift Keying) or Dual Tone Multi-frequency DTMF (DualToneMulTI-Frequency) mode, which is transmitted to the called user terminal equipment before the first ringing or second ringing interval China's communications industry standards clearly stipulate that the unified FSK method is used to provide the calling phone to display services. During a call, if the called user applies for the CID service, the terminal exchange of the telecommunication office will transmit caller identification information data to the called user. The transmission flow and sequence are shown in Figure 1.

Among them, A, B, C, D, E are the state duration time when the data is transmitted, each time value is listed in Table 1. Before or during data transfer, if the user goes off-hook, the transfer stops, but the call processing proceeds normally.

Table 1 CID signal transmission time value

Symbol Time value

Explanation

tA 1s The first ringing signal
tB 0.5s Time interval between the end of the first ringing and the start of data transmission
tC ≤2.9s Data transmission time, including channel occupation signal and flag signal
tD ≥200ms The time interval between the end of data transmission and the start of the second ringing
tE 1s Second ringing signal
tB + C + D ≤3.6s Each time period can be determined according to specific conditions

2 Data format of caller identification information

There are two transmission formats for FSK caller identification information data: single data message format SDMF (Single Data Message Format) and composite data message format MDMF (MulTIple Data Message Format). The former has a simple structure and can hold less information content, such as calling number, date and time; the latter has a more complicated structure and can hold a longer information length, and can also call the user's name in addition to the single data format Wait. This article mainly introduces the receiving of FSK caller information data format.

The single data message format is composed of a message header and a message body. The message header is composed of a message type and a message length, and they are all 8-bit words. The value of the message type identifies the characteristics of the message; the message length indicates the length of the message word that follows. The message body includes the message that the switch needs to pass to the end user. The message body can accommodate 1 to 255 8-bit message words. Each word is represented by a 7-bit ASCII coded character set with 8 check digits.

A completed message frame is composed of channel occupancy signal, flag signal, data information and check word. The channel occupation signal and the flag signal are used to prompt the telephone terminal to prepare to receive data; the check word is used for error checking, as shown in Figure 2.

â‘  Channel occupation signal. This is the header flag to be sent out first when sending the calling message, and consists of a set of 300 consecutive "0" and "1" alternately. The first bit is "0" and the last bit is "1". In the call state, this signal is not sent.

â‘¡Signal signal. In the on-hook state, the second flag signal to be sent first when the program-controlled switchboard sends the calling information to the user is composed of 180 flag bits (logic "1"). In the call state, this signal is not sent.

③ Flag bit. The program-controlled switchboard randomly inserts the flag bit according to the line usage, which is composed of 0 ~ 10 logic “1” s.

â‘£Data word. For calling information, a "0" is used as the start bit before each data word, a "1" is added at the end as the end bit, and the lowest bit of each number is sent first. In this way, each word is actually 10 bits, that is, 1PXXXXXXX0, where P is the parity bit.

When the telephone calling information data is transmitted, the channel occupation signal is sent first, followed by the flag signal, and finally the data word is sent continuously. According to the data transmission, some flags are inserted at intervals. The general flag will be added between the transmission of the following words:

a. Between the message type word and the message length;

b. Between the message length word and the first reference number or message word;

c. Between the parameter type word and the corresponding parameter length word;

d. Between the reference length word and the first reference word;

e. Between the last parameter word and the next parameter type word;

f. Between the last reference word or message word and check word.

Single data message format data transmission is arranged in order of message type (04H), message length, message word, month, day, hour, minute, calling number (or "O" or "P") for transmission. All message words and parameter words have odd even parity bits, which are transmitted using parity.

3 Telephone FSK information communication circuit design

This article takes the interface of the FSK information demodulator SM8220P chip and the MCU and external circuits as an example to introduce the communication receiving method of FSK information. The SM8220P demodulator is a dual in-line, low-power CMOS integrated circuit FSK demodulation chip produced by NPC in Japan. The pin functions of its demodulator are listed in Table 2.

Table 2 SM8220P pin functions

Symbol Lead

Features

TIP-RING 1,2 Telephone signal input. Signal input must be DC isolated
AGND 3 Analog ground, to be grounded through a capacitor
RDIN 4 Ring detection input. To attenuate the ringing signal to this pin
RDRC 5 Ring detection RC delay circuit, low level effective
RDET 6 Ring detection output, internal Schmitt trigger circuit. When it is low, it indicates that the ringing signal input is detected; it should be grounded when not in use
PWDN 7 For power-down control, it should be kept at low level. If it is high level, enter the power-down working mode, COSCOUT, CDET and DOUT are automatically set to high level, AGND, FOUT is set to high impedance state
GND 8 Device ground
OSCIN / CLKIN 9 Oscillation amplifier input, external oscillator input signal is input through this pin
OSCOUT 10 Oscillation amplifier output, must be open when using external oscillation signal
CDET 11 Carrier detection output, active low. When it is low, it indicates that there is FSK carrier signal input at this time
NC 12 Empty foot
DOUT 13 Data output, usually high level. When CDET = 0, it means that there is a valid FSK signal input on the phone at this time, which is output by this pin after demodulation
DMIN 14 Demodulator input
FOUT 15 The output of the FSK bandpass filter is connected to DMIN through a capacitive coupling
VDD 16 Power supply positive electrode (3 ~ 5.5V)

The SM8220P follows Bell 202 and ITU-T V.23 protocol standards and is transmitted in a continuous binary pulse frequency shift keying signal with a transmission rate of 1200 bps. Support FSK number display and name display and other functions; the chip contains power failure detection circuit, ringing detection circuit and carrier detection circuit; the signal input detection sensitivity is high, the power supply operating voltage is wide (3 ~ 5.5V), is carried out A good integrated chip for telephone FSK information decoding communication.

In order to realize the reception of telephone FSK information, the P87LPC764 single-chip microcomputer is used to control the SM8220P circuit to complete the work of telephone FSK information decoding and communication. The specific circuit of telephone FK information communication is shown in Figure 3.

It can be seen from FIG. 3 that for the FSK signal transmitted from the telephone line, the signal is transmitted between the first ring and the second ring. The ringing signal is rectified and divided and added to the emitter of the TIL113 photoelectric coupling device, which causes the emitter to pass through and emit light, irradiating the base of the phototransistor, and saturating the phototransistor. Get a pulse signal greater than 1V on R6, input to the external interrupt 0 of the microcontroller, wake the microcontroller to prepare for reception. After 0.5s, the FSK signal undergoes DC-blocking and attenuation of C3, C4, R1, and C2, and is input to the differential input terminals TIP and RING of the FSK receiver SM8220P. After reading and demodulating the FSK signal, the ASCII code string is output from the DOUT pin. The line sequence is received and processed by the P87LPC764 single-chip computer, the corresponding telephone FSK information is extracted, and sent to the multi-function LED display module MAX7219 to drive digital display and 24C64 storage.

4 FSK information receiving communication software design

The recognition process of the serial sequence of ASCII code output by SM8220P by the single chip is composed of two parts: receiving and data integration. Because the baud rate of the FSK signal is 1200bps, the time for each bit sent is 833us, so you can set the timer to receive 1 bit every 833us, and extract a number every 10 bits. This is repeated until the complete FSK message is received. When a call comes, after the first ringing, the MCU starts to detect the received signal, SM8220P starts to receive 300 channel occupancy signals with a frequency of 1200Hz composed of 0 and 1, and 180 "1" flag signals, followed by Receive the calling number and time. Each time a digit is received, the SM8220P converts it into a 10-bit (1PXXXXXXXX0) serial sequence, which is transmitted to the P87LPC764 microcontroller by the 13-pin output. The P87LPC764 integrates its detection and precise FSK number and time after accurate timing programming Data, complete FSK information decoding, receive communication, received phone number can be saved in 24C64 serial E2PROM, can also be output to the LCD display. Pin 11 of SM8220P is used to prompt whether there is new FSK information input on the telephone line. If new FSK information is input, this pin will generate a low level. The single chip microcomputer receives the FSK calling information can use the timed interrupt mode, or it can also use the method of delay query. Phone FSK information receiving communication program flow is shown in Figure 4.

Conclusion

In recent years, China's telecommunications network infrastructure has developed rapidly, and the telephone penetration rate has increased year by year. The survey shows that users urgently need to use the phone to deliver more information. Using the combination of SM8220P and single-chip microcomputer, it is very convenient to realize the decoding and receiving communication of telephone FSK information, and realize the functions of remote automatic meter reading by the telephone network.

Note: See the website for the assembly program of the decoding and receiving communication of the FSK information passed through debugging.

Digital Audio Power Amplifier

Digital Audio,Digital Audio Speakers,Conference Powered Amplifier,Digital Audio Power Amplifier

The ASI Audio Technology Co., Ltd , https://www.asi-sound.com