Abstract: For to parameters and so on hydraulic equipment’s speed, pressure, current capacity carries on the online examination, we have independently designed a set of hydraulic pressure project synthesis gathering system. This system uses new monolithic integrated circuit C8051F020 to carry on the data multichannel gathering and A/D transforms, and outputs the large screen LCD colored liquid crystal to carry on demonstrations and so on data, curve, histogram; Meanwhile delivers through the RS-485 communication the data the superior machine, thus has realized to hydraulic equipment’s long-distance real-time monitor.
Key words: C8051F020, the multichannel, liquid crystal display, serial communication
1. foreword
Needs to carry on gathering in the industrial control to each kind of parameter, namely the use signal gathering system carries on each kind of data acquisition computer in the real-time processing. The sensor is playing the middle bridge role, but it outputs the signal often is the very weak electric current signal, needs transforms the voltage signal after the enlargement to be able to input to A/D in carries on the data acquisition. Moreover, along with test technology unceasing development, to adapt requests and so on digitization, high efficiency, monolithic integrated circuit’s application is also getting more and more widespread in the industry test system, it has real-time and the reliable high merit, and demonstrates the huge superiority day by day. This system uses American Cygnal Corporation’s C8051F020 monolithic integrated circuit is the control core, has composed the multichannel data synthesis gathering system, it used the few periphery component to realize to hydraulic equipment’s control.
2.C8051F020 monolithic integrated circuit synopsis
The C8051F020 component is the composite signal system-level MCU chip which integrates completely (SOC), it uses Cygnal the patent CIP-51 micro controller essence, CIP-51 and the MCS-51 set of instructions is completely compatible. It uses the running water line structure, compares the instruction execute speed with the standard 8051 structures to have the very big enhancement. CIP-51 has provided 22 interrupt sources, permits the massive simulations and the digital peripheral device interrupts the micro controller, thus has high carries out the efficiency. Has 64 I/O pins, each port may dispose the push-pull or the drain electrode opening output. C8051F020 the MCU interior has SMBUS/I ² the C connection, two to have enlargement mode baudrate disposition full-duplex UART and an enlargement mode SPI connection, each kind of serial main line uses the hardware to realize completely, can have the interrupt to CIP-51. Its interior has 12 ADC0, this subsystem including 9 channel’s programmable simulation multi-channel selectors (AMUX0), increased the amplifier (PGA0) and 100ksps, 12 resolution approaches in register ADC, ADC to integrate the track maintains gradually programmable the electric circuit and the programmable window detector; 8 ADC1, may dispose the simulation multiway switches including 8 channels (AMUX1), increases the amplifier programmable (PGA1) and 500ksps, 8 resolution approaches register ADC gradually. Two 12 DAC switches, each DAC has the nimble output renewal mechanism, allows the seamless fullness to change and to support the non-vibration output renewal. C8051F020 also has 5 general 16 timers and 5 capture/comparison module programmable counter/timer array.
3. system’s hardware architecture
The multichannel synthesis gathering system take the C8051F020 monolithic integrated circuit as a core, is mainly composed of the following several parts: Data gathering, LCD demonstration and data communication three parts, its hardware diagram like chart 1. The sensor outputs electric current signal after enlargement transformation, delivers to C8051F020 in the internal A/D switch, completes a/d conversion, the data storage, the data processing work in the monolithic integrated circuit interior, finally delivers LCD to demonstrate, simultaneously delivers after the RS-485 connection to the computer, carries on the real-time monitoring by the superior machine.

Figure 1
3.1 data gathering
Select the corresponding sensor regarding hydraulic equipment’s in 8 testing parameters to come to examine, when experiment the selection should the variant sensor achievement test the scene the tool. These select the detecting element outputs is the standard 4-20mA weak electric current signal, the electric current signal passes through the enlargement switching circuit which is composed of LM324 to transform 0-5V the voltage signal input to the C8051F020 simulation input end, as shown in Figure 2, transforms the corresponding digital quantity after the internal integration’s A/D switch. C8051F020 stores 8 group sampling values as the hydraulic equipment scene’s condition the corresponding memory unit.
Figure 2
3.2 LCD demonstrations
In order to cause the data acquisition system exquisite artistic, simultaneously obtains the high performance-to-price ratio, selects DMF-50174 blue screen liquid-crystal display which German other gram company produces, this monitor is 320×240 the lattice type liquid crystal, the graph and the text may demonstrate. The demonstration actuation control chip uses EPSON Corporation’s one kind of high performance LCD controller SED1335. The hardware circuit uses the indirect connection, as shown in Figure 3. Takes SED1335 with monolithic integrated circuit’s P5.0~P5.7 mouth the DB0~DB7 data bus’s input channel. P4.5 selects patches or strips of land as worth saving for seed the signal as SED1335, coordination address signal A0 realizes SED1335 through the data bus receive from monolithic integrated circuit’s instruction and the data. When A 0= 0, P4.6 (WR) =0, P4.7 (RD) = 1, realizes instruction read-in with to read the data from SED1335. When A 0= 1, P4.6 (WR) = 0, P4.7 (RD) =1, is demonstrated that the data read-, this function realizes through the software.

Figure 3
3.3 data communications
Monolithic integrated circuit C8051F020 TX0, RX0 and P0.2 are connected through MAX485 and the superior machine, carry on the serial communication, as shown in Figure 3. P0.2 controls MAX485 the condition or the transmission, with software control. RX0 is monolithic integrated circuit’s serial input end, the receive superior machine through MAX485 the data which transmits to the monolithic integrated circuit. TX0 is monolithic integrated circuit’s serial out-port, through the MAX485 transmission for superior machine.
4 system software designs
4.1 software designs are composed as a whole by two parts: A part is monolithic integrated circuit C8051F020
The master routine design, a part is the LCD liquid crystal display programming. Because programs with the C language
May reduce the procedure the order of complexity, enhances the procedure the readability and the modifiability, therefore is originally soft
Uses C51 to carry on the programming, keil µ the Vision2 compiler carries on the translation.
Master routine flow chart as shown in Figure 4.
4.11 master routines
void main (void) {
long voltage; // voltage take mV as a unit
int i; // circulation counter
WDTCN=0xde; // forbids the watch-dog timer
WDTCN=0xad;
SYSCLK_Init(); // initialization oscillator
PORT_Init(); // initialization data overlapping switch
UART0_Init(); // initialization UART0
Timer3_Init(SYSCLK/SAMPLERATE0); the // initialization timer 3 overflows take the sampling rate
ADC0_Init(); // initialization ADC
AD0EN=1; // permits ADC
EA=1; // permits all interrupts
while(1) {
for (i=0; i<8; i )
{EA=0;
voltage=result[i]; // obtains the ADC value from the global variable
EA=1;
voltage = voltage*VREF0; // computation voltage (mV)
voltage = voltage>>16;
LCD_Disp(); // adjusts the display sequence, the demonstration voltage value
printf (”Channl’%d’ voltage is %ldmV \ n”, i, voltage); // serial port output
}}
5 concluding remark
In the test experiment defines C8051F020 the sampling frequency is 50000Hz, ADC0 supposes for the timer 3 overflow continual transformation patterns, uses the differential motion input mode composes 8 group transformation channels, after the monolithic integrated circuit movement, by the timer interruption carries on the data acquisition.
C8051F020 will gather the data transmits through the RS-485 connection for the superior machine, must maintain consistent in the transmission period baudrate with the PC machine establishment baudrate, otherwise cannot receive correctly. In the measuring process, the overall system work is stable, the data may obtain “” the real-time demonstration.
This article author’s innovation is can the hydraulic system parameter in power P real time display, but in the former hydraulic pressure graphic display device can only demonstrate separately the liquid pressure p and current capacity q, then uses formula P=pq to calculate the hydraulic pressure power again, is quite troublesome; Moreover the C8051F020 chip integrated the massive peripheral devices and the IO mouth resources, when designs the system, only need use the function which the few periphery chip then may complete needs, simplified the hardware circuit design, has saved the circuit wafer space, reduced the product volume, thus this system has the very broad application prospect.
Reference:
1. C8051F020/1/2/3 composite signal ISP FLASH micro controller data book
2. Bao Kejin, C8051F monolithic integrated circuit principle and application, Beijing, Chinese Electric power Publishing house, 2006.1
3. Tong Changfei, C8051F series monolithic integrated circuit development and C language programming, Beijing, Beijing University of Aeronautics and Astronautics Publishing house, 2005.1
4. The Song prestige, realizes the intelligent temperature measurement system based on C8051F SMBus, micro computer information, in 2005 the 12-2nd issue, page number: P44-46
5. A day blesses, based on monolithic integrated circuit’s multi-channel signal asynchronous gathering technology, micro computer information, in 2006 the 4-2nd issue, page number: P44-45