【正文】
low, the scheme, the defects of aging and half inductive and all the inductive the two methods are in the former two ways based on increased vehicle detector and according to the information provided to adjust cycle is long and green letter of vehicle, it than random arrived adaptability bigger, can make vehicles in the parking cord before as few parking, achieve traffic flowing effect In modern industrial production,current,voltage,temperature, pressure, and flow rate, velocity, and switch quantity are mon mainly controlled parameter. For example: in metallurgical industry, chemical production, power engineering, the papermaking industry, machinery and food processing and so on many domains, people need to transport the orderly control. By single chip microputer to control of traffic, not only has the convenient control, configuration simple and flexible wait for an advantage, but also can greatly improve the technical index by control quantity, thus greatly improve product quality and quantity. Therefore, the monolithic integrated circuit to the traffic light control problem is an industrial production we often encounter problems. In the course of industrial production, there are many industries have lots of traffic equipment, in the current system, most of the traffic control signal is acplished by relays, but relays response time is long, sensitivity low, longterm after use, fault opportunity increases greatly, and adopts singlechip microputer control, the accuracy of far greater than relays, short response time, software reliability, not because working time reduced its performance sake, pared with, this solution has the high feasibility. 附錄 2 About AT89C51 (1) function characteristics description: AT89C51 is a low power consumption, high performance CMOS8 bit microcontroller, has the 8K in system programmable Flash memory. Use highdensity Atmel pany the beltpassword nonvolatile storage technology and manufacturing, and industrial 80S51 product instructions and pin fully patible. Chip Flash allow program memory in system programmable, also suitable for conventional programmer. In a single chip, have dexterous 8 bits CPU and in system programmable Flash, make AT89C51 for many embedded control application system provides the high flexible, super efficient solution. AT89C51 has the following standard function: 8k bytes Flash, 256 bytes RAM, 32bit I/O mouth line, the watchdog timer, two data pointer, three 16 timer/counter, a 6 vector level 2 interrupt structure, fullduplex serial port, piece inside crystals timely clock circuit. In addition, AT89C51 can drop to 0Hz static logic operation, support two software can choose power saving mode. Idle mode, the CPU to stop working, allowing the RAM, timer/counter, serial ports, interruption continue to work. Power lost protection mode, RAM content being saved, has been frozen, microcontroller all work stop, until the next interruption or hardware reset so far. As shown in figure 1 for the AT 89C51 pins allotment. P 1 . 01P 1 . 12P 1 . 23P 1 . 34P 1 . 45P 1 . 56P 1 . 67P 1 . 78R S T/ V p d9(R X D )P 3 .010(T X D )P 3 .111(IN T0 )P 3 .212(IN T1 )P 3 .313(T 0 )P 3 .414(T 1 )P 3 .515(W R )P 3 . 616(R D )P 3 .717X T A L218X T A L119E N D20P 2 0 (A 8 )21P 2 1 (A 9 )22P 2 2 (A 1 0 )23P 2 3 (A 1 1 )24P 2 4 (A 1 2 )25P 2 5 (A 1 3 )26P 2 6 (A 1 4 )27P 2 7 (A 1 5 )28P S E N29E A /V p d31A L E/ P R O G30P 0 . 7 (A D 7 )32P 0 . 6 (A D 6 )33P 0 . 5 (A D 5 )34P 0 . 4 (A D 4 )35P 0 . 3 (A D 3 )36P 0 . 2 (A D 2 )37P 0 . 1 (A D 1 )38P 0 . 0 (A D 0 )39V C C40 Figure 1 the AT89C51 pins allotment (2) interrupt introduction AT89C51 has six interrupt sources: two external interruption, (and), three timer interrupt (timer 0, 1, 2) and a serial interrupts. Each interrupt source can be passed buy bits or remove IE the relevant special register interrupt allow control bit respectively make effective or invalid interrupt source. IE also includes an interrupt allow total control bit EA, it can be a ban all interrupts. IE. Six is not available. For AT89C51, IE. 5 bits are also not be used. User software should not give these bits write 1. They AT89 series for new product reserved. Timer 2 can be TF2 and the T2CON registers EXF2 or logical triggered. Program into an interrupt service, the sign bit can be improved by hardware qing 0. In fact, the interrupt service routine must determine whether TF2 or EXF2 activation disruption, the sign bit must also by software qing 0. Timer 0 and 1 mark 附錄 3 a timer TF0 and TF1 has been presented in the cycle count overflow S5P2 074 bits. Their value until the next cycle was circuit capture down. However, the timer 2 marks a TF2 in count overflow of the cycle of S2P2 074 bits, in the same cycle was circuit capture down (3) external clock driving characteristics symbols parameters minimum The maximum unit 1/TCLCL OscillatorFrequency 0 24 MHz TCLCL Clock Period ns TCHCX High Time 15 ns TCLCX Low Time 15 ns TCLCH Rise Time 20 ns TCHCL Fall Time 20 ns Table 1 (4) leisure and power lost pattern external pins state mode Program memory ALE ^psen Port0 Port1 Port2 Port3 idle internal 1 1 data data data Data Idle External 1 1 float Data data Data Power down Internal 0 0 Data Data Data Data Power down External 0 0 float data Data data Table 2 About 8255 chip features: (1)A parallel input/output LSI chips, efficacy of I/O devices, but as CPU bus and peripheral interface. (2)It has 24 programmable Settings of I/O mouth, even three groups of 8 bits I/O mouth to mouth, PB mouth and PA PC mouth. They are divided into two groups 12 I/O mouth, A group including port A and C mouth (high four, PC4 ~ PC7), i