P87LPC767 microcontroller and its application in micro-power intelligent positioner

Publisher:CelestialSoulLatest update time:2006-12-11 Source: 互联网 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Pin arrangement and main features of P87LPC767

P87LPC767 is an OTP series microcontroller launched by PHILIPS Semiconductor Company. It adopts a 20-pin package and can provide high-speed and low-speed crystal oscillator and RC oscillator modes. The clock can also be selected through software programming. This microcontroller has a wide operating voltage range, and the output mode of the I/O port can be selected through control register programming. It contains a digital watchdog circuit and I2C bus. Its two internal analog comparators can form an 8-bit A/ The D and D/A converters have both power-on reset detection and under-voltage reset detection functions, and the driving current of its I/O port can reach 20mA. The P87LPC767 adopts the 80C51 acceleration processing structure. The instruction execution speed is twice that of the standard 80C51 MCU. The temperature range is -40~+85℃. The microcontroller itself has excellent electromagnetic compatibility and inherits the PHILI PS semiconductor’s low power consumption and undecipherability and other characteristics. Figure 1 shows the pin diagram of the P87LPC767 microcontroller. The main features of this chip are as follows:

●Using 20-pin DIP and SO packages to meet the needs of different users

●The clock frequency can reach up to 20MHz. In addition to multiplication and division instructions, its accelerated execution time can be increased to 300~600ns.

●Contains 4-channel multi-channel 8-bit A/D converter. When the oscillation frequency fosc is 20MHz, the conversion time is only 9.3μs.

●Extremely wide voltage applicable range. When used for digital functions, the operating voltage range is 2.7~6.0V.

●Contains 4k bytes of OTP program memory and 128 bytes of RAM. There is also a 32Byte user code area that can be used to store serial codes and set parameters.

●Contains two 16-bit timers/counters. Each timer can be set to trigger the corresponding port output mode when it overflows. It contains 2 analog comparators internally.

●With full-duplex universal asynchronous receive/transmit (UART) and I2C communication interface, and has 2 external interrupt inputs and 8 keyboard interrupt inputs as well as 4 interrupt priority levels.

●With internal digital watchdog circuit, the watchdog timer uses an on-chip independent oscillator to work. Since no external components are required, it can be used for oscillator failure detection. There are 8 selection methods for the watchdog overflow time.

●Has two reset modes: low level and low voltage. In low-level reset, it can be reset by on-chip power-on without external components; in low-voltage reset, one of the two preset voltages can be selected to reset, and the system can be safely shut down when power is lost. . In addition, it can also be configured as an interrupt source.

●The programmable I/O port output mode has quasi-bidirectional port, open-drain output port, pull-up and input port modes, and the Schmitt trigger input mode can be used to control the port line output conversion speed to reduce EMI. All I/O lines have 20mA drive capability.

●It can be programmed online through serial EPROM, and there is a 2-digit E-PROM security code to prevent the program from being read out.

●With low power consumption function, when the voltage is 3.3V and the frequency is 20kHz~100kHz, the quiescent current is only 9~44μA. It also has two power-saving modes: idle and power-down, and has a power-down wake-up function.

2 Main functions of P87LPC767

The P87LPC767 itself has a variety of functions. Figure 2 shows the logic symbol diagram of the device.

2.1 Enhanced MCU

Since the P87LPC767 microcontroller adopts the 80C51 acceleration processing structure, the running speed is 2 times that of the standard 80C51. This means that the performance of the P87LPC767 at 10MHz is the same as that of the standard 80C5 1The performance is the same when using 20MHz. One of its machine cycles consists of 6 oscillation cycles, and the execution time of most instructions is 6 or 12 oscillation cycles. Therefore, the standard 80C51 MCU timing can be selected through the internal register to turn one machine cycle into 12 oscillation cycles.

2.2 Configurable simulation functions

P87LPC767 integrates 1 A/D converter, 2 analog comparators and 2 D/A converters. Therefore, in order to improve performance and reduce power consumption during use, the internal registers PTOAD and The corresponding bits of PXM1 and PXM2 are used to turn off the digital signal input (except DAC output pin) and output function of the analog function pin.

2.3 A/D converter

The P87LPC767 has a four-channel 8-bit A/D converter inside. Four P0 ports can be selected as inputs for A/D conversion. The power supply and reference voltage of its A/D conversion share VCC and VSS with the MCU. The minimum operation of A/D conversion is 3V. The connection method of A/D converter is shown in Figure 3.

The A/D converter includes a 4-analog multiplexer selector and an 8-bit successive approximation ADC. The A/D also has a ratio potentiometer to ensure the monotonicity of the DAC. The A/D converter can be controlled by the special function register ADCON, and the A/D can be enabled by setting the ENADC bit, and the A/D conversion can be started by setting the ADCS bit. After the A/D conversion is completed, the ADCS bit is cleared, the interrupt flag ADCI is set, and sampling is performed through query or interrupt mode. At the same time, when the conversion is completed, the result is placed in DAC0. The ideal A/D conversion result (V) is as follows:

V=(VIX-VSS)×256/(VDD-VSS) (round the result)

2.4 I2C bus interface

The I2C bus of P87LPC767 transmits information between the bus and the device through two lines (SDA and SCL). When transmitting information, the bus has the characteristics of bidirectional transmission of data between master and slave devices, serial addressing of slave devices, generation of response bits after each byte is transmitted, and arbitration when multiple hosts transmit at the same time to avoid data conflicts on the bus.

The I2C bus system includes an I2C bus hardware that simplifies software drivers. In addition to the necessary bus arbitration, framing error detection, clock stretching, and bus timeouts, cyclic polling and interrupts are available through a one-bit interface to synchronize the software.

2.5 Interruption

P87LPC767 has four priority interrupt structures, which provides great flexibility for P87LPC767's multi-interrupt source processing. The P87LPC767 can support up to 13 interrupt sources. Any interrupt source can be individually enabled or disabled by setting or clearing the corresponding bits in IEN0 and IEN1. Each interrupt source can be achieved by clearing or setting the corresponding bit in IP0, IP0H, IP1, IP1H (00 is the lowest, 11 is the highest). Peer interrupts can be handled through the query sequence of the arbitration queue.

P87LPC767 allows some or all pins of port 0 to be enabled as keyboard interrupts, and this can be achieved by setting the corresponding bit in the internal special function register KBI. When the KBI interrupt function is turned on, any enabled pin pulled low will set the keyboard interrupt flag (KBF) in the AUXRI register. Since human operation has mechanical delays in time resolution accuracy and key switch closure, the KBI feature is usually used to poll port 0 of the interrupt service program in turn to determine which key was pressed, and sometimes even determine whether Wakes the processor from low-power mode.

3 Applications of P87LPC767

According to the P87LPC767 microcontroller, it has strong anti-interference ability, wide temperature adaptability range, contains high-quality A/D converter, can provide enhanced MCU, can set the analog function, powerful keyboard interrupt function and micro-power consumption, etc. Combined with the technical requirements of the intelligent positioning controller, the author designed a two-wire micro-power intelligent positioner based on the P87LPC767 microcontroller to replace the positioner with a nozzle-baffle force balance structure, thus improving the automation level of the system and reducing the cost. Reduces the work intensity of operating personnel. The circuit schematic diagram of this two-wire micro-power intelligent positioner is shown in Figure 4.

The positioner uses the 4-20mA signal provided by the control room safety barrier (AQS) to provide power to the positioner through a voltage stabilization and signal conversion circuit. It also provides input signals to the positioner and sends them to the AD1 port. When the position signal (FW) detected by the position detector is sent to the AD0 port, it is sampled and processed by the microcontroller. At the same time, the output control signal is sent to the multiplexing switch. Finally, the pneumatic execution can be controlled by the micromotor (WXMD). mechanism to achieve position control.

4 Conclusion

Since the power supply of the positioner is provided by the output current of the safety barrier, its load capacity is limited. In order to make the micro motor and multiplex switch of the positioner operate reliably, in addition to selecting low-power consumption devices, the number of peripheral chips should also be minimized. Quantity, because the P87LPC767 has an internal A/D converter, comparator and extremely strong I/O port driving capability, and has good temperature characteristics. Therefore, it can be used to solve some technical problems and greatly improve reliability.

Reference address:P87LPC767 microcontroller and its application in micro-power intelligent positioner

Previous article:P87LPC767 microcontroller and its application in micro-power intelligent positioner
Next article:Application of light touch switch circuit in AVR microcontroller

Recommended ReadingLatest update time:2024-11-17 02:30

High-precision zero detector using a dedicated comparator IC
High-precision zero detector using a dedicated comparator IC Function of the circuit This circuit is also called a zero-crossing detector. It is independent of the signal amplitude and uses the moment of crossing zero voltage to obtain a pulse output. Even if the signal is not pe
[Analog Electronics]
High-precision zero detector using a dedicated comparator IC
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号