| データシートサーチシステム |
|
SN8A1702AX データシート(PDF) 68 Page - SONiX Technology Company |
|
|
|||||||||||||||||||||||||||||
SN8A1702AX データシート(HTML) 68 Page - SONiX Technology Company |
|
68 / 112 page ![]() Preliminary SN8P1702A/SN8P1703A 8-bit micro-controller build-in 12-bit ADC SONiX TECHNOLOGY CO., LTD Page 68 Revision 0.5 TC1C COUNTING REGISTER TC1C is an 8-bit counter register for the timer counter (TC1). TC1C must be reset whenever the TC1ENB is set “1” to start the timer. TC0C is incremented by one with a clock pulse which the frequency is determined by TC0RATE0 ~ TC0RATE2. When TC0C has incremented to “0FFH”, it is will be cleared to “00H” in next clock and an overflow is generated. Under TC1 interrupt service request (TC1IEN) enable condition, the TC1 interrupt request flag will be set “1” and the system executes the interrupt service routine. TC1C initial value = xxxx xxxx 0DDH Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 TC1C TC1C7 TC1C6 TC1C5 TC1C4 TC1C3 TC1C2 TC1C1 TC1C0 R/W R/W R/W R/W R/W R/W R/W R/W TC1 Overflow Time TC1 rate is determinate by TC1Rate and Code Option TC1_Counter, TC1Rate can set TC1 clock frequency from Fcpu and TC1_Counter set TC1 became 8-bit, 6-bit, 5-bit or 4-bit counter. The equation of TC1C initial value is as following. TC1C initial value = N - (TC1 interrupt interval time * input clock) Which N is determinate by code option: TC1_Counter TC1_Counter N Max. TC1C value 8-bit 256 255 6-bit 64 63 5-bit 32 31 4-bit 16 15 Note: TheTC1C must small or equal than Max. TC1 value. Example: To set 10ms interval time for TC1 interrupt at Fosc = 3.58MHz TC1C value (74H) = 256 - (10ms * fcpu/64) (TC1RATE=010, TC1_Counter=8-bit, TC1X8=0) TC1C initial value = 256 - (TC0 interrupt interval time * input clock) = 256 - (10ms * 3.58 * 106 / 4 / 64) = 256 - (0.01 * 3.58 * 106 / 4 / 64) = 116 = 74H Example: To set 1.25ms interval time for TC1 interrupt at Fosc = 3.58MHz TC1C value (74H) = 256 - (10ms * fcpu/64) (TC1RATE=010, TC1_Counter=8-bit, TC1X8=1) TC1C initial value = 256 - (TC0 interrupt interval time * input clock) = 256 - (1.25ms * 3.58 * 106 / 32) = 256 - (0.00125 * 3.58 * 106 / 32) = 116 = 74H Example: To set 1ms interval time for TC1 interrupt at Fosc = 3.58MHz TC1C value (32H) = 64 - (1ms * fcpu/64) (TC1RATE=010, TC1_COunter=6-bit, TC1X8=0) TC1C initial value = 64 - (TC0 interrupt interval time * input clock) = 64 - (1ms * 3.58 * 106 / 4 / 64) = 64 - (0.001 * 3.58 * 106 / 4 / 64) = 64 - 14 = 32H |
|
リンク 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 |