AVR 指令集
AVR 是一種 8 位元 RISC 微控制器架構,具有高效能和簡單的指令集結構。其指令集設計的目標是使得指令簡單且容易執行,通常每條指令都能在 單一時鐘週期內完成,這使得 AVR 系列微控制器非常快速。
The Program and Data Addressing Modes
- 在AVR架構下,通用運算暫存器為32個,而 I/O 暫存器的數量通常與每個具體型號的微控制器相關,每個都為8位元。
- Register Direct
- Single Register Rd
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
操作碼可以直接針對目的暫存器。
- Two Registers, Rd and Rr
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
操作碼也可以直接操作一個來源暫存器到一個目的暫存器
- I/O Direct
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
操作碼也可以讓暫存器與 I/O 記憶體空間進行直接交互。AVR 微控制器的 I/O 註冊表通常映射到特殊功能寄存器,並且可以像普通暫存器一樣進行讀寫操作。這些 I/O 寄存器通常用來控制外部硬體裝置。
- Data Direct
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
LDS類型的相關指令可以作為操作碼 針對暫存器載入來自特定內存地址的數據
- Pointer Register
- Data Indirect
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
可以調用X, Y, Z等指標暫存器
- Data Indirect with Pre-decrement
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
The X,- Y-, or the Z-pointer is decremented before the operation. The operand address is the decremented contentsof the X-, Y-, or the Z-pointer
- Data Indirect with Post-increment
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
- Data Indirect with Displacement
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
The operand address is the result of the q displacement contained in the instruction word added to the Y- or, Z-pointer. Rd/Rr specify the destination or source register.
強調指標暫存器可以被靈活的預增加和減少來擴充功能
-
Program Memory Constant Addressing using the LPM, ELPM, and SPM Instructions
由於程式記憶體的容量通常比資料記憶體大,因此將常數儲存在程式記憶體中可以更有效地利用記憶體空間。
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
- LPM (Load Program Memory)
- ELPM (Extended Load Program Memory)
當程序內存地址超過 64KB 時,LPM 無法再正常工作,因此使用 ELPM 指令來讀取高位地址的程序內存。
- SPM (Store Program Memory)
-
Direct Program Addressing, JMP and CALL
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
JMP 和 CALL 都是與程式控制流有關的指令,通常用來改變程式執行的順序。這兩條指令分別用於無條件跳轉和函數呼叫,它們在控制程式流程中扮演著重要的角色。
- EIJMP 是 IJMP 的擴展版,主要用於支持超過 64KB 範圍的程式記憶體地址,實現間接跳轉。
- EICALL 是 ICALL 的擴展版,適用於超過 64KB 範圍的函數呼叫,並且會將返回地址壓入堆疊以便後續的 RET 指令使用。
- RJMP and RCALL
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
條件判斷
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Instruction Set Summary
Arithmetic and Logic Instructions
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Change of Flow Instructions
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Data Transfer Instructions
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Bit and Bit-Test Instructions
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
MCU Control Instructions
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Instruction Description(非必要)
Appendix A Device Core Overview(非必要)
- ATMega168為AVRe+!!
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
ATMega
LCD

調整 |
50H |
95H |
D8H |
電壓值(理論) |
|
|
|
電壓值(實驗) |
|
|
|
誤差值 |
|
|
|
調整 |
50H |
79H |
9FH |
頻率值(實際) |
|
|
|
猜測的公式 |
|
|
|
公式應為





