SN8F2250B Series
USB 2.0 Full-Speed 8-Bit Micro-Controller
8.3 TIMER T1 (T1)....................................................................................................................... 79
8.3.1 OVERVIEW.................................................................................................................... 79
8.3.2 T1M MODE REGISTER ................................................................................................. 79
8.3.3 T1C COUNTING REGISTER ......................................................................................... 80
8.3.4 T1 TIMER OPERATION SEQUENCE............................................................................ 81
8.4 TIMER/COUNTER 0 (TC0).................................................................................................... 82
8.4.1 OVERVIEW.................................................................................................................... 82
8.4.2 TC0M MODE REGISTER............................................................................................... 83
8.4.3 TC0C COUNTING REGISTER....................................................................................... 84
8.4.4 TC0R AUTO-LOAD REGISTER..................................................................................... 85
8.4.5 TC0 CLOCK FREQUENCY OUTPUT (BUZZER)........................................................... 86
8.4.6 TC0 TIMER OPERATION SEQUENCE ......................................................................... 87
8.5 PWM0 MODE........................................................................................................................ 88
8.5.1 OVERVIEW.................................................................................................................... 88
8.5.2 TCxIRQ and PWM Duty ................................................................................................. 89
8.5.3 PWM Duty with TCxR Changing..................................................................................... 90
8.5.4 PWM PROGRAM EXAMPLE ......................................................................................... 91
8.6 TIMER/COUNTER 1 (TC1).................................................................................................... 92
8.6.1 OVERVIEW.................................................................................................................... 92
8.6.2 TC1M MODE REGISTER............................................................................................... 93
8.6.3 TC1C COUNTING REGISTER....................................................................................... 94
8.6.4 TC1R AUTO-LOAD REGISTER..................................................................................... 95
8.6.5 TC1 CLOCK FREQUENCY OUTPUT (BUZZER)........................................................... 96
8.6.6 TC1 TIMER OPERATION SEQUENCE ......................................................................... 97
8.7 PWM1 MODE........................................................................................................................ 98
8.7.1 OVERVIEW.................................................................................................................... 98
8.7.2 TCxIRQ and PWM Duty ................................................................................................. 99
8.7.3 PWM Duty with TCxR Changing................................................................................... 100
8.7.4 PWM PROGRAM EXAMPLE ....................................................................................... 101
9
UNIVERSAL SERIAL BUS (USB)........................................................................................ 102
9.1 OVERVIEW......................................................................................................................... 102
9.2 USB MACHINE ................................................................................................................... 102
9.3 USB INTERRUPT................................................................................................................ 102
9.4 USB ENUMERATION.......................................................................................................... 103
9.5 USB REGISTERS ............................................................................................................... 104
9.5.1 USB DEVICE ADDRESS REGISTER .......................................................................... 104
9.5.2 USB STATUS REGISTER............................................................................................ 104
9.5.3 USB DATA COUNT REGISTER................................................................................... 105
9.5.4 USB ENABLE CONTROL REGISTER ......................................................................... 105
9.5.5 USB endpoint’s ACK handshaking flag REGISTER ..................................................... 105
9.5.6 USB endpoint’s NAK handshaking flag REGISTER ..................................................... 106
9.5.7 USB ENDPOINT 0 ENABLE REGISTER ..................................................................... 106
9.5.8 USB ENDPOINT 1 ENABLE REGISTER ..................................................................... 107
9.5.9 USB ENDPOINT 2 ENABLE REGISTER ..................................................................... 107
9.5.10 USB ENDPOINT 3 ENABLE REGISTER ................................................................... 108
9.5.11 USB DATA POINTER REGISTER ............................................................................. 108
9.5.12 USB DATA READ/WRITE REGISTER....................................................................... 108
9.5.13 USB ENDPOINT OUT TOKEN DATA BYTES COUNTER......................................... 109
9.5.14 UPID REGISTER........................................................................................................ 109
9.5.15 ENDPOINT TOGGLE BIT CONTROL REGISTER..................................................... 109
SONiX TECHNOLOGY CO., LTD
Page 5
Version 1.1