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.There are many compilers for programming microcontroller. Example: MPLab, MikroC, AVR compiler, Keil uvision etc.
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.We also need some basic circuit knowledge for programming and working with microcontroller. Circuit simulation softwares can be used to simulate microcontroller program.Example: Proteus IDE, PSpice, Eagle etc.
No comments:
Post a Comment