After the MCU program is written, we have to download the program to the MCU memory, so that the MCU can execute commands according to the programmer's logic to realize the function. We have talked about several ways to download MCU before, such as ISP download and JTAG download. The most common format of the download file is hex file, which everyone knows. There is also a bin file which is the download file of the MCU. The following introduces the difference between these two formats.
HEX files and BIN files are two file formats we often encounter. Here is a brief introduction to the differences between these two file formats:
1. The hex file contains address information. When burning the program in ISP mode, we all have the following experience: 1) Select the microcontroller model; 2) Select the serial port number; 3) Set the baud rate (or default); 4) Select the file to download; 5) Click the download button to download. As shown in the figure below.
After these steps, the program download is completed. In the above steps, we did not choose which memory of the microcontroller to download the program to, that is, there is no need to set the address. Because the information inside the HEX file already includes the address. When burning the BIN file, the user must specify the address information. The microcontroller downloads more hex files.
2. The BIN file format only includes the data itself, not the address
The bin file itself is just data and does not contain address information, so when downloading the bin file, you need to select the starting address and ending address of the memory, that is, download the bin file to the specified memory space. Usually, the chips that need to specify the program memory address are ARM chips and DSP chips.
3. The sizes of HEX files and BIN files are different
For bin files, the file size you see by right-clicking the file properties is the actual size of the data. For HEX files, the file size you see is not the actual size of the data. One reason is that HEX files use ASCII to represent data, and the other is that HEX files themselves include other additional information.
Previous article:MCU Program: Actual size of HEX file
Next article:How to quickly master an MCU, you can start from these aspects
Recommended ReadingLatest update time:2024-11-16 13:42
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Modern Electronic Technology Training Course (Edited by Yao Youfeng)
- Modern arc welding power supply and its control
- Small AC Servo Motor Control Circuit Design (by Masaru Ishijima; translated by Xue Liang and Zhu Jianjun, by Masaru Ishijima, Xue Liang, and Zhu Jianjun)
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
- What is the working principle of the crystal oscillator in the microcontroller?
- Will Too Many Vias in the RF PCB Power Layer Affect Power Integrity?
- "Recommend Chinese Chip" + Qinheng CH579
- Radar technology is changing the three trends in the cockpit sensing market
- Safety Y1 & Y2 capacitors
- Protel 99 SE and AD have copper holes and copper grooves
- It was such an accident that I bought a NUCLEO-G474
- Are the saturation of light and the brightness of light the same concept? If they are different, what property of light does saturation refer to?
- Finally, TMS320F28379D is dead
- Implementing HDMI with FPGA