1 Introduction to PIC32 Series Microcontrollers
The PIC32 series of microcontrollers are high-performance 32-bit microcontrollers launched by Microchip Technology Inc. (Microchip Technology, USA). They are designed based on the MIPS32 architecture. The currently launched PIC32MX3XX branch is a general-purpose type, the PIC32MX4XX branch has USB functions, the PIC32MX5XX branch has USB and CAN functions, the PIC32MX6XX branch has USB and Ethernet functions, and the PICMX7XX branch has USB, CAN and Ethernet functions. The PIC32 series of microcontrollers adopts Harvard structure, with a 5-stage pipeline and a maximum operating frequency of 80 MHz; it has an efficient instruction architecture, high-performance hardware multiplier/accumulator and up to 8 groups of 32 core registers, which can achieve an operating speed of 1.56 DMIPS/MHz. In addition, the PIC32 system has a 64-byte cache for instruction and ROM data prefetch buffers, a 128-bit wide flash memory, which can shorten the instruction fetch time of a single instruction, and supports the MIPSl6e 16-bit instruction set architecture, which can reduce the code by up to 40%.
The PIC32 series of microcontrollers include expandable devices with flash memory ranging from 32 KB to 512 KB, on-chip RAM ranging from 8 KB to 128 KB, and pin-compatible with the 64/100-pin 16-bit microcontroller PIC24FJ-XXXGA series. The newly launched PIC32MX5XX/6XX/7XX provides XBGA packaging. In addition, the PIC32 series of microcontrollers has rich peripheral resources - 5 timers, 16-channel 10-bit A/D converters and communication interfaces, namely SPI, I2C, UART and PMP. At the same time, the PIC32 also has an integrated CRC calculation function and a DMA controller with mode-based transmission terminal selection function. In addition, the PIC32MX5/6/7 series includes 10/100 Mbps Ethernet, CAN2.0b controller, USB host/slave and OTG.
The PIC32 series of microcontrollers are not only faster and more powerful than PIC 8-bit and 16-bit microcontrollers, but also have certain advantages over ARM series 32-bit microcontrollers. Although the highest clock frequency of the MISP 4K that Microc-hip can choose is only 80 MHz, due to the simplicity of the MIPS core, many processor evaluation agencies have confirmed that the overall processing power of PIC32 is higher, and most of the instructions of PI-C32 are single-cycle instructions, which are faster than multi-cycle instructions. The PIC32 series of microcontrollers has up to 128 KB of RAM, which makes it more advantageous in data processing. Microchip also has a very unique advantage, that is, all of the company's 8, 16 and 32-bit devices are fully compatible. All of these full-series products use the same development tools, a single development environment, and the software library is also fully compatible, which is more convenient for customers. In addition, Ashling, Green Hills and Hi-Tech provide complete tool chain support, CM-X, Express Logic and others provide RTOS support, EasyGUI, Segger, RamTeX and Micrium and others provide drawing tool support. It is worth mentioning that Microchip has prepared a starter kit and sample source files for developers, and also provides free middleware modules such as USB, TCP/IP protocol stack, and Graphics and FATl6 file system development. The MPLAB C32 compiler of PIC32 includes a software peripheral function library compatible with 16-bit Microchip MCU to make it easier and faster to use peripheral modules. The block diagram of the PIC32 series microcontroller is shown in Figure 1.
Microchip integrated development tools support all PIC32 microcontrollers, including MPLAB integrated development environment (IDE), MPLAB C32 C compiler, MPLAB REAL ICE simulation system, MPLAB ICD2 online debugger and Explore 16 development board. PIC32 series microcontrollers require MPLAB IDE version 8.0 or above. The latest version is 8.43. The MPLAB IDE software can be downloaded for free from the official website of Microchip www. microchip. com. MPLAB ICD2 online debugger is a low-priced PIC development tool that can set a single breakpoint and has weak debugging capabilities. MPLAB ICD3 retains backward compatibility with Microchip RJ-11 interface, can easily connect to the target board, and quickly program the device; can have up to 1000 software breakpoints, 2 to 5.5 V operating voltage; can support low-voltage debugging with a minimum of 2.0 V, has high-speed programming capabilities, and is 5 to 15 times faster than MPLAB ICD2. The MPLAB REALICE simulation system can support standard and advanced debugging functions, such as complex breakpoints, application code tracing and data collection, code execution timing and real-time variable monitoring. The newly launched MPLAB PM3 universal device programmer supports programming of all PIC device products and the latest dsPIC30 series. However, the prices of MPLAB REAL ICE, ICD3 and PM3 are relatively expensive. Although ICD2 has limited functions, it is cheap and can realize programming simulation of the PIC32 series. The specific programmers, emulators, compilers supported by each model of PIC32 microcontroller and the PIC series models supported by each version of IDE can be viewed in Configure "Select device..." of MPLAB IDE (version 8.0 or above).
2 P1032 UART serial port programming
The following uses the UART serial port module as an example to describe the development process of PIC32. The circuit principle is shown in Figure 2. Considering the high prices of MPLAB ICD3 and MPLAB REAL ICE emulators, the MPLAB ICD2 with USB port is used (MPLAB IDE supports MPLAB ICD2 with USB port, but not ICD2 with serial port). This experiment uses the MAPLAB IDE8.33 integrated development environment and selects PIC32MX32-0F128H.
In PIC32 programming, the configuration word needs to be configured (mainly the system clock, peripheral clock, etc.). This work can be defined in the program, or the configuration word can be set through the menu Configure | Configuration Bits... in MPLAB IDE; at the same time, the compiler can be selected through Project | Select Language Toolsuite, and the chip model can be selected through Configure | Select Device. Since the MPLAB IDE8.33 integrated development environment program is only an upgrade and improvement of the previous version, developers who have used the MPLAB IDE development environment can easily and quickly master its usage. This experiment uses the MPLAB C32 compiler. Program 1 directly uses the software peripheral function library in the MPLAB C32 compiler to operate the UART; Program 2 uses read and write registers to operate the UART. The program implements the host computer sending data, and the PIC32 microcontroller returns to the host computer after receiving the data.
|
|
|
|
Previous article:Design of the interface between intelligent LCD touch display terminal and single chip microcomputer
Next article:Design of single chip computer firmware upgrade system based on GPRS
Recommended ReadingLatest update time:2024-11-16 16:47
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
- MSP430F249_TimerA timer
- Synthesizable Verilog Syntax (Cambridge University, photocopy)
- [RVB2601 Creative Application Development] Short recording, playback and printing of recording data
- When the carrier data reaches the receiving end, how does the receiving end identify this information?
- SparkRoad Review (7) - FPGA Serial Port Test
- Disable AD auto-start JLink
- Seeking guidance - stc microcontroller remote upgrade program
- Problems with creating sheet symbols for multi-page schematics
- Zigbee Z-Stack 3.0.1 Modify channels using broadcasting
- SHT31 Review + My Review Summary