Programming or burning a microcontroller means transferring the compiler program to microcontroller memory. A compiler is software that provides an environment for writing, testing, and debugging a program for the microcontroller. The program for a microcontroller is usually written in C or assembler language. Finally, the compiler generates a hexadecimal file containing the understandable machine language instruction by a microcontroller. It is the contents of this hexadecimal file that is transferred to the memory of the microcontroller. Once a program is transferred or written to the memory of the microcontroller, then it works according to the program.
To know how to program a microcontroller, we need a device called burner / programmer. A programmer is a hardware device with dedicated software that reads the contents of the hexadecimal file stored on the PC or laptop and transfers it to the microcontroller to burn. Reads the data from the hexadecimal file by connecting to the PC via a serial or USB cable and transfers the data to the microcontroller memory to be programmed according to the protocols described by the manufacturer in the data sheet.