INTERNAL SPECIFICATIONS93EXF2 : Timer/counter 2 external flag bit which is set when the T2EX pin level (bit 1 ofport 1) is changed from “1” to “0” at EXEN2=1. This flag serves as the timerinterrupt 2 request signal. When an interrupt is generated, this flag must be resetto “0” by software.TF2 : Timer/counter 2 internal flag bit which is set when a carry signal is generated bytimer/counter 2 in 16-bit auto reload mode or capture mode. This flag serves asthe timer interrupt 2 request signal. When an interrupt is generated, this flagmust be reset to “0” by software.4.5.3.3 Timer/counter 2 operation modesTimer/counter 2 operation modes are set by combinations of the CP/RL2, TCLK, and RCLKbits in timer 2 control register (T2CON 0C8H) shown in Table 4-13. The timer modes are listedin Table 4-14.Table 4-13 Timer 2 control register (T2CON 0C8H)BitFlagSet7 6 5 4 3 2 1 0TF2 EXF2 RCLK TCLK EXEN2 TR2 C/ T2 CP/ RL2• • •Table 4-14 Timer/counter 2 modesRCLK TCLK CP/ RL2 TR20 0 0 10 0 1 1RCLK + TCLK = 1 × 1× × × 0Mode16-bit auto reload16-bit captureBaud rate generatorAll operations stopped4.5.3.3.1 16-bit auto reload mode16-bit auto reload mode is set by making the circuit connection shown in Figure 4-20 by settingRCLK=0, TCLK=0, and CP/RL2=0 as the bit conditions in timer 2 control register (T2CON).Timer/counter 2 operates in the following way when 16-bit auto reload mode is set. When atimer/counter 2 carry signal is generated, or when the signal applied to the T2EX pin (bit 1of port 1) is changed from level “1” to “0”, the reload data in the RCAP2L and RCAP2Hregisters is preset in L2 and TH2 of timer/counter 2. The timer/counter thus starts countingfrom this preset value.The timer/counter 2 carry signal is set in internal timer flag 2 (TF2), and the T2EX change isset in external timer flag 2 (EXF2). The TF2 and EXF2 serve as the timer interrupt 2 requestsignals with an interrupt call being made to address 43 (2BH) if the timer interrupt 2 has beenenabled. If an interrupt routine is commenced, the TF2 and EXF2 flags must be reset to “0”by software.