10. MPLAB IDE7.40 Integrated Development Environment
MPLAB IDE is an integrated development environment (IDE: Integrated Development Environment) for PIC series microcontrollers launched by Microchip. It can be run under the Windows operating system of a PC. There are many versions of MPLAB IDE. The following introduces the main functions of the MPLAB IDE7.40 integrated development environment.
1. Edit the program
In MPLAB IDE (version 7.40, the same below), you can write and edit source programs for PIC microcontrollers (both assembly language and C language programs are acceptable), and you can also write and edit other text files.
2. Assembler
Under MPLAB IDE, PIC assembly language source programs are assembled to generate a variety of target codes (such as .hex) to support a variety of programmers from Microchip.
3. Compile the program
Under MPLAB IDE, the PIC C language source program is compiled and linked through the PIC C and PIC C18 C compilers to generate the target code (.hex).
4. Simulation debugging
Using the MPLABSI MSimulatov command in MPLAB IDE, you can simulate and debug the target code (actually the source program) of the PIC series microcontroller. Through simulation debugging, you can not only find out the problems in the program design, but also observe the entire process of the C language program running, and quantitatively observe the program running time, such as the delay value of the delay function. When I was learning C language to edit a certain function source program of the PIC microcontroller, I often used simulation debugging to intuitively observe the running process of the source program and quickly mastered the characteristics and running mode of the C language program. In the following series, the detailed method of source program simulation debugging will also be introduced, so please pay attention. MPLAB IDE7.40 integrated development environment has more functions, which are limited to space and are not described here. Readers can refer to relevant books.
11. Introduction to PIC C and PIC C18C Compilers
PIC C and PIC C18C compilers are C language source program compilers developed by Australia's HI-TECH company, referred to as C compilers, which fully comply with the US ANSIC standards.
This compiler is a high-performance C compiler software for PIC series microcontrollers. PIC C can be used for PIC16 microcontroller series products, and PIC C18 can be used for PIC18 microcontroller series products. Both can run under the MPLAB IDE integrated development environment (higher version). The C language source program edited by the user must be compiled and linked with the C compiler to generate an absolute target file and other formats of files, such as .hex (target code), for program application and debugging. Therefore, in addition to understanding the hardware functions of the PIC microcontroller, MPLAB IDE and PIC C and PIC C18C compilers are also indispensable when developing PIC microcontroller series products using C language. The main functions of PIC C and PICC18C compilers are introduced below.
1. Working method
Run under MPLAB IDE integrated development environment (higher version, such as MPLAB IDE7.40) to create a project and generate the target code. Hex file, that is, burn the PIC microcontroller source code into the file (.hex) of the corresponding PIC chip.
2.Support simulation
Supports hardware simulation MPLAB ICE (In-CircuitEmulator); supports software simulation MPLAB SIM (simalator); supports low-cost online debuggers MPLAB ICD and MPLABICD2 (In-circuit debugger).
3. Hybrid Programming
PIC C and PIC C18C compilers support mixed programming of assembly language and C language.
4. Debug source program
PIC C and PIC C18C compilers run under MPLAB IDE, allowing source program debugging. During debugging, breakpoints can be set on the source program, and the program will automatically stop when it reaches the breakpoint, allowing the debugger to observe and modify variable values; it allows single-step and continuous program operation, etc. These functions are extremely helpful for learning C language. [page]
12. PIC microcontroller programming device
The function of the PIC microcontroller burning programmer (referred to as the programmer) is to burn the target code .hex of the PIC microcontroller program generated after assembly or compilation into the chip to facilitate the operation of the program.
There are many types of programmers for PIC microcontrollers, which can be summarized into two categories: one is a simple programmer, and the other is a so-called full-series programmer. Simple programmers can burn fewer chip models, and the burning speed is slow, and most of them are chips of mid-level PIC microcontrollers, such as PIC16F84/627/628/87X... The so-called full-series programmers refer to those programmers that can burn multiple types of PIC microcontrollers, and their burning speed is fast. Simple programmers are cheap, priced at 200 to 300 yuan, and are suitable for learning PIC microcontrollers; the latter are mostly used by electronic companies to develop electronic products, and the price is higher (about 800 yuan).
The following introduces a simple programmer, which consists of two parts.
The first is the hardware part, which is connected to the PC through the RS232 port when working. Figure 10 is its working block diagram; the second is the PC software Icprog1.05 required for programming the programmer, and its programming interface is shown in Figure 11.
Fig.10
Fig.11
This programmer can program 8, 18, 28, 40 and other pin products of PIC microcontroller chips. It is easy to use and sufficient for learning PIC microcontroller programming.
13. Installation of MPLAB IDE Version 7.40 and PIC C Compiler
The CD that comes with this article contains two compression software: MPLABIDE-V7.40 Zip and PICC8.50 rar, as shown in Figure 12. They can be used for learning PIC microcontroller C language experiments.
Fig.12
1. Installation of MPLAB IDE version 7.40
Insert the CD containing the above two compression software into the CD-ROM drive of the PC. On the desktop of the monitor, click "My Computer" with the mouse, click "Open" in its drop-down menu, find "My CD" on the desktop and open it, and the two compression software icons shown in Figure 12 will appear. Use the mouse to open them respectively and click "Copy", then open the E disk respectively and paste them to the E disk (you can also paste them to the D disk or F disk). First install the MPLAB IDE7.40 version software. The installation process is as follows:
(1) Double-click "My Computer" with the mouse, open Disk E on the desktop, find the compression software MPLAB-IDE icon, and click it with the mouse. Move the mouse to "winRAR" in the drop-down menu, and then move the mouse to the "Extract to MPLAB-IDE-V7.4 (/E)" command and click it to generate the decompressed icon, as shown in Figure 13.
Fig.13
(2) Click the MPLAB-IDE icon in Figure 13. In the drop-down menu, click the "Open" command to generate multiple files.
[page]
(3) Select (click) the MPLAB-V7.40 installation icon in Figure 14 from among the multiple files. In the lower menu, click “Open” to generate the “Check Working System” file in the “Installation Wizard” in Figure 15. At this time, you can observe the operation of the automatic installation progress display interface.
Fig.14
Fig.15
(4) After the automatic installation is completed, the "Welcome to modify, restore, or cancel the program function file" shown in Figure 16 will be generated.
Fig.16
Select Repair (Restore - that is, use the mouse to click a black dot in the small circle on the left of Repair to restore all the program's functional features), and then click Next at the bottom of Figure 16 to generate the MPLAB T00Ls V7.40 file in Figure 17. This file is for automatic installation of the new software MPLAB IDE7.40, so you can see the colored slider on the file increasing to the right, and you can also see new characters being generated quickly and continuously to the right of "validating install". Just wait a little while, and the colored slider will be filled to the right, and the installation completion interface in Figure 18 will be automatically generated.
Fig.17
Fig.18
[page]
(5) After clicking the "Finish" command at the bottom of Figure 18, the PC automatically shuts down and then automatically restarts, and a shortcut icon for "MPLAB IDE" V7.40 is automatically generated on the desktop, as shown in Figure 19. At this point, the software installation is complete and can be used.
Fig.19
(6) If the reader is interested, he can observe the interface of MPLAB IDE V7.40. The method is to double-click the MPLAB IDE V7.4 icon in Figure 19 and run the program. The running interface of MPLAB IDE V7.40 integrated development environment will appear on the screen, as shown in Figure 20. The interface consists of "title bar", "menu bar", "toolbar", "work area", "status bar", etc. The status bar is at the bottom and is used to display the current chip model, address pointer, working register value, crystal frequency and other information.
Fig. 20
Previous article:PIC microcontroller C language programming (8)
Next article:PIC microcontroller C language programming (6)
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
- Hardware Engineer (Shanghai)
- Three Clouds
- MSP430FR5969 Development Data
- Working principle, circuit analysis and industry status of RF chips
- Highly integrated analog front-end signal conditioning circuit diagram
- [TI star product limited time purchase] + familiar with participating in the event, the old man bought another CC2640R2
- Applications of Embedded AI
- Large capacitors filter low frequencies, and small capacitors filter high frequencies?
- 【Old Posts】Record Total Posts
- The evolution of mesh networks and IoT devices