Contents
4.2.16 IOCA1 ( DT2H: the Most Significant Byte
( Bit 1 ~ Bit 0 ) of Duty Cycle of PWM2 )....................................................................18
4.2.17 IOCB1 ( PRD2: Period of PWM2 ) ..............................................................................19
4.2.18 IOCC1 ( DL1L: the Least Significant Byte
( Bit 7 ~ Bit 0 ) of Duty Cycle Latch of PWM1 ) ..........................................................19
4.2.19 IOCD1 ( DL1H: the Most Significant Byte
( Bit 1 ~ Bit 0 ) of Duty Cycle Latch of PWM1 ) ..........................................................19
4.2.20 IOCE1 ( DL2L: the Least Significant Byte
( Bit 7 ~ Bit 0) of Duty Cycle Latch of PWM2 ) ...........................................................19
4.2.21 IOCF1 ( DL2H: the Most Significant Byte
( Bit 1 ~ Bit 0 ) of Duty Cycle Latch of PWM2 ) ..........................................................19
4.3 TCC/WDT & Prescaler...............................................................................................19
4.4 I/O Ports.....................................................................................................................20
4.5 RESET and Wake-up.................................................................................................23
4.5.1 The Function of RESET and Wake-up ........................................................................23
4.5.2 The Status of T, and P of STATUS Register................................................................25
4.6 Interrupt......................................................................................................................26
4.7 Analog-To-Digital Converter (ADC)............................................................................27
4.7.1 ADC Control Register (ADCON/R9, AD-CMP-CON/IOCA0, GCON/IOC90) .............28
4.7.2 ADC Data Register (ADDATA/RA) ..............................................................................30
4.7.3 A/D Sampling Time......................................................................................................30
4.7.4 A/D Conversion Time...................................................................................................30
4.7.5 A/D Operation During Sleep Mode..............................................................................31
4.7.6 Programming Steps/Considerations............................................................................31
4.8 Dual Sets of PWM ( Pulse Width Modulation )...........................................................34
4.8.1 Overview......................................................................................................................34
4.8.2 Increment Timer Counter ( TMRX: TMR1H/TWR1L or TMR2H/TWR2L )..................35
4.8.3 PWM Period ( PRDX : PRD1 or PRD2 ) .....................................................................35
4.8.4 PWM Duty Cycle ( DTX: DT1H/ DT1L and DT2H/ DT2L; DTL:
DL1H/DL1L and DL2H/DL2L ).....................................................................................35
4.8.5 Comparator X ..............................................................................................................35
4.8.6 PWM Programming Procedures/Steps........................................................................35
4.9 Timer..........................................................................................................................36
4.9.1 Overview......................................................................................................................36
4.9.2 Function description ....................................................................................................36
4.9.3 Programming the Related Registers ...........................................................................37
4.9.4 Timer programming procedures/steps.........................................................................37
4.10 Comparator ................................................................................................................37
4.10.1 External Reference Signal...........................................................................................37
4.10.2 Comparator Outputs....................................................................................................38
4.10.3 Using as An Operation Amplifier..................................................................................38
4.10.4 Interrupt .......................................................................................................................38
4.10.5 Wake-up from SLEEP Mode .......................................................................................39
4.11 The Initialized Values after Reset...............................................................................39
4.12 Oscillator....................................................................................................................43
iv •
Product Specification (V1.4) 05.27.2005