欢迎访问ic37.com |
会员登录 免费注册
发布采购

C8051F363 参数 Datasheet PDF下载

C8051F363图片预览
型号: C8051F363
PDF下载: 下载PDF文件 查看货源
内容描述: 混合信号ISP功能的Flash MCU系列 [Mixed Signal ISP Flash MCU Family]
分类和应用:
文件页数/大小: 288 页 / 2659 K
品牌: SILICON [ SILICON ]
 浏览型号C8051F363的Datasheet PDF文件第86页浏览型号C8051F363的Datasheet PDF文件第87页浏览型号C8051F363的Datasheet PDF文件第88页浏览型号C8051F363的Datasheet PDF文件第89页浏览型号C8051F363的Datasheet PDF文件第91页浏览型号C8051F363的Datasheet PDF文件第92页浏览型号C8051F363的Datasheet PDF文件第93页浏览型号C8051F363的Datasheet PDF文件第94页  
C8051F360/1/2/3/4/5/6/7/8/9  
9.4.6.3. SFR Page Stack Example  
The following is an example that shows the operation of the SFR Page Stack during interrupts.  
In this example, the SFR Page Control is left in the default enabled state (i.e., SFRPGEN = 1), and the  
CIP-51 is executing in-line code that is writing values to OSCICN (SFR “OSCICN”, located at address  
0xB6 on SFR Page 0x0F). The device is also using the Programmable Counter Array (PCA) and the 10-bit  
ADC (ADC0) window comparator to monitor a voltage. The PCA is timing a critical control function in its  
interrupt service routine (ISR), so its interrupt is enabled and is set to high priority. The ADC0 is monitoring  
a voltage that is less important, but to minimize the software overhead its window comparator is being used  
with an associated ISR that is set to low priority. At this point, the SFR page is set to access the OSCICN  
SFR (SFRPAGE = 0x0F). See Figure 9.4 below.  
SFR Page  
Stack SFR's  
0x0F  
SFRPAGE  
(OSCICN)  
SFRNEXT  
SFRLAST  
Figure 9.4. SFR Page Stack While Using SFR Page 0x0F To Access OSCICN  
While CIP-51 executes in-line code (writing values to OSCICN in this example), ADC0 Window Compara-  
tor Interrupt occurs. The CIP-51 vectors to the ADC0 Window Comparator ISR and pushes the current  
SFR Page value (SFR Page 0x0F) into SFRNEXT in the SFR Page Stack. SFR page 0x00 is then auto-  
matically placed in the SFRPAGE register. SFRPAGE is considered the “top” of the SFR Page Stack. Soft-  
ware can now access the ADC0 SFR’s. Software may switch to any SFR Page by writing a new value to  
the SFRPAGE register at any time during the ADC0 ISR to access SFR’s that are not on SFR Page 0x00.  
See Figure 9.5 below.  
90  
Rev. 1.0