| công cụ tìm kiếm bảng dữ liệu linh kiện điện tử |
|
SN8A1702AX bảng dữ liệu(PDF) 71 Page - SONiX Technology Company |
|
|
|||||||||||||||||||||||||||||
SN8A1702AX bảng dữ liệu(HTML) 71 Page - SONiX Technology Company |
|
71 / 145 page ![]() SN8P1700 8-bit micro-controller build-in 12-bit ADC SONiX TECHNOLOGY CO., LTD Page 71 Revision 1.94 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 FT0IEN ; To disable T0 interrupt service B0BCLR FT0ENB ; To disable T0 timer MOV A,#20H ; B0MOV T0M,A ; To set T0 clock = fcpu / 64 MOV A,#74H B0MOV T0C,A ; To set T0C initial value = 74H (To set T0 interval = 10 ms) B0BSET FT0IEN ; To enable T0 interrupt service B0BCLR FT0IRQ ; To clear T0 interrupt request B0BSET FT0ENB ; To enable T0 timer Example: T0 interrupt service routine. ORG 8 ; Interrupt vector JMP INT_SERVICE INT_SERVICE: B0XCH A, ACCBUF ; B0XCH doesn’t change C, Z flag PUSH ; Push B0BTS1 FT0IRQ ; Check T0IRQ JMP EXIT_INT ; T0IRQ = 0, exit interrupt vector B0BCLR FT0IRQ ; Reset T0IRQ MOV A,#74H ; 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 |
|
Link URL |
| Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không? [ DONATE ] |
Alldatasheet là | Quảng cáo | Liên lạc với chúng tôi | Chính sách bảo mật | Liên kết đến bảng dữ liệu | Trao đổi link | Tìm kiếm theo nhà sản xuất All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |