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

PFS122-1J16A 参数 Datasheet PDF下载

PFS122-1J16A图片预览
型号: PFS122-1J16A
PDF下载: 下载PDF文件 查看货源
内容描述: [8bit MTP Type MCU with 12-bit R-Type ADC]
分类和应用:
文件页数/大小: 93 页 / 1946 K
品牌: PADAUK [ PADAUK Technology ]
 浏览型号PFS122-1J16A的Datasheet PDF文件第48页浏览型号PFS122-1J16A的Datasheet PDF文件第49页浏览型号PFS122-1J16A的Datasheet PDF文件第50页浏览型号PFS122-1J16A的Datasheet PDF文件第51页浏览型号PFS122-1J16A的Datasheet PDF文件第53页浏览型号PFS122-1J16A的Datasheet PDF文件第54页浏览型号PFS122-1J16A的Datasheet PDF文件第55页浏览型号PFS122-1J16A的Datasheet PDF文件第56页  
PFS122  
8bit MTP MCU with 12-bit R-Type ADC  
User must reserve enough stack memory for interrupt, two bytes stack memory for one level interrupt and four  
bytes for two levels interrupt. For interrupt operation, the following sample program shows how to handle the  
interrupt, noticing that it needs four bytes stack memory to handle interrupt and pushaf.  
void  
{
FPPA0  
(void)  
...  
$
INTEN PA0;  
// INTEN =1; interrupt request when PA0 level changed  
// clear INTRQ  
INTRQ  
ENGINT  
...  
=
0;  
// global interrupt enable  
DISGINT  
...  
// global interrupt disable  
}
void  
{
Interrupt (void)  
// interrupt service routine  
PUSHAF  
// store ALU and FLAG register  
// If INTEN.PA0 will be opened and closed dynamically,  
// user can judge whether INTEN.PA0 =1 or not.  
// Example: If (INTEN.PA0 && INTRQ.PA0) {…}  
// If INTEN.PA0 is always enable,  
// user can omit the INTEN.PA0 judgement to speed up interrupt service routine.  
If (INTRQ.PA0)  
{
// Here for PA0 interrupt service routine  
INTRQ.PA0 = 0;  
// Delete corresponding bit (take PA0 for example)  
...  
}
...  
// X : INTRQ = 0;  
// It is not recommended to use INTRQ = 0 to clear all at the end of  
the  
// interrupt service routine.  
// It may accidentally clear out the interrupts that have just occurred  
// and are not yet processed.  
POPAF  
}
// restore ALU and FLAG register  
©Copyright 2020, PADAUK Technology Co. Ltd  
Page 52 of 93  
PDK-DS-PFS122-EN_V000-May 28, 2020  
 复制成功!