Synchronous modem controlled by TMS320F206

Publisher:创新之星Latest update time:2006-05-07 Source: 电子技术应用 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

    Abstract: This paper introduces a synchronous modem designed using digital signal processor TMS320F206 and modem chip RC56D/SP. The modem-demodulator can realize synchronous transmission of data on a variety of channels and has a wide range of uses.

    Keywords: Modulation, Demodulation, Synchronous Digital Signal Processing

With the development and popularization of data communications, the application range of modems is becoming wider and wider. To sum up, whenever analog channels are needed to realize data transmission, a modem needs to be used as a DCE to complete the connection between the DTE and the line. In many situations, such as when transmitting various automation information through a power line communication private network, synchronous transmission is required. However, currently commercially available modems only support asynchronous communication. In response to this situation, we developed a synchronous modem. The modem uses the RC56D/SP modem chipset that supports synchronous communication to complete the modulation and demodulation function, and uses the TMS320F206 digital signal processor to implement relevant intelligent control.

1 Introduction to RC56D/SP and TMS320F206

RC56D/SP is a 56k modem chip produced by Conexant (formerly Rockwell). RC56D/SP includes an 8-bit microcontroller (MCU) and a data pump (MDP), which completes operations by executing firmware solidified in 1Mbit (128K×8) RAM and 2Mbit (ROM/Flash ROM). The device uses TCM Grid coding technology, compatible with AT commands, supports V.42 Modem Link Access Protocol (LAPM) and MNP10 error correction protocol, and supports V.80 synchronous transmission protocol. In synchronous mode, the sending clock can use internal, external and slave There are three clock modes, and the built-in phase-locked loop has a clock extraction function. It can extract a clock signal from the received synchronous data stream that is completely in the same frequency and phase as the peer's sending clock as the receiving clock for itself and the DTE. The chip can support up to 33.6 K/s synchronization rate.

TMS320F206 has a CPU clock frequency of 20MHz, rich on-chip and on-chip resources, and powerful asynchronous and synchronous serial ports.

Its asynchronous serial port has full-duplex transmit and receive operations with maximum transmission rate. Data transmission is completed through the transmit pin (TX) on the transmitter and the receive pin (RX) on the receiver. The four I/O ports IO0~IO3 can be configured as handshake control signals through the asynchronous serial port control register (ASPCR) to improve signal transmission quality.

The transmission and reception of its synchronous serial port involve a 4-level first-in-first-out (FIFO) buffer. FIFO buffers reduce CPU unlocking (while sending or receiving data) by reducing the number of send or receive interrupts that occur during a transfer. The operating clock for the synchronous serial port can be generated internally or come from an external clock source. When using the internal clock mode, the maximum rate of send and receive operations is the CPU clock frequency divided by 2. When using an external clock source, the data transfer rate will vary with the external clock source.

The data sending and receiving operations of the synchronous serial port must be started with the corresponding sending frame synchronization pulse (FSX) and receiving frame synchronization pulse (FSR). FSX can be generated both internally and externally. The FSR must be generated externally.

The synchronous serial port has two operating modes, continuous and burst, to support a range of applications. In continuous mode, only one frame synchronization pulse is needed to continuously send or receive multiple software packets; in burst mode, only one 16-bit single word is allowed to be sent or received after each frame synchronization pulse. The continuous transmission timing with internal frame synchronization and the continuous reception timing with external frame synchronization are shown in Figure 1(a) and Figure 1(b) respectively.

The synchronous serial port has two hardware interrupts, transmit interrupts (XINTs) and receive interrupts (RINTs), which notify the processor that the FIFO buffer needs service. By appropriately setting the interrupt generation conditions, data can be sent and received continuously.

2 Hardware circuit design and working principle

The system hardware circuit principle block diagram is shown in Figure 2. The modem adopts the working mode of asynchronous connection and synchronous transmission, that is, connecting in asynchronous mode, and entering the synchronous transmission state after establishing the connection. Since both TMS320F206 and MCU are TTL levels, they can be directly connected to each other. See Figure 3 and Figure 4 for the specific connections of the asynchronous serial port and synchronous serial port. Modem asynchronous and synchronous data use the same data port on the MCU. Therefore, the data on the MCU sending pin is the data to be sent from the DTE, and the data on the receiving pin is the demodulated peer data, so the asynchronous or synchronous data sending (TXD) and reception (RXD) of the TMS320F206 ) pins are connected accordingly. Since the MCU asynchronous function is only used for modem setting and connection, the flow control function does not need to be used, that is, the handshake signal does not need to be used. Therefore, connect the RTS and DTR pins of the MCU to ground to make it effective for a long time.

TMS320F206 data transmission uses external clock, internal frame synchronization and continuous mode. Reception uses external clock and connection mode, and the receiving frame synchronization pulse is generated by MCU control. When the modem establishes a connection and the MCU receives the first frame of data, it will control the pulse forming circuit to generate a single pulse with the same pulse width as the synchronous reception clock cycle to start the TMS320F206 to receive data. Since the system also sends a monitoring signal to protect the connection status when there is no useful data, data reception will not stop once it is started unless it is interrupted. The transmit clock (TXCLK) and receive clock (RXCLK) of TMS320F206 are both provided by the modem.

The modem transmission clock is divided into three modes: internal, external and slave clock. They can be set through the AT&X0 (1, 2) command. When set to the internal clock, the modem transmit clock is provided by the modem chip's internal oscillation circuit. The internal oscillation circuit can generate any nominal frequency between 300 and 56kHz. When using the external clock mode, the external clock It is sent to the MCU and TMS320F206 as a synchronous transmission clock. Because the MDP internal phase-locked loop can only be locked at any nominal frequency, the XTCLK frequency must be any nominal frequency between 300 and 33.6kHz. When using the slave clock mode, the modem will use the clock extracted from the received data stream as the sending clock, that is, the local sending clock is the same as the opposite sending clock. This modem transmits using an external clock.

The modem synchronous reception clock is provided by the local MDP. MDP can extract the clock signal RXCLK from the receiving data stream that is exactly the same as the peer sending clock, and use it as the receiving clock for itself, MCD and TMS320F206.

3 Modem working mode settings

The modem's default mode of operation is heterogeneous mode. If you want to make it enter the synchronous working mode, you must set it through AT commands. The AT commands we use to set the synchronization mode are as follows: +ES, +ESA, &Q1 and &X1. The +ES command is used to enable or disable synchronous transmission mode. The +ESA command is used to set some related characteristics of the synchronous transmission mode, such as whether to use cyclic redundancy code check, whether to use inverted non-return to zero code transmission, etc. The &Q1 command is used to control the modem to use asynchronous connection and synchronous transmission mode, that is, the modem connects in an asynchronous mode, and once connected, it immediately enters the synchronous transmission mode. The &X1 command is used to select an external clock as the modem transmit clock.

The modem connection process varies depending on the system application. When transmitting over the public switched telephone network, the modem can connect via auto-answer. At this time, the modem is divided into the calling end and the called end. When the calling party initiates a call, it dials the called party's user number. The called end modem starts the answering process by detecting the ring current. The called end's automatic answering mode can be started through the ATS0=N (N=1...255) command, where N represents how many ring current signals are detected to start the answering process, N =0 disables the automatic answering function.

When the system does not transmit through the public telephone switching network, there is no ring signal on the line, so the pseudo-automatic answering method is used. The so-called pseudo-automatic response method means that the DSP program controls the modem to respond, rather than the modem itself initiating the response process. The implementation principle is as follows: Design a dual tone multi-frequency (DTMF) signal tone detection circuit at the called end line port. When the calling end initiates a call, it only needs to dial any DTMF number, and the signal tone detection circuit detects the signal. After the tone, a square wave pulse signal is generated to trigger the INT1 interrupt of TMS320F206. After entering the interrupt service routine, TMS320F206 sends an ATA (forced answer) command to the modem, thus starting the response process and establishing a connection with the opposite end modulator. Because there is no dial tone on the line, and the default state of the modem after reset requires the switching equipment to provide dial tone before dialing, the ATX1 command must be added when initializing the calling end modem. This command enables the modem to dial directly without requiring a dial tone. Modem dialing operations can be performed through the ATD*** (*** represents the dialed number) command.

4 System workflow

The TMS320F206 program flow chart is shown in Figure 5. The system workflow is as follows: After the system is powered on and reset, TMS320F206 first initializes, opens the asynchronous port, and then detects whether the modem is ready. If it is not ready, reset the modem again; if it is ready, send an AT command to enter the modem and initialize the modem. That is, name the modem synchronization port, set the modem to asynchronous connection and synchronous transmission mode, use an external clock and set the synchronous transmission mechanism, transmission rate and other related characteristics. At the same time, it is decided whether the calling end adds the ATX1 command and what response method the called end uses. Each time the modem receives the correct AT command and performs the corresponding operation correctly, it will send back an OK signal through the asynchronous serial port. Therefore, if TMS320F206 receives the OK signal, it indicates that the initialization is successful. After the modem initialization is completed, the calling end dials a number to start the call, and the called end enters the automatic answering or pseudo-automatic answering process. After connection, the modem will send CONNECT information back to TMS320F206. After that, TMS320F206 disables the asynchronous port, opens the synchronous port, and starts synchronous data transmission.

After the development of this synchronous modem, synchronous transmission tests were conducted on dedicated lines, public telephone lines and power carrier lines, and relatively good transmission effects were obtained. This modem will have a wide range of uses when it is necessary to use analog channels to complete synchronous transmission services, especially at the access layer.

Reference address:Synchronous modem controlled by TMS320F206

Previous article:TLV32AC56/57 audio signal processor
Next article:Design of ECG monitoring module based on DSP

Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号