MSP430系列超低功耗16位單片機原理與應用TI公司的MSP430系列微控制器是一個近期推出的單片機品種。它在超低功耗和功能集成上都有一定的特色,尤其適合應用在自動信號采集系統、液晶顯示智能化儀器、電池供電便攜式裝置、超長時間連續工作設備等領域。《MSP430系列超低功耗16位單片機原理與應用》對這一系列產品的原理、結構及內部各功能模塊作了詳細的說明,并以方便工程師及程序員使用的方式提供軟件和硬件資料。由于MSP430系列的各個不同型號基本上是這些功能模塊的不同組合,因此,掌握《MSP430系列超低功耗16位單片機原理與應用》的內容對于MSP430系列的原理理解和應用開發都有較大的幫助。《MSP430系列超低功耗16位單片機原理與應用》的內容主要根據TI公司的《MSP430 Family Architecture Guide and Module Library》一書及其他相關技術資料編寫。 《MSP430系列超低功耗16位單片機原理與應用》供高等院校自動化、計算機、電子等專業的教學參考及工程技術人員的實用參考,亦可做為應用技術的培訓教材。MSP430系列超低功耗16位單片機原理與應用 目錄 第1章 MSP430系列1.1 特性與功能1.2 系統關鍵特性1.3 MSP430系列的各種型號??第2章 結構概述2.1 CPU2.2 代碼存儲器?2.3 數據存儲器2.4 運行控制?2.5 外圍模塊2.6 振蕩器、倍頻器和時鐘發生器??第3章 系統復位、中斷和工作模式?3.1 系統復位和初始化3.2 中斷系統結構3.3 中斷處理3.3.1 SFR中的中斷控制位3.3.2 外部中斷3.4 工作模式3.5 低功耗模式3.5.1 低功耗模式0和模式13.5.2 低功耗模式2和模式33.5.3 低功耗模式43.6 低功耗應用要點??第4章 存儲器組織4.1 存儲器中的數據4.2 片內ROM組織4.2.1 ROM表的處理4.2.2 計算分支跳轉和子程序調用4.3 RAM與外圍模塊組織4.3.1 RAM4.3.2 外圍模塊--地址定位4.3.3 外圍模塊--SFR??第5章 16位CPU?5.1 CPU寄存器5.1.1 程序計數器PC5.1.2 系統堆棧指針SP5.1.3 狀態寄存器SR5.1.4 常數發生寄存器CG1和CG2?5.2 尋址模式5.2.1 寄存器模式5.2.2 變址模式5.2.3 符號模式5.2.4 絕對模式5.2.5 間接模式5.2.6 間接增量模式5.2.7 立即模式5.2.8 指令的時鐘周期與長度5.3 指令集概述5.3.1 雙操作數指令5.3.2 單操作數指令5.3.3 條件跳轉5.3.4 模擬指令的簡短格式5.3.5 其他指令5.4 指令分布??第6章 硬件乘法器?6.1 硬件乘法器的操作6.2 硬件乘法器的寄存器6.3 硬件乘法器的SFR位6.4 硬件乘法器的軟件限制6.4.1 硬件乘法器的軟件限制--尋址模式6.4.2 硬件乘法器的軟件限制--中斷程序??第7章 振蕩器與系統時鐘發生器?7.1 晶體振蕩器7.2 處理機時鐘發生器7.3 系統時鐘工作模式7.4 系統時鐘控制寄存器7.4.1 模塊寄存器7.4.2 與系統時鐘發生器相關的SFR位7.5 DCO典型特性??第8章 數字I/O配置?8.1 通用端口P08.1.1 P0的控制寄存器8.1.2 P0的原理圖8.1.3 P0的中斷控制功能8.2 通用端口P1、P28.2.1 P1、P2的控制寄存器8.2.2 P1、P2的原理圖8.2.3 P1、P2的中斷控制功能8.3 通用端口P3、P48.3.1 P3、P4的控制寄存器8.3.2 P3、P4的原理圖8.4 LCD端口8.5 LCD端口--定時器/端口比較器??第9章 通用定時器/端口模塊?9.1 定時器/端口模塊操作9.1.1 定時器/端口計數器TPCNT1--8位操作9.1.2 定時器/端口計數器TPCNT2--8位操作9.1.3 定時器/端口計數器--16位操作9.2 定時器/端口寄存器9.3 定時器/端口SFR位9.4 定時器/端口在A/D中的應用9.4.1 R/D轉換原理9.4.2 分辨率高于8位的轉換??第10章 定時器?10.1 Basic Timer110.1.1 Basic Timer1寄存器10.1.2 SFR位10.1.3 Basic Timer1的操作10.1.4 Basic Timer1的操作--LCD時鐘信號fLCD?10.2 8位間隔定時器/計數器10.2.1 8位定時器/計數器的操作10.2.2 8位定時器/計數器的寄存器10.2.3 與8位定時器/計數器有關的SFR位10.2.4 8位定時器/計數器在UART中的應用10.3 看門狗定時器11.1.3 比較模式11.1.4 輸出單元11.2 TimerA的寄存器11.2.1 TimerA控制寄存器TACTL11.2.2 捕獲/比較控制寄存器CCTL11.2.3 TimerA中斷向量寄存器11.3 TimerA的應用11.3.1 TimerA增計數模式應用11.3.2 TimerA連續模式應用11.3.3 TimerA增/減計數模式應用11.3.4 TimerA軟件捕獲應用11.3.5 TimerA處理異步串行通信協議11.4 TimerA的特殊情況11.4.1 CCR0用做周期寄存器11.4.2 定時器寄存器的啟/停11.4.3 輸出單元Unit0??第12章 USART外圍接口--UART模式?12.1 異步操作12.1.1 異步幀格式12.1.2 異步通信的波特率發生器12.1.3 異步通信格式12.1.4 線路空閑多處理機模式12.1.5 地址位格式12.2 中斷與控制功能12.2.1 USART接收允許12.2.2 USART發送允許12.2.3 USART接收中斷操作12.2.4 USART發送中斷操作12.3 控制與狀態寄存器12.3.1 USART控制寄存器UCTL12.3.2 發送控制寄存器UTCTL12.3.3 接收控制寄存器URCTL12.3.4 波特率選擇和調制控制寄存器12.3.5 USART接收數據緩存URXBUF12.3.6 USART發送數據緩存UTXBUF12.4 UART模式--低功耗模式應用特性12.4.1 由UART幀啟動接收操作12.4.2 時鐘頻率的充分利用與UART模式的波特率12.4.3 節約MSP430資源的多處理機模式12.5 波特率的計算??第13章 USART外圍接口--SPI模式?13.1 USART的同步操作13.1.1 SPI模式中的主模式--MM=1、SYNC=113.1.2 SPI模式中的從模式--MM=0、SYNC=113.2 中斷與控制功能13.2.1 USART接收允許13.2.2 USART發送允許13.2.3 USART接收中斷操作13.2.4 USART發送中斷操作13.3 控制與狀態寄存器13.3.1 USART控制寄存器13.3.2 發送控制寄存器UTCTL13.3.3 接收控制寄存器URCTL13.3.4 波特率選擇和調制控制寄存器13.3.5 USART接收數據緩存URXBUF13.3.6 USART發送數據緩存UTXBUF??第14章 液晶顯示驅動?14.1 LCD驅動基本原理14.2 LCD控制器/驅動器14.2.1 LCD控制器/驅動器功能14.2.2 LCD控制與模式寄存器14.2.3 LCD顯示內存14.2.4 LCD操作軟件例程14.3 LCD端口功能14.4 LCD與端口模式混合應用實例??第15章 A/D轉換器?15.1 概述15.2 A/D轉換操作15.2.1 A/D轉換15.2.2 A/D中斷15.2.3 A/D量程15.2.4 A/D電流源15.2.5 A/D輸入端與多路切換15.2.6 A/D接地與降噪15.2.7 A/D輸入與輸出引腳15.3 A/D控制寄存器??第16章 其他模塊16.1 晶體振蕩器16.2 上電電路16.3 晶振緩沖輸出??附錄A 外圍模塊地址分配?附錄B 指令集描述?B1 指令匯總B2 指令格式B3 不增加ROM開銷的指令模擬B4 指令說明B5 用幾條指令模擬的宏指令??附錄C EPROM編程?C1 EPROM操作C2 快速編程算法C3 通過串行數據鏈路應用\"JTAG\"特性的EPROM模塊編程C4 通過微控制器軟件實現對EPROM模塊編程??附錄D MSP430系列單片機參數表?附錄E MSP430系列單片機產品編碼?附錄F MSP430系列單片機封裝形式?
上傳時間: 2014-05-07
上傳用戶:lwq11
介紹用PIC16C73 自帶的八位A/D 轉換器擴展為十二位A/D 轉換器,給出了具體的設計方案和程序流程。它是用以 PIC16C73 為MCU 構成的海水有機磷測控儀A/D 轉換部分的一種解決方案。為監測海洋生態環境,研制了用于海水有機磷農藥現場監測的生物傳感器。為測定生物傳感器的信號,使傳感器可用于船載及臺站的海洋生態環境現場自動監測,需要對整個的采樣和排液裝置進行控制以及對傳感器來的信號進行實時采集處理,形成有機磷的濃度傳給上位機。為此,開發了以PIC16C73 單片機為核心的小型測控儀器,很好的完成了上述功能。PIC1673 單片機自帶8 位的A/D 轉換器,但不能滿足系統對精度的要求,本設計在單片機自帶8 位A/D 基礎上加少量的硬件和軟件開銷,使其擴展為十二位A/D 轉換器,滿足了系統的要求。
上傳時間: 2013-10-30
上傳用戶:a296386173
新穎實用的單片機雙積分A/D轉換電路和軟件:摘 要: 通過對雙積分A/ D 轉換過程及其原理的分析,結合8031 單片機定時計數器的特點,設計出一種新的A/ D 轉換電路. 詳細介紹了這種轉換電路的硬件原理及工作過程,給出了實用的硬件電路與軟件設計框圖. 通過比較分析,可以看出這種A/ D 轉換電路性能價格比較高,軟件編程簡單,并且轉換速度和精度優于一般的A/ D 轉換電路. 這種設計思路為數模轉換器(A/ D) 的升級提高指出一個明確的方向.關鍵詞:單片機; 定時/ 計數器; A/ D 轉換; 雙積分 雙積分A/ D 及定時計數器原理:我們先分析雙積分A/ D 轉換的工作原理. 如圖1 所示,積分器先以固定時間T 對待測的輸入模擬電壓Vi 進行正向積分,積分電容C 積累的電荷為
上傳時間: 2014-01-18
上傳用戶:hewenzhi
The μPSD32xx family, from ST, consists of Flash programmable system devices with a 8032 MicrocontrollerCore. Of these, the μPSD3234A and μPSD3254A are notable for having a complete implementationof the USB hardware directly on the chip, complying with the Universal Serial Bus Specification, Revision1.1.This application note describes a demonstration program that has been written for the DK3200 hardwaredemonstration kit (incorporating a μPSD3234A device). It gives the user an idea of how simple it is to workwith the device, using the HID class as a ready-made device driver for the USB connection.IN-APPLICATION-PROGRAMMING (IAP) AND IN-SYSTEM-PROGRAMMING (ISP)Since the μPSD contains two independent Flash memory arrays, the Micro Controller Unit (MCU) can executecode from one memory while erasing and programming the other. Product firmware updates in thefield can be reliably performed over any communication channel (such as CAN, Ethernet, UART, J1850)using this unique architecture. For In-Application-Programming (IAP), all code is updated through theMCU. The main advantage for the user is that the firmware can be updated remotely. The target applicationruns and takes care on its own program code and data memory.IAP is not the only method to program the firmware in μPSD devices. They can also be programmed usingIn-System-Programming (ISP). A IEEE1149.1-compliant JTAG interface is included on the μPSD. Withthis, the entire device can be rapidly programmed while soldered to the circuit board (Main Flash memory,Secondary Boot Flash memory, the PLD, and all configuration areas). This requires no MCU participation.The MCU is completely bypassed. So, the μPSD can be programmed or reprogrammed any time, anywhere, even when completely uncommitted.Both methods take place with the device in its normal hardware environment, soldered to a printed circuitboard. The IAP method cannot be used without previous use of ISP, because IAP utilizes a small amountof resident code to receive the service commands, and to perform the desired operations.
標簽: Demonstration 3200 USB for
上傳時間: 2014-02-27
上傳用戶:zhangzhenyu
The 87LPC76X Microcontroller combines in a small package thebenefits of a high-performance microcontroller with on-boardhardware supporting the Inter-Integrated Circuit (I2C) bus interface.The 87LPC76X can be programmed both as an I2C bus master, aslave, or both. An overview of the I2C bus and description of the bussupport hardware in the 87LPC76X microcontrollers appears inapplication note AN464, Using the 87LPC76X Microcontroller as anI2C Bus Master. That application note includes a programmingexample, demonstrating a bus-master code. Here we show anexample of programming the microcontroller as an I2C slave.The code listing demonstrates communications routines for the87LPC76X as a slave on the I2C bus. It compliments the program inAN464 which demonstrates the 87LPC76X as an I2C bus master.One may demonstrate two 87LPC76X devices communicating witheach other on the I2C bus, using the AN464 code in one, and theprogram presented here in the other. The examples presented hereand in AN464 allow the 87LPC76X to be either a master or a slave,but not both. Switching between master and slave roles in amultimaster environment is described in application note AN435.The software for a slave on the bus is relatively simple, as theprocessor plays a relatively passive role. It does not initiate bustransfers on its own, but responds to a master initiating thecommunications. This is true whether the slave receives or transmitsdata—transmission takes place only as a response to a busmaster’s request. The slave does not have to worry about arbitrationor about devices which do not acknowledge their address. As theslave is not supposed to take control of the bus, we do not demandit to resolve bus exceptions or “hangups”. If the bus becomesinactive the processor simply withdraws, not interfering with themaster (or masters) on the bus which should (hopefully) try toresolve the situation.
上傳時間: 2013-11-19
上傳用戶:shirleyYim
The 87C576 includes two separate methods of programming theEPROM array, the traditional modified Quick-Pulse method, and anew On-Board Programming technique (OBP).Quick Pulse programming is a method using a number of devicepins in parallel (see Figure 1) and is the traditional way in which87C51 family members have been programmed. The Quick-Pulsemethod supports the following programming functions:– program USER EPROM– verify USER EPROM– program KEY EPROM– program security bits– verify security bits– read signature bytesThe Quick-Pulse method is quite easily suited to standardprogramming equipment as evidenced by the numerous vendors of87C51 compatible programmers on the market today. Onedisadvantage is that this method is not well suited to programming inthe embedded application because of the large number of signallines that must be isolated from the application. In addition, parallelsignals from a programmer would need to be cabled to theapplication’s circuit board, or the application circuit board wouldneed to have logic built-in to perform the programming functions.These requirements have generally made in-circuit programmingusing the modified Quick Pulse method impractical in almost all87C51 family applications.
上傳時間: 2013-10-21
上傳用戶:xiaozhiqban
18-2. D/A轉換器基本知識18-3. 光導智能小車硬件實現18-4. ADC0832基本應用方法18-5. 光導智能小車軟件實現A/D轉換器的主要技術指標分辨率 使輸出數字量變化一個相鄰數碼所需輸入模擬電壓的變化量。常 用二進制的位數表示。 例如:12位ADC的分辨率就是12位,一個10V滿刻度的12位ADC能分辨 輸入電壓變化最小是: 10V×1/212=2.4mV量化誤差 ADC把模擬量變為數字量,用數字量近似表示模擬量,這個過程稱為量化。量化誤差是ADC的有限位數對模擬量進行量化而引起的誤差。A/D轉換器的主要技術指標偏移誤差 指輸入信號為零時,輸出信號不為零的值,所以有時又稱為零值誤差。滿刻度誤差 滿刻度誤差又稱為增益誤差。指滿刻度輸出數碼所對應的實際輸入電壓與理想輸入電壓之差。線性度 線性度有時又稱為非線性度,指轉換器實際的轉換特性與理想直線的最大偏差。A/D轉換器的主要技術指標絕對精度 在一個轉換器中,任何數碼所對應的實際模擬量輸入與理論模擬輸入之差的最大值,稱為絕對精度。對于ADC而言,可以在每一個階梯的水平中點進行測量,它包括了所有的誤差。轉換速率 指ADC能夠重復進行數據轉換的速度,即每秒轉換的次數。而完成一次A/D轉換所需的時間(包括穩定時間),則是轉換速率的倒數。
上傳時間: 2013-11-25
上傳用戶:banlangen
MCSÉ-51 Programmer's Guide and Instruction Set The information presented in this chapter is collected from the MCSÉ-51 Architectural Overview and the HardwareDescription of the 8051, 8052 and 80C51 chapters of this book. The material has been selected and rearranged toform a quick and convenient reference for the programmers of the MCS-51. This guide pertains specifically to the8051, 8052 and 80C51.
上傳時間: 2013-11-13
上傳用戶:hj_18
Σ-ΔA/D技術具有高分辨率、高線性度和低成本的特點。本文基于TI公司的MSP430F1121單片機,介紹了采用內置比較器和外圍電路構成類似于Σ-△的高精度A/D實現方案,適合用于對溫度、壓力和電壓等緩慢變化信號的采集應用。 在各種A/D轉換器中,最常用是逐次逼近法(SAR)A/D,該類器件具有轉換時間固定且快速的特點,但難以顯著提高分辨率;積分型A/D 有較強的抗干擾能力,但轉換時間較長;過采樣Σ-ΔA/D由于其高分辨率,高線性度及低成本的特點,正得到越來越多的應用。根據這些特點,本文以TI公司的MSP430F1121單片機實現了一種類似于Σ-ΔA/D技術的高精度轉換器方案。 MSP430F1121是16位RISC結構的FLASH型單片機,該芯片有14個雙向I/O口并兼有中斷功能,一個16位定時器兼有計數和定時功能。I/O口輸出高電平時電壓接近Vcc,低電平時接近Vss,因此,一個I/O口可以看作一位DAC,具有PWM功能。 該芯片具有一個內置模擬電壓比較器,只須外接一只電阻和電容即可構成一個類似于Σ-Δ技術的高精度單斜率A/D。一般而言,比較器在使用過程中會受到兩種因素的影響,一種是比較器輸入端的偏置電壓的積累;另一種是兩個輸入端電壓接近到一程度時,輸出端會產生振蕩。 MSP430F1121單片機在比較器兩輸入端對應的單片機端口與片外輸入信號的連接線路保持不變的情況下,可通過軟件將比較器兩輸入端與對應的單片機端口的連接線路交換,并同時將比較器的輸出極性變換,這樣抵消了比較器的輸入端累積的偏置電壓。通過在內部將輸出連接到低通濾波器后,即使在比較器輸入端兩比較電壓非常接近,經過濾波后也不會出現輸出端的振蕩現象,從而消除了輸出端震蕩的問題。利用內置比較器實現高精度A/D圖1是一個可直接使用的A/D轉換方案,該方案是一個高精度的積分型A/D轉換器。其基本原理是用單一的I/O端口,執行1位的數模轉換,以比較器的輸出作反饋,來維持Vout與Vin相等。圖1:利用MSP430F1121實現的實用A/D轉換器電路方案。
上傳時間: 2013-11-10
上傳用戶:lliuhhui
摘 要 瞬態仿真領域的許多工作需要獲得可視化數據, 仿真電路不能將輸出參數繪制成圖形時研究工作將受到很大影響. 而權威電路仿真軟件PSpice 在這個方面不盡如人意. 本文提出了一種有效的解決辦法: 通過MATLAB 編程搭建一個PSpice 與MATLAB 的數據接口,使PSpice輸出數據文件可以導入到MATLAB中繪制圖形. 這令我們能夠很方便地獲得數據的規律以有效地分析仿真結果, 這項技術對于教學和工程實踐都有比較實際的幫助.關鍵詞: 瞬態仿真 仿真程序 PSpice MATLAB 可視化數據The Data Transfer from Pspice to MATLABWu hao Ning yuanzhong Liang yingAbstract Many works in the area of transient simulation has shown how a emulator such asPSpice can be interfaced to an control analysis package such as MATLAB to get viewdata. Thepaper describes how such interfaces can be made using the MATLAB programming. The platformas a typical platform will solve the problem that PSpice software sometimes can not draw the datato a picture. It can make us find the rule from numerous data very expediently, so we can analyzethe outcome of the simulation. And it also can be used in the field of education.Keywords Transient Simulation Emulator PSpice MATLAB Viewdata1 引言科學研究和工程應用常需要進行電路仿真 PSpice可進行直流 交流 瞬態等基本電路特性分析 也可進行蒙托卡諾 MC 統計分析 最壞情況 Wcase 分析 優化設計等復雜電路特性分析 它是國際上仿真電路的權威軟件 而MATLAB的主要特點有 高效方便的矩陣和數組運算 編程效率高 結構化面向對象 方便的繪圖功能 用戶使用方便 工具箱功能強大 兩者各有著重點 兩種軟件結合應用 對研究工作有很重要的意義香港理工大學Y. S. LEE 等人首先將PSpice和MATLAB結合 開發了電力電子電路優化用的CAD 程序MATSPICE[6] 將兩者相結合的關鍵在于 如何用MATLAB 獲取PSpice的仿真數據 對此參考文獻 6 里沒有詳細敘述 本文著重說明用MATLAB 讀取PSpice仿真數據的具體方法本論文利用MATLAB對PSpice仿真出的數據處理繪制出后者無法得到或是效果不好的仿真圖形 下面就兩者結合使用的例子 進行具體說明
上傳時間: 2013-10-20
上傳用戶:wuchunzhong