ESE 380 Lecture Notes - Lecture 9: Program Counter, Microcontroller, Processor Register
Document Summary
Branch instructions (jump,skip,or branch) do not process any data. A branch instruction specifies from which address in program memory the next instruction to be executed must be fetched. The address produced by a branch instruction becomes the new value of the pc. The program counter register holds the address of the next instruction to be fetched from program memory for execution. Most instructions in the avr instruction set are one word (16-bits) long. In contrast, jmp and call instructions are two words long. Since the pc is used to address program memory (point to instructions), its width is determined by the length of (number of words in) the program memory. For the atmegga324a the program memory is 16k words (32k bytes), therefore, its pc is 14 bits wide, 2^14 = 16k. At reset the pc is initialized to 0. So, the first instruction fetched after reset is the one in location 0 of program memory.