| Electronic Components Datasheet Search |
|
SN8F2255B Datasheet(PDF) 87 Page - SONiX Technology Company |
|
|
|||||||||||||||||||||||||||||
SN8F2255B Datasheet(HTML) 87 Page - SONiX Technology Company |
|
87 / 133 page ![]() SN8F2250B Series USB 2.0 Full-Speed 8-Bit Micro-Controller SONiX TECHNOLOGY CO., LTD Page 87 Version 1.1 8.4.6 TC0 TIMER OPERATION SEQUENCE TC0 timer operation includes timer interrupt, event counter, TC0OUT and PWM. The sequence of setup TC0 timer is as following. Stop TC0 timer counting, disable TC0 interrupt function and clear TC0 interrupt request flag. B0BCLR FTC0ENB ; TC0 timer, TC0OUT and PWM stop. B0BCLR FTC0IEN ; TC0 interrupt function is disabled. B0BCLR FTC0IRQ ; TC0 interrupt request flag is cleared. Set TC0 timer rate. (Besides event counter mode.) MOV A, #0xxx0000b ;The TC0 rate control bits exist in bit4~bit6 of TC0M. The ; value is from x000xxxxb~x111xxxxb. B0MOV TC0M,A ; TC0 interrupt function is disabled. Set TC0 timer clock source. ; Select TC0 internal / external clock source. B0BCLR FTC0CKS ; Select TC0 internal clock source. or B0BSET FTC0CKS ; Select TC0 external clock source. Set TC0 timer auto-load mode. B0BCLR FALOAD0 ; Enable TC0 auto reload function. or B0BSET FALOAD0 ; Disable TC0 auto reload function. Set TC0 interrupt interval time, TC0OUT (Buzzer) frequency or PWM duty cycle. ; Set TC0 interrupt interval time, TC0OUT (Buzzer) frequency or PWM duty. MOV A,#7FH ; TC0C and TC0R value is decided by TC0 mode. B0MOV TC0C,A ; Set TC0C value. B0MOV TC0R,A ; Set TC0R value under auto reload mode or PWM mode. ; In PWM mode, set PWM cycle. B0BCLR FALOAD0 ; ALOAD0, TC0OUT = 00, PWM cycle boundary is B0BCLR FTC0OUT ; 0~255. or B0BCLR FALOAD0 ; ALOAD0, TC0OUT = 01, PWM cycle boundary is B0BSET FTC0OUT ; 0~63. or B0BSET FALOAD0 ; ALOAD0, TC0OUT = 10, PWM cycle boundary is B0BCLR FTC0OUT ; 0~31. or B0BSET FALOAD0 ; ALOAD0, TC0OUT = 11, PWM cycle boundary is B0BSET FTC0OUT ; 0~15. Set TC0 timer function mode. B0BSET FTC0IEN ; Enable TC0 interrupt function. or B0BSET FTC0OUT ; Enable TC0OUT (Buzzer) function. or B0BSET FPWM0OUT ; Enable PWM function. Enable TC0 timer. B0BSET FTC0ENB ; Enable TC0 timer. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List 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 |