The function of developing and designing peripherals is flexible, and the three main points of the switch matrix cannot be ignored.

The LPC8xx is a low-cost 32-bit MCU family based on the ARM Cortex-M0+ that operates at up to 30 MHz. Among them, LPC824 and LPC845 are the most representative in this series. They are widely used, compact and compact, and have abundant peripheral resources to make them competitive in the market. The flexible distribution of peripheral functions benefits from One of its powerful and innovative features - the Switch Matrix (SWM). 1 switch matrix

The switch matrix is ​​a functional module that can be flexibly configured by internal paths. The signals of each peripheral function of the MCU can be used as the entrance of the switch matrix, and each of the multiplexed I/O ports is the corresponding exit, and can be specified by the corresponding register configuration. Peripheral functions are flexibly assigned to the required pins. In the LPC8xx series, it can be distributed through the switch matrix: three-way serial USART0/1/3, two SPI0/1, multiple input and output of SCT timer, two I2C1/2, ADC module, analog comparison ACMP output, clock frequency output CLKOUT and GPIO interrupt output.

2 main functions and configuration steps

The switch matrix connects all of the internal signals listed in the moveable function table to the external pins on the package through the pin assignment registers, or vice versa. The signal inputs required by the internal modules are assigned to the individual pins. The external pin is identified by its default GPIO pin number, PIO0_n. Follow the steps below to connect the internal signal to an external pin:

● Enable the switch matrix clock and the peripheral function clock that needs to be turned on;

● Find the peripheral functions of the desired operation in the movable function table;

● Find the LPC8xx data sheet to determine which pin connection pin function of the LPC8xx package;

● Use the pin description table to find the default GPIO function PIO0_n assigned to package pin x. x is the pin number;

● Find the pin assignment register for the corresponding function in the switch matrix register description;

● Disable any special function of this pin PIO0_n in the PINENABLE0 register. Because some special functions are assigned to specific pins by default, such as external crystal input, the function conflict can be prevented after being turned off.

● Pin number n is programmed into the bit assigned to the pin function. The pin function is now connected to pin x on the package.

Change pin function assignment

3 Configuration Notes ● Some functions require pins with special characteristics and cannot be moved to other physical pins. Therefore these functions are mapped to a fixed port pin. Examples of fixed pin functions are oscillator pins or comparator inputs; • Each fixed pin function is associated with a bit in the PINENABLE0 register to select or deselect the function; ● if the pin function is removed, Any moveable function can be assigned to its ports and pins; ● If the fixed pin function is removed and there is no moveable function on this pin, the pin is assigned its GPIO function; ● On reset, cancel Select all fixed pin functions; ● If fixed pin analog function is selected, its assigned pin cannot be used for any other function.

Air Conditioner Pressure Transmitter

Air Conditioner Pressure Transmitter,Pressure Transmitter,High Pressure Compressor Sensor,Pressure Sensor For Air Compressor

Shenzhen Ever-smart Sensor Technology Co., LTD , https://www.fluhandy.com