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

SN8P1706P 参数 Datasheet PDF下载

SN8P1706P图片预览
型号: SN8P1706P
PDF下载: 下载PDF文件 查看货源
内容描述: 8位微控制器 [8-Bit Micro-Controller]
分类和应用: 微控制器
文件页数/大小: 145 页 / 774 K
品牌: SONIX [ SONIX TECHNOLOGY COMPANY ]
 浏览型号SN8P1706P的Datasheet PDF文件第67页浏览型号SN8P1706P的Datasheet PDF文件第68页浏览型号SN8P1706P的Datasheet PDF文件第69页浏览型号SN8P1706P的Datasheet PDF文件第70页浏览型号SN8P1706P的Datasheet PDF文件第72页浏览型号SN8P1706P的Datasheet PDF文件第73页浏览型号SN8P1706P的Datasheet PDF文件第74页浏览型号SN8P1706P的Datasheet PDF文件第75页  
SN8P1700  
8-bit micro-controller build-in 12-bit ADC  
T0 BASIC TIMER OPERATION SEQUENCE  
The T0 basic timer’s sequence of operation can be following.  
Set the T0C initial value to setup the interval time.  
Set the T0ENB to be “1” to enable T0 basic timer.  
T0C is incremented by one with each clock pulse which frequency is corresponding to T0M selection.  
T0C overflow when T0C from FFH to 00H.  
When T0C overflow occur, the T0IRQ flag is set to be “1” by hardware.  
Execute the interrupt service routine.  
Users reset the T0C value and resume the T0 timer operation.  
Example: Setup the T0M and T0C.  
B0BCLR  
B0BCLR  
MOV  
B0MOV  
MOV  
B0MOV  
B0BSET  
B0BCLR  
B0BSET  
FT0IEN  
; To disable T0 interrupt service  
; To disable T0 timer  
;
FT0ENB  
A,#20H  
T0M,A  
A,#74H  
T0C,A  
FT0IEN  
FT0IRQ  
FT0ENB  
; To set T0 clock = fcpu / 64  
; To set T0C initial value = 74H (To set T0 interval = 10 ms)  
; To enable T0 interrupt service  
; To clear T0 interrupt request  
; To enable T0 timer  
Example: T0 interrupt service routine.  
ORG  
JMP  
8
; Interrupt vector  
INT_SERVICE  
INT_SERVICE:  
B0XCH  
PUSH  
A, ACCBUF  
; B0XCH doesn’t change C, Z flag  
; Push  
B0BTS1  
JMP  
FT0IRQ  
EXIT_INT  
; Check T0IRQ  
; T0IRQ = 0, exit interrupt vector  
B0BCLR  
MOV  
FT0IRQ  
A,#74H  
; Reset T0IRQ  
; Reload T0C  
B0MOV  
T0C,A  
.
.
; T0 interrupt service routine  
.
.
JMP  
EXIT_INT  
; End of T0 interrupt service routine and exit interrupt vector  
.
.
.
.
EXIT_INT:  
POP  
; Pop  
B0XCH  
A, ACCBUF  
;Restore ACC value  
RETI  
; Exit interrupt vector  
SONiX TECHNOLOGY CO., LTD  
Page 71  
Revision 1.94  
 复制成功!