• Based on 73M2901 long range data transmission system

    The abstract introduces one kind of long range data transmission system. This system is a communications cable state of health observation system’s part, it based on μC/OS-II the software platform, uses LPC2132 to control Modem chip 73M2901, realizes the data long-distance transmission through the telephone line. This plan operation reliable, the cost is low, easy to promote, may widely apply in the industry long-distance monitoring, the intelligence lives, the unattended place and so on each domain.
    Key word μC/OS-II LPC2132 73M2901 long range data transmission

    Introduction
        The long range data transmission system application is widespread, particularly in some special application situation, monitor or controlled member, because is away from far or the scene is quite dangerous, can only to be far away the gathering data transmission the scene the place to carry on the analysis processing, therefore needs one kind to be possible to carry on the long range data transmission the embedded system, in order to realize in the distant place to work system’s surveillance, the control and the trouble shooting, avoids the bad environment creating the harm to the body. This system is a communications cable state of health observation system’s part, communications cable’s working condition long-distance transmission, thus realizes different monitors. This article proposed one kind of volume is small, the weight is light, the cost is low, the implementation is convenient, based on the LPC2132 chip, take the telephone line as the data transmission medium’s embedded application system, has carried on the detailed explanation from the hardware and the software aspect to system’s design, and gives realizes the method specifically.

    1 hardware design
    1.1 system principles
        Like chart l shows, the long range data transmission system by master control LPC2132, Modem chip 73M2901, the RS232 serial port switching circuit is composed. LPC2132 through the UART0 receive communications cable data acquisition meter’s data, after carrying on the CRC verification, issues Modem through UARTl. LPC2132 is Philips Corporation based on 32/16 ARM7TDMI-S essence development micro controller. Because in LPC2132 inlays 64 KB the high speed Flash memories and 16KB internal static RAM, has 2 to conform to the 16C550 industrial standard serial interface, and contains the standard the modem connection signal, therefore very suitable to use for to control the Modem chip to carry on the long range data transmission. 73M2901 is the low power loss which, the low speed, the one piece type modem TDK Corporation promotes, has the very high integration rate, may constitute a facile exquisite embedded remote terminal together with LPC2132.

    1.2 73M2901 chip synopsis
        73M2901 built-in standard 8032 microprocessors and 1 association processor, therefore may also realize many kinds of control functions during processing complex signal’s. Its data terminal selects the asynchronous serial transmission method, most Yamagimachi support 2 400 bps duplex data transfer; In addition, but also supports at set of instructions, its main pin function like table l arranges in order.

        73M2901 by the data terminal connection, the modulation demodulation part and simulates the terminal interface 3 parts of constitutions.
        ①Data terminal connection: The major function is completes data terminal equipment (DTE) and between modem’s connection. the 73M2901 chip provides serial data terminal interface including TXD, RXD, RTS, CTS, DSR, DCD, TXCLK, RXCLK and so on.
        ②Modulation demodulation part: The core modulates the demodulation chip. The Modem overwhelming majority function is realizes by this piece of large scale integrated circuit, including the modulation demodulation process, harasses code Xie Raoma the process, the channel division, the line to be balanced and instruction active status and so on.
        ③Simulates the terminal interface: Including dial pulsing electric circuit, ringing examination electric circuit and tonic train signaling channel 3 parts. May connects through this part of electric circuits Modem and the communications channel.
        ◆ dial pulsing electric circuit: Picks on-hook signal to give by the 73M2901/5V RELAY pin, completes picks on-hook movement. When RELAY sends out the high level is on-hook, sends out when the low level to pick machine.
        ◆ ringing examination electric circuit: Uses in bell class signal which examines the telephone line to send. When in the channel does not have the line signal, 73M290l RING end for invalid high level; When the line signal arrives, RING becomes the effective low level, completes the ringing examination.
        ◆ tonic train signaling channel: The simulated signal transmitting end is 73M2901/5V chip TXAN and the TRAP pin, provides the difference signal output. 73M290l/5V also provides an input pin RXA, RXA end is the non-balanced analog input port, the receive tonic train signaling for the single end to the place simulated signal.
        The analogue interface electric circuit major function is as follows:
        ◇ modem interior balanced circuit and between balanced type communications channel’s transformation;
        ◇ between modem interior four-wire circuit and two communications channel’s transformation;
        ◇ the recognition communications channel transmits the exchange line signal, and transforms it the TTL direct-current level;
        ◇ when digit dialing can send out conforms to the stipulation pulse train or the double sound multi-frequency signal.
    1.3 UARTl serial port transmission
        This system connects directly 73M290l LPC2132 on the UARTl serial port, carries on the data transmission work, interface structure as shown in Figure 2, the UARTl pin functional description like table 2 arrange in order.

        Supposition LPC2132 transmits the data which after the instrument carries on the verification, must through 73M290l to the long-distance computer transmission, LPC2132 and 73M290l takes the calling end, the long-distance computer and standard Modem takes is called the end, then the data sending process is:
        ①The system initialization, causes DTR signal DTR to be effective, then LPC2132 issues the digit dialing instruction to 73M290l, 73M2901 receives the digit dialing instruction backward to call to carry Modem to send out the dial tone, causes to call to carry the Modcm ringing. When the ringing number of times achieves the number of times which the software establishes, Modem the auto answer, enters picks machine the condition.
        ②After being called the end picks machine, one side to the calling end transmission reply carrier, at the same time sends out the DSR signal to this end computer; Is called the end computer then to start to monitor the DCD signal, waits for opposite party intelligence signal the arrival. The calling will carry 73M2901 to examine the reply carrier later to send out the DCD signal to LPC2132, symbolizes that will call successfully.
        ③After calling successfully, the calling carries 73M2901 to send out the DSR signal to LPC2132; After LPC2132 receives this signal, knew that line connection oneself establishes completely, namely sends out the RTS signal to 73M290l. 73M2901 to will be called the end to send out the carrier and returnes the CTS signal, when after the calling carries LPC2132 to receive the CTS signal, indicated that shakes hand successfully.
        ④After being called to carry Modem to examine the intelligence signal which, the calling end sends in sends out the DCD signal, informed to call the end computer data link already to establish.
        ⑤After data link establishment, LPC2132 then may to the computer transmission data.
        ⑥LPC2132 finished backward 73M2901 in the data transfer to issue on-hook order, and sent out the invalid RTS signal; 73M2901 stops issuing the carrier immediately, and returnes the invalid CTS signal. Because is called to carry Modem not to be able to receive the intelligence signal which the calling end sends to cause the DCD signal to be invalid, the computer namely issues on-hook instruction to Modem; After Modem on-hook, the DSR signal is invalid, the reply carrier stops issuing. Because the calling carries 73M290l not to send the carrier not to be able to receive the carrier to cause DCD, the DSR signal to be invalid. Hence, data link demolition. The system is at the readiness for action, waited for that LPC2132 requests the establishment connection once more.

    2 system software designs
    2.1 connection modules
        This system software realizes based on μC/OS-II the platform, uses the ADSl.2 integrated development environment debugging. The entire software system divides into 2 duties, including 4 modules: Data formation module, UARTO serial port receive module, CRC verification module and UARTl Modem connection module. System master routine flow as shown in Figure 3, system’s each duty assigns the CPU resources coordinated by μC/OS-II the nucleus unification.
        When receives and dispatches the data, for the balanced communications cable data acquisition meter, LPC2132 and the 73M290l three transmission speeds, this procedure service data formation takes the data buffer. The data formation uses enters first leaves (FIFO) the first way, its spatial size defines in the project config, h document. Data space’s address is only, and only corresponds a data formation. The data formation subroutine (queue.c) has defined 6 functions. Respectively is: QueueCreate, establishes the data formation; QueueRead, gains in formation’s data; QueueWritc, FIFO way transmission data; QueueFlush, clear spatial formation; In QueueNData. gain formation data number; QuEueSize, gain formation spatial content.

        Because LPC2132 is through 73M2901 to the long-distance equipment transmission data, therefore only needs to compile the Modem transmission subroutine. The Modem correspondence subroutine including 8 functions, respectively is: UARTlInit, initialization UARTl; UARTl_Exception, UARTl interrupt service; GeTModemState, gains the Modem condition; ModemInit, initialization Modem; ModemWrite, transmits many byte data through Modem; ModemCommand, transmits the Modem order; ModemDialUp, adopts the Modem digit dialing; ModemDialDown, hangs up Modem. When system initiation needs to carry on the vectored interrupt initialization to UARTl, namely compiles the initialization routine in the project target.c document.
        LPC2132 transmits AT through UART1 command control Modem the active status, then to MoEdem transmission data. the uARTl concrete working is: The sending signal quantity starting value supposes for the transmission cushion size, and closure transmission interrupt. When transmits the data, the user duty waited for in the signal quantity, if transmission cushion not full, then user duty to transmission cushion turban write data. What if reads in is transmits in the cushion the first byte, then the permission transmission interrupt, then from the transmission cushion takes out the byte output which reads in most early to UART1, this operation has triggered the next time transmission interrupt. So the circulation the last byte is taken until the transmission cushion, closes the transmission interrupt. While to UART1 output’s, for the signal quantity sending a letter number, the transmission duty signal gauge value understands in according to the above the transmission cushion whether to have the space. Data transmission flow chart as shown in Figure 4.

    2.2 CRC verification module
        Signal transmits when the physical channel, the line itself electric appliance characteristic creates the stochastic noise, the signal scope’s weaken, the frequency and the phase distortion, the neighboring line asked the crosstalk as well as each extraneous factor (switch jumps line, outside heavy current magnetic field change and power source’s fluctuation and so on) can create the signal the distortion. In the data communication, will cause the binary number position which and the transmitting end actual transmission binary number position the receiving end will receive is inconsistent, will thus create by “0″ turns “l” or will turn “O” by “l” the mistake. To limit the mistake in as far as possible the small scope, in the data long-distance transmission, widely uses cyclical redundancy check code (CRC). Its code is simple, the miscarriage of justice rate is very low, error detection ability, takes the system resources to be few, can realize with the software and hardware way. The CRC English full title is Cyclic Redundancy Check, the electricity is uses to the information code adds on several bit check code the way to increase the entire coding system’s code distance, strengthens Zha Cuo to correct error ability.
    2.3 μC/OS-II on LPC2132 transplant
        So-called “transplant”, is enables a real-time essence moves on other microprocessors or the micro controller. Must enable the identical essence to be suitable for the different hardware system, must save between the essence and the hardware has an intermediate level, namely and processor related transplant code, this part of codes because of processor, but different. The majority of μC/OS-II codes are compile with the C language, therefore μC/OS-II probability. However, still needed to use the assembly language to compile some with the processor hardware related code, this is when realizes μC/OS-II reads/writes the processor register can only through the assembly language come the feast to be present. In μC/OS-II, this part of codes divide into 3 documents: OS_CPU.H, IS_CPU_A.ASM and OS_CPU_C.C. Therefore, μC/OS-II transplants when needs to the above 3 documents to carry on to LPC2132 in the partially modifies.

    Conclusion
        The LPC2132 hardware source is rich, enables this system to have the volume to be small, the weight is light, cost low status characteristic; Has used the CRC verification, thus enhanced correspondence Zha Cuo to correct error ability. In addition, realizes the software function based on μC/OS-II the platform, causes this systems operation to be stable, maintains conveniently, the promotion is simple.

    Share/Save/Bookmark

No comments yet.

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

TOP
Copyright © 51 Research and Design, Electronic Engineers website - Embedded Systems, MCU, DSP, EDA, Test and Measurement, Components, Communications, Power, Microelectronics, Semiconductors
Powered by WordPress | Theme by mg12 | Valid XHTML 1.1 and CSS 3