What is a Flash Programmer?

AVR Flash programmer

A flash programmer is a device that allows us to program the flash memory of a microcontroller.

By program, we mean we can transfer a program which we have written and compiled and send it the microcontroller for the microcontroller to execute the program.

Why Do We Want to Program the Flash Memory of Microcontrollers?

As previously stated, when we program a microcontroller, we transfer our compiled program to the microcontroller.

In order for the microcontroller to execute the program (or instructions) we send it, it first stores the program in its memory.

A microcontroller typically has 3 types of memory: Flash, RAM, and EEPROM.

Flash is a type of nonvolatile memory; that is, it's a memory that keeps the information transferred to it even when the power to the microcontroller is shut off. RAM is the memory for temporary storage, such as when the program is being actively executed. EEPROM, like Flash, is nonvolatile. However, it is slower and there is less of it, so more often than not, the Flash memory is the more used and important of the 2 nonvolatile memories.

When we program a microcontroller for it to execute the program, the microcontroller must first store thep program into memory. After it is stored into memory, then the data from the memory (the program) is then transferred to the ALU (arithmetic logic unit) to be processed. The RAM stores intermediate results while the program is being executed, such as math calculations that need to be done and deals with any variables that need manipulation, etc.

So the reason we program the Flash memory is so that the microcontroller can receive and store the program. Only then can the program be executed by the microcontroller. Programming it into flash has the advantage that once the microcontroller has been successfully programmed, even if power is then shut off from the microcontroller, either intentionally or accidentally, the program will still be saved by the microcontroller. So if we restarted the power to it again, it would still have the program and could execute it. This is how a computer works. Even if we turn it off and restart it again, the operating system will boot up each time. The OS is installed on a nonvolatile memory, so it's permanently etched into the memory of the computer's CPU.

So now you should now why that in order to program a microcontroller, we need a flash programmer. We need a way to program the flash memory of the microcontroller so that it can store the program that we want the microcontroller to execute.

A flash programmer is a pretty specialized type of hardware. It normally is specific to a family of microcontrollers, because microcontrollers have different hardware architectures. Thus, if we're dealing with AVR microcontrollers, we must have a specialized flash programmer that deals with AVRs. If we're dealing with PICs, we need a flash programmer that deals with PICs. And depending on how much the architectures of microcontrollers differ within a brand of microcontrollers such as PICs, we may need different flash programmers for each type of PIC chip. You can always do some research into what type of flash programmer is needed for your particular microcontroller in hand.

For an AVR microcontroller, we can even use an arduino board to act as a flash programmer for AVR chips. To see how to convert an arduino board into an AVR flash programmer, see How to Convert an Arduino into an AVR Flash Programmer. So if you have AVR chips that you want to program as well as an arduino board but you don't have a specialized ICSP (or ISP) programmer, you can still program the flash memory of the AVR chip.

HTML Comment Box is loading comments...