NY8A050E 6 I/O 8-bit EPROM-Based MCU N
關(guān)鍵詞: NY8A050E 8位微控制器 EPROM 功能特性 工作模式 內(nèi)存結(jié)構(gòu)
NY8A050E 6 I/O 8-bit EPROM-Based MCU N
1. 概述
NY8A050E是以EPROM作為記憶體的 8 位元微控制器,專為多IO產(chǎn)品的應(yīng)用而設(shè)計,例如遙控器、風(fēng)扇/燈光控制或是遊樂器周邊等等。採用CMOS製程並同時提供客戶低成本、高性能等顯著優(yōu)勢。NY8A050E核心建立在RISC精簡指令集架構(gòu)可以很容易地做編輯和控制,共有 55 條指令。除了少數(shù)指令需要 2 個時序,大多數(shù)指令都是 1 個時序即能完成,可以讓使用者輕鬆地以程式控制完成不同的應(yīng)用。因此非常適合各種低記憶容量但又複雜的應(yīng)用。在I/O的資源方面,NY8A050E有 6 根彈性的雙向I/O腳,每個I/O腳都有單獨(dú)的暫存器控制為輸入或輸出腳。而且每一
個I/O腳位都有附加的程式控制功能如上拉或下拉電阻或開漏極(Open-Drain) 輸出。
NY8A050E有一組計時器,可用系統(tǒng)頻率當(dāng)作一般的計時的應(yīng)用或者從外部訊號觸發(fā)來計數(shù)。
NY8A050E採用雙時鐘機(jī)制,高速振盪或者低速振盪都由內(nèi)部RC振盪輸入。在雙時鐘機(jī)制下,NY8A050E可選擇多種工作模式如正常模式(Normal)、慢速模式(Slow mode)、待機(jī)模式(Standby mode) 與睡眠模式(Halt mode)可節(jié)省電力消耗延長電池壽命。在省電的模式下如待機(jī)模式(Standby mode)與睡眠模式(Halt mode)中,有多種事件可以觸發(fā)中斷喚醒NY8A050E進(jìn)入正常操作模式(Normal) 或 慢速模式(Slow mode) 來處理突發(fā)事件。
1.1 功能
? 寬廣的工作電壓:
? 2.0V ~ 5.5V @系統(tǒng)頻率≦8MHz。? 2.2V ~ 5.5V @系統(tǒng)頻率>8MHz。
? 寬廣的工作溫度:-40°C ~ 85°C。
? 512x14 bits EPROM。
? 32 bytes SRAM。
? 6 根可分別單獨(dú)控制輸入輸出方向的I/O腳(GPIO)、PB[5:0]。
? PB[3:0]可選擇輸入時使用內(nèi)建下拉電阻。
? PB[5:0]可選擇上拉電阻。
? PB[5:0]可選擇開漏極輸出(Open-Drain)。
? 4 層程式堆棧 (Stack)。
? 存取資料有直接或間接定址模式。
? 一組 8 位元上數(shù)計時器(Timer0)包含可程式化的頻率預(yù)除線路。
? 內(nèi)建上電復(fù)位電路(POR)。
? 內(nèi)建低壓復(fù)位功能(LVR)。
? 內(nèi)建看門狗計時(WDT),可由程式韌體控制開關(guān)。
? 雙時鐘機(jī)制,系統(tǒng)可以隨時切換高速振盪或者低速振盪。
? 高速振盪: I_HRC (1~20MHz內(nèi)部高速RC振盪)
? 低速振盪: I_LRC (內(nèi)部 32KHz低速RC振盪)
? 四種工作模式可隨系統(tǒng)需求調(diào)整電流消耗:正常模式(Normal)、慢速模式(Slow mode)、待機(jī)模式(Standby
mode) 與 睡眠模式(Halt mode)。
? 三種硬體中斷:
? Timer0 溢位中斷。
? PB 輸入狀態(tài)改變中斷。
? 外部中斷輸入。
? NY8A050E在待機(jī)模式(Standby mode)下的三種喚醒中斷:
? Timer0 溢位中斷。
? PB 輸入狀態(tài)改變中斷。
? 外部中斷輸入。
? NY8A050E在睡眠模式(Halt mode)下的二種喚醒中斷:
? PB 輸入狀態(tài)改變中斷。
? 外部中斷輸入。
1.2 NY8A050E 與 NY8A050D 的主要差異

1.3 Block Diagram

2. Memory Organization
NY8A050E memory is divided into two categories: one is program memory and the other is data memory.
2.1 Program Memory
The program memory space of NY8A050E is 512 words. Therefore, the Program Counter (PC) is 9 bit wide in order 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 locatedat 0x008.
NY8A050E provides instruction CALL, GOTOA, CALLA to address 256 location of program space. NY8A050Eprovides instruction GOTO to address 512 location of program space. NY8A050E also provides instructionsLCALL 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 load to PC.
NY8A050E program ROM address 0x1FE~0x1FF are reserved space, if user tries to write code in theseaddresses will get unexpected false functions.
NY8A050E program ROM address 0x00E~0x00F are preset rolling code can be released and used as normalprogram space.
2.2 Data Memory
According to instructions used to access data memory, the data memory can be divided into three kinds ofcategories: one is R-page Special-function Register (SFR) + General Purpose Register (GPR), another isF-page SFR and the other is S-page SFR. GPR are made of SRAM and user can use them to store variablesor intermediate 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). FSR[7:6] are used as Bank register BK[1:0] to select one bank out of the 4banks.R-page register can be divided into addressing mode: direct addressing mode and indirect addressing mode.
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 FSR[7:6] and thelocation selection is from FSR[5:0].
3、Website:www.baitaishengshi.com