ESE 380 Lecture Notes - Lecture 9: Program Counter, Microcontroller, Processor Register

15 views11 pages

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.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents