NY8BM62D 14 I/O + 13-ch ADC 8-bit MTP-Based MCU
關鍵詞: NY8BM62D 8位微控制器 MTP 功能特性 工作模式 內存結構
NY8BM62D 14 I/O + 13-ch ADC 8-bit MTP-Based MCU
1. 概述
NY8BM62D 是以MTP作為程式記憶體,做為非揮發性資料記憶體的 8 位元微控制器。除此之外內建類比數位轉換器也適用於家電或量測等等的應用設計。採用CMOS製程並同時提供客戶低成本、高性能、等顯著優勢。而MTP作為程式記憶體能讓使用者更方便且有效率的開發產品。 NY8BM62D 核心建立在精簡指令集架構,可以很容易地做編輯和控制,共有 53 條指令。除了少數指令需要 2 個時序,大多數指令都是 1 個時序即能完成,可以讓使用者輕鬆地以程式控制完成不同的應用。因此非常適合各種中低記憶容量但又複雜的應用。NY8BM62D內建除錯仿真電路,利用兩個腳位與很少的外接硬體,就能實現在線仿真器的大多數功能, 例如設定程式執行條件與中斷條件, 片上單步執行,以及查看及設定各種暫存器的內容。仿真的執行效果將比一般的仿真器更接近實際IC運作。
NY8BM62D內建12位元高精度11+2通道類比數位轉換器與高精度電壓比較器,足以應付各種類比介面的偵測與量測。NY8BM62D內建的高頻振盪器, 在I/O的資源方面,NY8BM62D 有 14 根彈性的雙向I/O腳,每個I/O腳都有單獨的暫存器控制為輸入或輸出腳。而且每一個I/O腳位都有附加的程式控制功能如上拉或下拉電阻或開漏極(Open-Drain) 輸出。此外針對紅外線搖控的產品方面,NY8BM62D內建了可選擇頻率的紅外載波發射口。
NY8BM62D 有四組計時器,可用系統頻率當作一般的計時的應用或者從外部訊號觸發來計數。另外NY8BM62D 提供5 組 10 位元解析度的PWM輸出,1 組蜂鳴器輸出可用來驅動馬達、LED、或蜂鳴器等等。NY8BM62D的計時器同時具有增強型捕捉/比較/可編程死區時間的PWM模塊(ECCP).
NY8BM62D 採用雙時鐘機制,高速振盪或者低速振盪都可以分別選擇內部RC振盪或外部晶振輸入。在雙時鐘機制下,NY8BM62D 可選擇多種工作模式如正常模式(Normal)、慢速模式(Slow mode)、待機模式(Standby mode) 與睡眠模式(Halt mode)可節省電力消耗延長電池壽命。並且微控制器在使用內部RC高速振盪時,低速振盪可以同時使用外部精準的晶振計時,可以維持高速處理同時又能精準計算真實時間。在省電的模式下如待機模式(Standby mode) 與睡眠模式(Halt mode)中,有多種事件可以觸發中斷喚醒NY8BM62D 進入正常操作模式(Normal) 或 慢速模式(Slow mode) 來處理突發事件。
NY8BM62D能使用內建除錯模擬電路來模擬實際IC動作。
1.1 功能
? 系統主頻提供 20M/16M/8M/4M/2M/1M(2T/4T)各種選擇。
? Timer 1/4/5 可選擇系統主頻直接輸入。
? 內建二線控制的除錯模擬電路(On Chip Debug)。
? 寬廣的工作電壓:
? 2.0V ~ 5.5V @系統頻率 ≦8MHz。
? 2.2V ~ 5.5V @系統頻率 > 8MHz。
? 寬廣的工作溫度:-40°C ~ 85°C。
? 2Kx14 bits MTP。
? 128 bytes SRAM。
? 14 根可分別單獨控制輸入輸出方向的I/O腳(GPIO)、PA[7:0]、PB[5:0] 。
? PA[5:0]及PB[3:0]可選擇輸入時使用內建下拉電阻。
? PA[7:0]及PB[5:0]可選擇輸入時使用上拉電阻,上拉電阻為 100KΩ。
? PB[5:0]可選擇開漏極輸出(Open-Drain)。
? 除了PA5(VPP PIN)外, 所有I/O腳輸出灌電流(Sink Current)有三檔可選: 小(Small)、一般(Normal)或大(Large)。
? 除了PA5(VPP PIN)外,所有I/O腳輸出推電流(Drive Current)可選擇小(Small)或一般(Normal)。
? 8 層程式堆棧(Stack)。
? 存取資料有直接或間接定址模式。
? 一組 8 位元上數計時器(Timer0)包含可程式化的頻率預除線路。
? 三組 10 位元下數計時器(Timer1, 4, 5)可選重複載入或連續下數計時。
? 五個 10 位元脈衝寬度調變(PWM1, 2, 3, 4, 5)。
? Timer4, 5 可組成 16 位元捕捉/比較功能, Timer5/PWM5 可轉變成具死區控制的PWM輸出。
? 一個蜂鳴器輸出(BZ1)。
? 38/57KHz紅外線載波頻率可供選擇,同時載波之極性也可以根據數據作選擇。
? 內建準確的低電壓偵測電路(LVD)。
? 內建 11+2 通道 12 位元類比數位轉換器(Analog to Digital Converter)。
? 內建準確的電壓比較器(Voltage Comparator)。
? 內建上電復位電路(POR)。
? 內建低壓復位功能(LVR)。
? 內建看門狗計時(WDT),可由程式韌體控制開關。
? 內建電阻頻率轉換器(RFC)功能.
? 雙時鐘機制,系統可以隨時切換高速振盪或者低速振盪。
? 高速振盪:E_HXT (超過 6MHz外部高速石英振盪)
E_XT (455K~6MHz外部石英振盪)
I_HRC (1~20MHz內部高速RC振盪)
? 低速振盪:E_LXT (32KHz外部低速石英振盪)
I_LRC (內部 32KHz低速RC振盪)
? 四種工作模式可隨系統需求調整電流消耗:正常模式(Normal)、慢速模式(Slow mode)、待機模式(Standby
mode) 與 睡眠模式(Halt mode)。
? 十一種硬體中斷:
? Timer0 溢位中斷。
? Timer1 借位中斷。
? Timer4 借位中斷。
? Timer5 借位中斷 or CCP中斷。
? WDT 中斷。
? PA/PB 輸入狀態改變中斷。
? 三組外部中斷輸入。
? 低電壓偵測/比較器輸出轉態中斷。
? 類比數位轉換完成中斷°
? NY8BM62D在待機模式(Standby mode)下的十一種喚醒中斷:
? Timer0 溢位中斷。
? Timer1 借位中斷。
? Timer4 借位中斷。
? Timer5 借位中斷 or CCP中斷。
? WDT 中斷。
? PA/PB 輸入狀態改變中斷。
? 三組外部中斷輸入。
? 低電壓偵測/比較器輸出轉態中斷。
? 類比數位轉換完成中斷。
? NY8BM62D在睡眠模式(Halt mode)下的五種喚醒中斷:
? WDT 中斷。
? PA/PB 輸入狀態改變中斷。
? 三組外部中斷輸入。
1.2 Block Diagram

2. Memory Organization
NY8BM62D memory is divided into two categories: one is program memory and the other is data memory. Datamemory is subdivided into Register Memory.
2.1Program Memory
The program memory space of NY8BM62D is 2K words. Therefore, the Program Counter (PC) is 11-bit wide inorder to address any location of program memory.Some locations of program memory are reserved as interrupt entrance. Power-On Reset vector is located at0x000. Software interrupt vector is located at 0x001. Internal and external hardware interrupt vector is located at0x008.
NY8BM62D provides instruction GOTOA, CALLA to address 256 location of program space. NY8BM62Dprovides instructions LCALL and LGOTO to address any location of program space.When a call or interrupt is happening, next ROM address is written to top of the stack, when RET, RETIA orRETIE instruction is executed, the top of stack data is read and loaded to PC.
NY8BM62D program ROM address 0x7FE~0x7FF are reserved space, if user tries to write code in theseaddresses will get unexpected false functions.
NY8BM62D program ROM address 0x00E~0x00F are preset rolling code and can be released and used asnormal program space.NY8BM62D share the ROM address 0x6C0~0x7FF as OCD space. If user use more than 0x6BF programspace, OCD function would be disabled.
2.2 Register Memory
According to instructions used to access register, this memory can be divided into four kinds of categories: thatis , R-page, F-page, S-page and T-page. R-page register consists of Special-function register (SFR) andGeneral Purpose Register (GPR), GPR are made of SRAM and user can use them to store variables orintermediate results.R-page data memory is divided into 4 banks and can be accessed directly or indirectly through a SFR registerwhich is File Select Register (FSR). STATUS [7:6] are used as Bank register BK[1:0] to select one bank out ofthe 4 banks.
There are 2 addressing mode for R-page register accessing: direct addressing mode and indirect addressingmode.The indirect addressing mode of data memory access is described in the following graph. This indirectaddressing mode is implied by accessing register INDF. The bank selection is determined by STATUS[7:6] andthe location selection is from FSR[6:0].
3.Website:www.baitaishengshi.com
