Programming or burning a microcontroller means to transfer the program from the compiler to the memory of the microcontroller. A compiler is a software which provides an environment to write, test and debug a program for the microcontroller. The program for a microcontroller is generally written in C or assembly language. Finally the compiler generates a hex file which contains the machine language instruction understandable by a microcontroller. It is the content of this hex file which is transferred to the memory of the microcontroller. Once a program is transferred or written in the memory of the microcontroller, it then works in accordance with the program.
In order to know how to program a microcontroller, we need a device called a burner/programmer. A programmer is a hardware device with dedicated software which reads the content of the hex file stored on the PC or the laptop and transfers it to the microcontroller to be burned. It reads the data of the hex file by connecting itself to the PC via a serial or USB cable and transfers the data to the memory of the microcontroller to be programmed in accordance with the protocols as described by the manufacturer in the datasheet.
The programmer and the compiler differ for microcontrollers from different companies. In some cases the compiler has programmer software inbuilt in it. You simply need to connect the programmer hardware and the microcontroller can be programmed from the compiler itself.
Steps to Program the Microcontroller
Steps to program the microcontroller:
1. Purchase a microcontroller capable of programming the microcontroller you are using. Ensure that it is compatible with the operating system you are using.
2. Install the software which comes with the programmer.
3. Connect the programmer with the PC and start the software.
4. Read the hex file which you want to burn in the software of the programmer.
5. Press the program/burn option in the programmer software. In either case i.e. whether the programming is successful or failed the programmer software will show the message.
For more details about the programmer refer the article on Programmer.
Filed Under: Tutorials
Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.