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

SN8P1604AK 参数 Datasheet PDF下载

SN8P1604AK图片预览
型号: SN8P1604AK
PDF下载: 下载PDF文件 查看货源
内容描述: 8位微控制器 [8-Bit Micro-Controller]
分类和应用: 微控制器
文件页数/大小: 94 页 / 531 K
品牌: SONIX [ SONIX TECHNOLOGY COMPANY ]
 浏览型号SN8P1604AK的Datasheet PDF文件第51页浏览型号SN8P1604AK的Datasheet PDF文件第52页浏览型号SN8P1604AK的Datasheet PDF文件第53页浏览型号SN8P1604AK的Datasheet PDF文件第54页浏览型号SN8P1604AK的Datasheet PDF文件第56页浏览型号SN8P1604AK的Datasheet PDF文件第57页浏览型号SN8P1604AK的Datasheet PDF文件第58页浏览型号SN8P1604AK的Datasheet PDF文件第59页  
SN8P1600  
8-bit micro-controller  
TC0 TIMER OPERATION SEQUENCE  
The TC0 timer’s sequence of operation may be as following.  
Set the TC0C initial value to setup the interval time.  
Set the TC0ENB to be “1” to enable TC0 timer.  
TC0C is incremented by one after each clock pulse corresponding to TC0M selection.  
TC0C overflow if TC0C from FFH to 00H.  
When TC0C overflow occur, the TC0IRQ flag is set to be “1” by hardware.  
Execute the interrupt service routine.  
Users reset the TC0C value and resume the TC0 timer operation.  
Example: Setup the TC0M and TC0C.  
B0BCLR  
B0BCLR  
MOV  
FTC0IEN  
FTC0ENB  
A,#20H  
; To disable TC0 interrupt service  
; To disable TC0 timer  
;
B0MOV  
MOV  
B0MOV  
TC0M,A  
A,#74H  
TC0C,A  
; To set TC0 clock = fcpu / 64  
; To set TC0C initial value = 74H  
;(To set TC0 interval = 10 ms)  
B0BSET  
B0BCLR  
B0BSET  
FTC0IEN  
FTC0IRQ  
FTC0ENB  
; To enable TC0 interrupt service  
; To clear TC0 interrupt request  
; To enable TC0 timer  
Example: TC0 interrupt service routine.  
ORG  
JMP  
8
; Interrupt vector  
INT_SERVICE  
INT_SERVICE:  
B0XCH  
B0MOV  
B0MOV  
A, ACCBUF  
A, PFLAG  
PFLAGBUF, A  
; B0xch instruction do not change C,Z flag  
B0BTS1  
JMP  
FTC0IRQ  
EXIT_INT  
; Check TC0IRQ  
; TC0IRQ = 0, exit interrupt vector  
B0BCLR  
MOV  
B0MOV  
.
FTC0IRQ  
A,#74H  
TC0C,A  
.
; Reset TC0IRQ  
; Reload TC0C  
; TC0 interrupt service routine  
.
.
JMP  
EXIT_INT  
; End of TC0 interrupt service routine and exit interrupt  
vector  
.
.
.
.
EXIT_INT:  
B0MOV  
B0MOV  
B0XCH  
A, PFLAGBUF  
PFLAG, A  
A, ACCBUF  
; Restore ACC value.  
; Exit interrupt vector  
RETI  
SONiX TECHNOLOGY CO., LTD  
Page 55  
Revision 1.94  
 复制成功!