Contents
iv • Product Specification (V1.1) 05.24.2011
6.2.6 IOCA0 (TMR2: PWM2 Timer) ...........................................................................26
6.2.7 IOCB0 (Pull-down Control Register) .................................................................26
6.2.8 IOCC0 (Open-drain Control Register)...............................................................26
6.2.9 IOCD0 (Pull-high Control Register)...................................................................27
6.2.10 IOCE0 (WDT Control Register and Interrupt Mask Register 2) ........................27
6.2.11 IOCF0 (Interrupt Mask Register).......................................................................28
6.2.12 IOC51 (High Sink Control Register 1) ...............................................................29
6.2.13 IOC61 (High Sink Control Register 2) ...............................................................29
6.2.14 IOC71 (High Driver Control Register 1) ............................................................30
6.2.15 IOC81 (High Driver Control Register 2) ............................................................30
6.2.16 IOCF1 (Pull-high Control Register) ...................................................................31
6.3 TCC/WDT and Prescaler.................................................................................. 31
6.4 I/O Ports ........................................................................................................... 33
6.4.1 Usage of Port 5 Input Change Wake-up/Interrupt Function..............................35
6.5 Reset and Wake-up.......................................................................................... 35
6.5.1 Reset and Wake-up Operation..........................................................................35
6.5.1.1 Wake-up and Interrupt Modes Operation Summary ..........................38
6.5.1.2 Register Initial Values after Reset ......................................................40
6.5.1.3 Controller Reset Block Diagram.........................................................45
6.5.2 T and P Status under the Status Register .........................................................45
6.6 Interrupt ............................................................................................................ 46
6.7 Analog-to-Digital Converter (ADC) ................................................................... 48
6.7.1 ADC Control Register (AISR/R8, ADCON/R9, ADOC/RA) ...............................49
6.7.1.1 Bank 0 R8 (AISR: ADC Input Select Register)...................................49
6.7.1.2 Bank 0 R9 (ADCON: ADC Control Register) .....................................50
6.7.1.3 RA (ADOC: AD Offset Calibration Register).......................................51
6.7.1.4 Bank 1 RF (IRC Switch Register).......................................................52
6.7.2 ADC Data Register (ADDATA/RB, ADDATA1H/RC, ADDATA1L/RD) ..............52
6.7.3 ADC Sampling Time..........................................................................................52
6.7.4 AD Conversion Time .........................................................................................52
6.7.5 ADC Operation during Sleep Mode...................................................................53
6.7.6 Programming Process/Considerations..............................................................53
6.7.6.1 Programming Process........................................................................53
6.7.6.2 Sample Demo Programs ....................................................................54
6.8 Dual Sets of PWM (Pulse Width Modulation)................................................... 56
6.8.1 Overview ...........................................................................................................56
6.8.2 Increment Timer Counter (TMRX: TMR1 or TMR2) ..........................................57
6.8.3 PWM Time Period (TMRX: TMR1 or TMR2).....................................................57
6.8.4 PWM Duty Cycle (DTX: DT1 or DT2; DLX: DL1 or DL2) ..................................57
6.8.5 Comparator X ....................................................................................................58
6.8.6 PWM Programming Process/Steps...................................................................58