| データシートサーチシステム |
|
SN8A1702AX データシート(PDF) 72 Page - SONiX Technology Company |
|
|
|||||||||||||||||||||||||||||
SN8A1702AX データシート(HTML) 72 Page - SONiX Technology Company |
|
72 / 112 page ![]() Preliminary SN8P1702A/SN8P1703A 8-bit micro-controller build-in 12-bit ADC SONiX TECHNOLOGY CO., LTD Page 72 Revision 0.5 TC1 TIMER COUNTER OPERATION SEQUENCE The TC1 timer’s sequence of operation can be following. Set the TC1C initial value to setup the interval time. Set the TC1ENB to be “1” to enable TC1 timer counter. TC1C is incremented by one with each clock pulse which frequency is corresponding to TC1M selection. TC1C overflow if TC1C from FFH to 00H. When TC1C overflow occur, the TC1IRQ flag is set to be “1” by hardware. Execute the interrupt service routine. Users reset the TC1C value and resume the TC1 timer operation. Example: Setup the TC1M and TC1C without auto-reload function.(TC1_Counter=8-bit, TC1X8=0) B0BCLR FTC1X8 ; B0BCLR FTC1IEN ; To disable TC1 interrupt service B0BCLR FTC1ENB ; To disable TC1 timer MOV A,#20H ; B0MOV TC1M,A ; To set TC1 clock = Fcpu / 64 MOV A,#74H ; To set TC1C initial value = 74H B0MOV TC1C,A ;(To set TC1 interval = 10 ms) B0BSET FTC1IEN ; To enable TC1 interrupt service B0BCLR FTC1IRQ ; To clear TC1 interrupt request B0BSET FTC1ENB ; To enable TC1 timer Example: Setup the TC1M and TC1C with auto-reload function. (TC1_Counter=8-bit, TC1X8=0) B0BCLR FTC1X8 ; To select TC1=Fcpu/2 as clock source B0BCLR FTC1IEN ; To disable TC1 interrupt service B0BCLR FTC1ENB ; To disable TC1 timer MOV A,#20H ; B0MOV TC1M,A ; To set TC1 clock = Fcpu / 64 MOV A,#74H ; To set TC1C initial value = 74H B0MOV TC1C,A ; (To set TC1 interval = 10 ms) B0MOV TC1R,A ; To set TC1R auto-reload register B0BSET FTC1IEN ; To enable TC1 interrupt service B0BCLR FTC1IRQ ; To clear TC1 interrupt request B0BSET FTC1ENB ; To enable TC1 timer B0BSET ALOAD1 ; To enable TC1 auto-reload function. |
|
リンク URL |
| ALLDATASHEETはお客様のビジネスに役立ちますか? [ DONATE ] |
Alldatasheetは | 広告 | お問い合わせ | プライバシーポリシー | データシートへのリンク | リンク交換 | メーカーリスト 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 |