I/O 型單片機使用手冊
目錄
間接尋址寄存器 – IAR, IAR0, IAR1 .............................................35間接尋址指針 – MP, MP0, MP1 ......................................................35存儲區指針 – BP .........................................................................36累加器 – ACC...................................................................................37程序計數器低字節寄存器 – PCL....................................................37表格寄存器 – TBLP,TBHP,TBLH....................................................37看門狗定時寄存器 – WDTS............................................................38狀態寄存器 – STATUS.....................................................................38中斷控制寄存器 – INTC,INTC0,INTC1 .........................................39定時/計數寄存器...............................................................................39輸入/輸出端口和控制寄存器...........................................................40UART 寄存器 .USR,UCR1,UCR2,TXR/RXR,BRG.......................40輸入/輸出端口..........................................................................................41上拉電阻............................................................................................41PA 口的喚醒......................................................................................41輸入/輸出端口控制寄存器...............................................................41引腳共享功能....................................................................................42編程注意事項....................................................................................45定時/計數器..............................................................................................46配置定時/計數器輸入時鐘源...........................................................47定時/計數寄存器 – TMR, TMR0,TMR0L/TMR0H,TMR1L/TMR1H,TMR2.....................................................................49定時/計數控制寄存器 – TMRC,TMR0C,TMR1C,TMR2C............50定時器模式........................................................................................53事件計數器模式................................................................................53脈沖寬度測量模式............................................................................54可編程分頻器(PFD)和蜂鳴器的應用..............................................55預分頻器(Prescaler)...........................................................................56輸入/輸出接口...................................................................................56編程注意事項....................................................................................57定時/計數器應用范例.......................................................................57中斷............................................................................................................59中斷寄存器........................................................................................59中斷優先權........................................................................................62外部中斷............................................................................................63定時/計數器中斷...............................................................................64UART 中斷........................................................................................64編程注意事項....................................................................................65復位和初始化............................................................................................66復位....................................................................................................66目錄iii異步串行口——UART............................................................................74UART 特性..........................................................................................74UART 外部引腳..................................................................................74數據發送.............................................................................................75UART 狀態控制寄存器......................................................................75波特率發生器.....................................................................................79UART 設置與控制..............................................................................81UART 發送器......................................................................................83UART 接收器......................................................................................84接收錯誤處理.....................................................................................85接收中斷圖解.....................................................................................86地址檢測模式.....................................................................................86暫停模式下的UART 功能.................................................................87UART 應用范例.................................................................................87振蕩器........................................................................................................89系統時鐘配置....................................................................................89系統晶體/陶瓷振蕩器.......................................................................89系統電阻電容振蕩器........................................................................90內部系統電阻電容振蕩器................................................................90RTC 振蕩器........................................................................................91看門狗定時振蕩器............................................................................91暫停和喚醒................................................................................................92暫停.....................................................................................................92進入暫停.............................................................................................92靜態電流.............................................................................................92喚醒....................................................................................................92看門狗定時器............................................................................................94掩膜選項....................................................................................................96應用電路....................................................................................................97第二部份 程序語言.....................................................................99第二章 指令集介紹.................................................................................101指令集......................................................................................................101指令周期..........................................................................................101數據的傳送......................................................................................101算術運算..........................................................................................102邏輯和移位運算..............................................................................102分支和控制的轉換..........................................................................102位運算..............................................................................................102查表運算..........................................................................................103其它運算..........................................................................................103指令設定一覽表......................................................................................104慣例..................................................................................................104I/O 型單片機使用手冊iv第三章 指令定義.....................................................................................107第四章 匯編語言和編譯器.....................................................................121常用符號..................................................................................................121語句語法..................................................................................................122名稱..................................................................................................122操作項..............................................................................................122操作數項..........................................................................................122注解..................................................................................................122編譯偽指令..............................................................................................123條件編譯偽指令..............................................................................123文件控制偽指令..............................................................................124程序偽指令......................................................................................126數據定義偽指令..............................................................................130宏指令..............................................................................................132匯編語言指令..........................................................................................136名稱..................................................................................................136助記符..............................................................................................136操作數、運算子和表達式..............................................................136其它..........................................................................................................139前置引用..........................................................................................139局部標號..........................................................................................139匯編語言保留字..............................................................................140編譯器選項..............................................................................................141編譯列表文件格式..................................................................................141源程序列表......................................................................................141編譯總結..........................................................................................142其它..................................................................................................142第三部份 開發工具................................................................... 145第五章 單片機開發工具.........................................................................147HT-IDE 集成開發環境............................................................................147盛群單片機仿真器(HT-ICE) ..................................................................149HT-ICE 接口卡.................................................................................149OTP 燒寫器.....................................................................................149OTP 適配卡.....................................................................................149系統配置..................................................................................................150HT-ICE 接口卡設置........................................................................151安裝..........................................................................................................153系統要求..........................................................................................153硬件安裝..........................................................................................153軟件安裝..........................................................................................154目錄v第六章 快速開始.....................................................................................159步驟一:建立一個新項目..............................................................159步驟二:將源程序文件加到項目中..............................................159步驟三:編譯項目..........................................................................159步驟四:燒寫OTP 單片機.............................................................160步驟五:傳送程序與掩膜選項單至Holtek ..................................160附錄............................................................................................... 161附錄A 特性曲線圖...................................................................................163附錄B 封裝信息.......................................................................................173
標簽:
單片機
使用手冊
上傳時間:
2013-10-18
上傳用戶:blacklee
匯編器在微處理器的驗證和應用中舉足輕重,如何設計通用的匯編器一直是研究的熱點之一。本文提出了一種開放式的匯編器系統設計思想,在匯編語言與機器語言間插入中間代碼CMDL(code mapping description language)語言,打破匯編語言與機器語言的直接映射關系,由此建立起一套描述匯編語言與機器語言的開放式映射體系。基于此開放式映射體系開發了一套匯編器系統,具有較高層次上的通用性和可移植性。【關鍵詞】指令集,CMDL,匯編器,開放式
Design of Retargetable Assembler System Liu Ling Feng Wen Nan Wang Ying Chun Jiang An Ping Ji Li Jiu IME of Peking University, 100871【摘要】An assembler plays a very important role in the field of microprocessor verifications and applications, thus how to build a retargetable assembler system has been a hotspot in this field for long time. This paper presents a new method about the retargetable assembler system design.It provides a kind of language CMDL, code mapping description language. During the process of assembling, assembler languages are firstly translated to CMDL, and then mapped to the machine codes. In an other word, CMDL is inserted between assembler languages and machine codes during the translation procedure. As a medium code, CMDL has a lot of features, such as high extraction, strong descript capabilities. It can describe almost all attributes of assembler languages. By breaking the direct mapping relationship between assembler languages and machine codes, the complexities of machine codes are hided to the users, therefore, the new retargetable assembler system has higher retargetable level by converting the mapping from assembler languages and machine codes to assembler languages and CMDL, and implementationof it becomes easier. Based on the new mapping system structure, a retargetable assemblersystem is developed. It proved the whole system has good retargetability and implantability.【關鍵詞】instruction set, symbol table, assembler, lexical analysis, retargetability
標簽:
開放式
匯編器
上傳時間:
2013-10-10
上傳用戶:meiguiweishi