Development of ARM Processor-based PC/104 Processor Module

Summary PC/104 is a bus defined specifically for embedded applications. This article describes a PC/104 module based on the LPC2129 ARM processor. It introduces the basic structure, bus technology, serial communication interface and driver for the development of PC/104 processing module using ARM processor. It is an ARM processor in PC. The application in the field of /104 provides a new way of thinking.

PC/104 is a bus defined specifically for embedded applications. It is defined by IEEE-P996 1EEE. The signal definition and PC/AT are basically the same, but the gas and mechanical specifications are completely different and they are optimized. Small, stacked structure embedded system. Modules based on PC/104 structure have a wide range of applications in the field of industrial control due to their ease of development, rich variety, and simple structure.

ARM (Advanced RISC Machine) was founded in the 1990s and is a joint venture between Apple Computer, Acorn Computer Group and VLSI Technology. ARM pioneered the CHlPLESS model. The company only designed an efficient ARM core. By licensing the ARM core to semiconductor companies, the semiconductor company formed a complete set of peripheral functions, such as Flash and serial RTC, based on the actual application conditions. chip.

This article mainly introduces the structure of the ARM-based PC/104 module, and gives the bus simulation, serial communication interface and driver related content.

1 PC/104 processor module requirements

In industrial control and data acquisition, the bus and serial port functions of the PC/104 module are indispensable, while the hard disk interface, parallel port, and keyboard port are rarely used, so the alternative CPU is used instead of x86 as the PC. The device of the /104 module is required to be compatible with the original PC/104 bus first, so that the digital input/output modules, analog input/output modules and pin PC/104 systems developed in accordance with the PC/specification can be used normally. Second, the processor must have two serial interfaces to accommodate serial communication needs for most applications. Three, must have sufficient program space and RAM space for the user's sequence and data usage; Fourth, must have RTC (Real Time Clock), which can keep the system time unchanged when the power is off; Fifth, the friendly development environment to meet the needs of the current system development.

2 Disadvantages of Inte1386SX-based PC/104 Modules

First of all, the cost of the 386SX-based PC/104 processor module is priced at more than a thousand dollars compared to the 386SX/40 control module; second, the power consumption of larger watts brings a series of designs to the power supply and heat dissipation design. Problems and applications that do not meet the requirements of certain low-power consumption environments. Third: Programs are cumbersome. The processor module of the base x86 PC/104 generally uses DOC (Disk On Ch or DOM (Disk On Module) as program memory. Because DOC uses burning tools more expensive, so the actual production of more than the use of artificial burning methods including formatting, copying multiple steps, each burning a chip need to power off, restart the device several times, inefficient, cumbersome operation; Fourth, the system startup speed is slow, it usually takes 2-3 seconds to start executing the user program from power-on, and the recovery time is long when the WDT overflows, and it is easy to miss some important events.Fifth, the development environment is not friendly enough, based on 386SX PC/ The program of 104 processor module is generally developed in DOS environment, the development tool is generally TURBO C or BORLAND C, the development environment is relatively backward, programming, debugging is very inconvenient.

3 ARM processor features

First of all, fast, ARM is a processor based on RISC architecture. The processing power of an ARM processor running at 44 MHz can be as large as 40 MlPS, which is much larger than 13 MIPS based on the CISC architecture 386SX/40. Second, the power consumption is very low. Example LPC2129 The core consumes only 30mA (the supply voltage is 1.8V, the clock is 60MHz), the power consumption is 54mW, which is less than one-tenth of that of the 386SX. Third, the integration is high and powerful, and many world famous semiconductor manufacturers Both have purchased the ARM core and launched chips that integrate rich peripheral functions including SRAM, RTC, CAN interface, serial port, Ethernet interface, etc. according to the needs of the market. In many applications, an ARM chip can meet all the requirements. Need; Fourth, low prices, ARM chip manufacturers a lot, in the industrial control and civilian products are also widely used, the chip price is very low, with 128KFLASH PHILIPS LPC2104 market price is only 50 yuan.

4 CPU selection

After comparison of various CPUs such as 80186, X51, ARM, and DSP, it was finally determined that ARM was used as an alternative processor to the PC104 processor module, in order to be compatible with the original PC/104-based board. After comparing several ARM products, the final decision was made to use PHILIPS LPC2129 as the CPU of the PC/104 processor module developed this time. The LPC2129 is based on a 16/32-bit ARM7TDM1-S CPU that supports real-time emulation and tracking and has a built-in 256K byte (KB) high-speed Flash memory. The 128-bit wide memory interface and unique acceleration architecture allow 32-bit code to run at the maximum clock rate (60 MHz). LPC2129 uses a tiny TQFP-64 package with very low power consumption, 2 serial ports, multiple 32-bit timers, 4 10-bit ADCs, 2 CAN, PWM channels, 46 GP10 and up to 9 externals The interrupt makes it particularly suitable for the development of CPU modules in the field of industrial control.

5 system structure

The ARM-based PC/104 system is mainly composed of a processor, a bus interface, a flash, a real-time clock, a reset circuit, a communication interface, a debugging interface, and a power supply, as shown in FIG. 1 .

6 Hardware Design

6 1 bus section

One of the keys to the development of this module is the interface of the PC/104 bus, including the control bus, address bus, and data bus. A dedicated 3 3V/5V level shift chip 74LVC4245 is used to ensure high-speed interconnection of different level circuits. 74LVC4245 is An A8 8-bit bus transceiver and level shift between 5V and 3.3V systems.

The address bus, data bus, and control bus can use buses such as PHILIPS LPC2292 with an extension bus ARM processor, and can also use the free pin line simulation of the P0 port and P1 port of the LPC2192 ARM processor level shift transceiver. In the bus simulation, due to the multiplexing of the P0 port pins and extension functions, it is difficult to select continuous IO pins for the address bus and data bus. When writing the bus driver program, the CPU can only handle the shift instructions flexibly:

Void outportb(unsigned int portAdd ress, unsigned char value)

{

Addr=(portAddress<<1O): // Move the address to the right by 1O bit

a=(value << 21): //Using two shifts to compose an 8-bit data

b=(value<<23).

a=(a& Ox01eO0000); // mask indifferent bits

b=(b& O×78OOOOOO):

Data=(a I b):

}

6_2 serial communication

Serial communication is a very important communication method in industrial control. The original x86 PC/104 processor module contains two RS23 interfaces with Modem interfaces. Since the full-featured Modem interface is rarely used in practical applications, the development is in progress. The number of handshaking related to the Modem communication in the RS232 interface is omitted, including the signals of RTS, DCD, CTS, RI, DTR, and DSR. The six handshake signals only hold three signals of RXD, TxD, and GND. The socket is still used on the interface with a double-row pin, and the pin arrangement is also according to the DTE (Digital Terminal Equipmen's standard setting) to achieve full compatibility with the original 386S×/40 PC/104 processor block.

Due to the omission of the relevant signals of Modem communication handshaking, it is possible to use the MAX3232 1TTL/RS232 level conversion chip to realize the interface of two serial ports, and has been verified in practical use.

6.3 drivers

In order to be compatible with the existing system to reduce the workload of software migration, the bottom driver is fully considered in compiling the underlying driver program compatible with the underlying driver of the DOS development environment. Unsigned char in portb (unsigned int portAddress) and void outportb (unsigned int portAddress.unsigned char value) two functions: void outportb (unsigned int portAddress, unsigned char value)

{

}:

Unsigned char inportb(unsigned int portAddress)

{ll_

}

In this way, the original source code of the program developed under Dos does not need to be modified. It only needs to be recompiled on the ARM development platform.

7 Conclusion

Replacement of the 386SX PC/104 processor module with the ARM processor first significantly reduces the cost. After the module is put into use in a company's loop detector, the unit production cost of the product is greatly reduced, and the maximum utilization is also achieved. Previous developments. Second, the power consumption is greatly reduced, the power consumption of the CPU module is reduced from the original 8W to the current 1W; and third, the program is easily burned, and the program can be directly downloaded through the JTAG port or the string El, which is very convenient. Fourth, the start-up speed is accelerated, the system startup time is less than 0, 5 seconds, which is far less than the 2-4 seconds of the 386SX-based PC/104 processor. Fifth, the execution speed is accelerated, and the time for completing all tasks is shortened from 2 ms to 0. .5ms, speed increased by about 4 times; sixth, the development platform is more friendly, 386SX-based PC/104 module development under D0S, development tools generally use TURBO C or BORLAND C, ARM development uses WDSD under ADS (ARM Developer Suite) is developed and can be easily traced and debugged online.

The vehicle detector using PC/104 processor of LPC2129 CPU was successfully put into use in the West Lake Tunnel and Jiuyishan Tunnel of the National Intelligent Transportation System Demonstration Project of the National “Tenth Five-Year Plan” scientific and technological breakthroughs. It was accurately, timely, and reliablely collected. Road traffic information such as the speed, flow, and lane occupancy of the tunnel has achieved good social benefits.

For more information, please visit: http://

Other Flashlight

Asia Leader Import & Export Co., Ltd. , http://www.nbflashlight.com

Posted on