When developing MCUs, some simple digital logic circuits are sometimes needed. The LPC804 and LPC55XX series integrate PLU (Programmable Logic Unit), a programmable logic unit, which can create small combination and sequential logic circuits to reduce costs.
Some customers have some questions about the concept and usage of PLU when using PLU. This article will explain this.
1. Introduction to PLU
The PLUs of LPC804 and LPC55XX are exactly the same in use. Contains 6 inputs, 8 outputs, 26 5-input lookup tables (LUTs), and 4 flip-flops (state Flip-Flops). 26 PLUs are connected to each other, and the outputs, lookup tables, and flip-flops are connected by Multiplexing, as follows:
Digital logic circuits are divided into combinational logic circuits and sequential logic circuits. Only sequential logic circuits require the use of flip-flops. When using a flip-flop, an external clock input needs to be provided to PLU_CLKIN. That is, no external clock is required when using a combinational logic circuit. An external clock is required when using a sequential logic circuit. as follows:
2. PLU configuration
Test the simplest combinational logic circuit and sequential logic circuit, as follows:
According to the pins of LPC55S69-EVK, they are as follows:
Configure the pins as follows:
Configure the clock. The CLKIN clock of the PLU is set to 10K input, as follows:
Configure the PLU peripherals as follows:
Configure the PWM peripherals and set the PWM to 50% duty cycle and 10K frequency, as follows:
3. PLU Configuration tool configuration
NXP has developed a PLU Configuration tool. This tool can generate corresponding codes based on digital logic circuits to configure the PLU and its truth table. The download link can be copied in the PLU peripheral configuration interface. The link is as follows:
https://www.nxp.com/mcu-plu-config-tool
3.1 Schematic configuration
Open the PLU configuration tool, select the schematic design, and do a simple OR operation and D flip-flop experiment, as follows:
Click File-》Export-》PLU source file in the menu bar to export it as a C file, and copy the contents of the C file into the main function, as follows:
/* LUT0 (or01) */ PLU->LUT[0].INP_MUX[0] = 0x00000003; /* IN3 (IN3) */ PLU->LUT[0].INP_MUX[1] = 0x00000004; /* IN4 (IN4) */ PLU->LUT[0].INP_MUX[2] = 0x0000003F; /* default */ PLU->LUT[0].INP_MUX[3] = 0x0000003F; /* default */ PLU->LUT[0].INP_MUX[4] = 0x0000003F; /* default */ PLU->LUT_TRUTH[0] = 0xeeeeeeee; /* or01 (or01) STD 2 INPUT OR */ PLU->OUTPUT_MUX[5] = 0x0000001a; /* FF0 (FF01) -> OUT5 */
The logic analyzer test results are as follows:
3.2 Verilog configuration
Open the PLU configuration tool, choose to import the verilog file, import the written .v file, and do a simple AND operation experiment, as follows:
Note that the trigger will only be used if posedge clock is declared in the verilog file, and negedge sys_rst_n cannot be used for reset. The posedge clock in the always statement will be replaced by the clock input of the CLKIN pin, so the clock pin has no effect. Copy the generated code into the main function and test it with a logic analyzer. The results are as follows:
Previous article:Design of intelligent security system based on LPC2210 embedded microprocessor
Next article:Design of CAN node using LPC2292 microcontroller based on EasyJTAG emulator
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- About MOS tube recommendation
- How to keep the AD schematic synchronized with the PCB after it is split?
- TI Signal Chain and Power Q&A Series Live Broadcast - Gate Driver Special Live Broadcast with Prizes in Progress!
- Main application categories of millimeter wave radar
- pybL development board pinout
- Npn tube, Iceo is the reverse cutoff current, C and E are both N, where does the reverse come from, what does the reverse here mean...
- EEWORLD University ---- MSP CapTIvate Adaptive Sensor PCB Design Guide
- Children's Day is coming, what do you want to reminisce about?
- 【Running posture training shoes】No.009-Work submission
- 【Chuanglong TL570x-EVM】HDMI data cable adapter