User guide

DS4830A User’s Guide
6
SECTION 13 – 3-WIRE ....................................................................................................................................................... 121
13.1 Detailed Description ............................................................................................................................................. 121
13.1.1 Operation ....................................................................................................................................................... 121
13.2 – 3-Wire Register Descriptions ................................................................................................................................ 123
SECTION 14 PWM .......................................................................................................................................................... 124
14.1 Detailed Description ............................................................................................................................................. 124
14.1.1 PWMCN and PWMDATA SFRs .................................................................................................................... 124
14.1.2 PWMSYNC SFR ............................................................................................................................................ 125
14.2 Individual PWM Channel Operation ..................................................................................................................... 126
14.2.1 Duty Cycle Register (DCYCn) ....................................................................................................................... 126
14.2.2 PWM Configuration Register (PWMCFGn) ................................................................................................... 127
14.2.3 PWM DELAY Register (PWMDLYn) .............................................................................................................. 131
14.3 PWM Output Register Descriptions ...................................................................................................................... 132
14.4 PWM Output Code Examples .............................................................................................................................. 137
SECTION 15 GENERAL-PURPOSE INPUT/OUTPUT (GPIO) PINS ............................................................................. 138
15.1 Overview ............................................................................................................................................................... 138
15.2 GPIO Port Register Descriptions .......................................................................................................................... 141
15.2.1 GPIO Direction Register Port (PD0, PD1, PD2, and PD6) ............................................................................ 141
15.2.2 GPIO Output Register Port (PO0, PO1, PO2, and PO6)............................................................................... 141
15.2.3 GPIO Input Register for Port (PI0, PI1, PI2, and PI6) ................................................................................... 141
15.2.4 GPIO Port External Interrupt Edge Select Register (EIES0, EIES1, EIES2, and EIES6) ............................. 141
15.2.5 GPIO Port External Interrupt Flag Register (EIF0, EIF1, EIF2, and EIF6) .................................................... 142
15.2.6 GPIO Port External Interrupt Enable Register (EIE0, EIE1, EIE2, and EIE6) ............................................... 142
15.3 GPIO Code Example ............................................................................................................................................ 142
15.3.1 GPIO Pin as Output ....................................................................................................................................... 142
15.3.2 GPIO High-Impedance Input ......................................................................................................................... 142
15.3.3 GPIO Weak Pullup Input ................................................................................................................................ 142
15.3.4 GPIO Open-Drain Output .............................................................................................................................. 142
SECTION 16 GENERAL-PURPOSE TIMERS ................................................................................................................ 143
16.1 Detailed Description ............................................................................................................................................. 143
16.1.1 Timer Modes .................................................................................................................................................. 143
16.1.2 Clock Selection .............................................................................................................................................. 144
16.1.3 Timer Clock Prescaler ................................................................................................................................... 144
16.2 Timer Register Descriptions ................................................................................................................................. 145
SECTION 17 SUPPLY VOLTAGE MONITOR (SVM)...................................................................................................... 147
SECTION 18 HARDWARE MULTIPLIER MODULE ....................................................................................................... 148
18.1 Hardware Multiplier Organization ......................................................................................................................... 148
18.2 Hardware Multiplier Controls ................................................................................................................................ 148
18.3 Register Output Selection .................................................................................................................................... 149
18.3.1Signed-Unsigned Operand Selection ............................................................................................................ 149
18.3.2Operand Count Selection .............................................................................................................................. 149
18.4Hardware Multiplier Operations ............................................................................................................................ 149