Microcontroller Minimal System-Based on LPC1114

Microcontroller Minimal System Overview

A microcontroller, also called a microcontroller (MCU), is a digital logic control device with a complex internal circuit. According to the principle of single-chip microcomputer, the normal operation of single-chip microcomputer requires some conditions. We call the most basic circuit composition that meets the work of single-chip microcomputer as the minimum system of single-chip microcomputer.

Introduction to LPC11C14 MCU

The ARM Cortex-M0-based LPC111x/LPC11Cxx series microcontrollers are low-power, 32-bit microcontroller family members for 8- and 16-bit microprocessor applications, featuring high performance, low power consumption, and a simple instruction set. Advantages such as unified addressing and addressing, and, compared to the 8/16-bit architecture that exists in the market today, it effectively reduces the code size.

The LPC111x/LPC11Cxx series microcontrollers can operate at frequencies up to 50MHZ.

The peripheral components added to the LPC111x/LPC11Cxx series microcontrollers include: up to 32KB of flash memory, 8KB of data memory, an enhanced fast mode (FM+) I2C interface, an RS-485/EIA-485 standard universal asynchronous serial transceiver , two SPI interfaces with SSP features, four general-purpose timers, a 10-bit ADC and 42 GPIO pins.

The on-chip C_CAN driver and flash in-system programming tools are connected to the LPC11Cxx through C_CAN, and the LPC11C2x also includes an on-chip CAN transceiver.

The basic composition of the minimum system

There are many types of single-chip microcomputers, and different models of single-chip microcomputers from different companies have different circuit designs. Therefore, when using a single-chip microcomputer, you must first obtain the datasheet and user manual ( User Manual ) of the single-chip microcomputer. The single-product machine used in this article is the LPC11C14 microcontroller designed and developed by NXP (NXP), which belongs to the LPC11xx series. It adds a CAN bus functional unit on the basis of LPC1114, and the basic pin layout and other internal functions are basically maintained. Consistent. ![ LPC11C14 Minimum System Schematic]

According to the data sheet and user manual of the chip, the minimum system composition of the LPC11C14 microcontroller is as follows:

  1. power supply

    A single-chip microcomputer is a digital logic device that requires power supply during operation. Among many microcontrollers, different microcontrollers have different power supply voltages. For example, traditional 51 microcontrollers are mostly 5V or 3.3V, but most microcontrollers can work normally within a certain voltage range. For example, Hongjing Company released in November 2008. In the STC12 series microcontroller data manual, the voltage range of the STC12C series microcontroller is 3.3~5.5V; the voltage range of the STC12L series microcontroller is 2.2~3.6V.

    For LPC11C14, according to the chip manual, it can be known that the operating voltage range of LPC11C14: 1.8V~3.6V

    It can be seen in the chip manual that the two pins 8 and 44 of the chip are the positive input pins of the power supply, and these two pins are respectively connected to the voltage regulator inside the chip, the peripherals inside the chip and the ADC function unit. Used to power the chip.

    5. The two pins of 41 are the ground pins of the chip, that is, the negative pole of the power supply.

    When the chip is working, first make sure that the four pins of the power supply are correctly connected to the positive and negative poles of the power supply.

  2. external clock circuit

    The clock circuit is an oscillator that provides a beat to the microcontroller, and the microcontroller can perform various operations under the control of this beat, including the operation of the program.

    The LPC111x/LPC11Cxx contain three independent oscillators. These are the System Oscillator, Internal RC Oscillator (IRC) and Watchdog Oscillator. Each oscillator can serve more than one purpose in a specific application.

    After reset, the LPC111x/LPC11Cxx will operate from the internal RC oscillator until switched by software. This allows the system bootloader to work at a known frequency without being affected by any external crystal.

    If it is used as the smallest circuit, you can do nothing on the circuit. The microcontroller integrates an RC oscillator with a frequency of 12MHz, and the frequency error is 1%. However, if you want to improve the clock accuracy of the microcontroller, you need to provide more accurate outside the microcontroller. clock oscillator signal.Enter image description

    The above picture shows the schematic diagram of connecting a passive crystal oscillator between XTALIN and XTALOUT. The oscillating signal generated by the crystal oscillator can be used to drive the microcontroller to work. In most cases, the crystal oscillator is 12MHz, and the matching capacitor is 10pF.

  3. power-on reset circuit

    The power-on reset circuit is a circuit used to restore the circuit to the initial state. Since the single-chip microcomputer is a digital circuit based on sequence control, it needs a stable clock signal. Therefore, when the power is powered on, it needs to wait for the power supply system inside the single-chip microcomputer. And when the clock system is working stably, the single-chip microcomputer can be started to work. This waiting process is the function of the power-on reset circuit.

    The following figure shows the power-on sequence diagram of LPC11C14:MCU power-on reset sequence

    In short, for the LPC11C14 single-chip microcomputer, the function of the power-on reset circuit is to keep the RESET pin of the single-chip microcomputer at a low level when it is powered on. Internal Schmitt trigger, after receiving the trigger signal, the processor starts to execute the program from address 0 (that is, the initial reset vector mapped from the boot block). At the same time all processor and peripheral registers are initialized to predetermined values.

Enter image description

The circuit shown above is the simplest RC power-on reset circuit.

Verify the working status of the microcontroller

When the minimum system circuit of the single-chip microcomputer is completed, it is necessary to know whether the single-chip microcomputer is working correctly. The process is relatively simple. With the help of an oscilloscope, detect whether the pins of the crystal oscillator generate an oscillatory signal. If an oscillatory signal is generated, it indicates that the single-chip microcomputer has started to run.

Enter image description

If you don't have an oscilloscope, you can measure the pin voltage of the crystal oscillator with a multimeter. If the crystal oscillator starts to vibrate, a voltage value of about 1.8V will be measured on the pin.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325018992&siteId=291194637