The Program Counter (PC) is a register that is apart of all central processing unit (CPU) or microprocessor. All microcontrollers contains a microprocessor and thus has a program counter. The purpose of the program counter is to hold/store the address of the next instruction to be executed by the microcontroller's microprocessor.
The size (width) of the program counter of a microcontroller is measured in bits and is directly related to the size of the microcontroller's program memory.
For the ATMega8515 microcontroller the program memory is 8k-Bytes organised as 4k-Words. As such the width of the ATMega8515 microcontroller Program Counter n is given by:
For the ATMega16 microcontroller the program memory is 16k-Bytes organised as 8k-Words. As such the width of the ATMega16 microcontroller Program Counter n is given by:
AVR Tutorials hopes this tutorial on the AVR program counter was beneficial to you and looks forward to your continued visits for all your microcontroller tutorial needs.