3.10.6.5.11 DBTC – Debounce Timer Compare Register

Name: DBTC
Offset: 0x153
Reset: 0x00

Changes to the DBTC register are only allowed when debouncing is disabled (set all DBENx registers to 0x00).

Bit 76543210 
 DBTC[7:0] 
Access R/WR/WR/WR/WR/WR/WR/WR/W 
Reset 00000000 

Bits 7:0 – DBTC[7:0] Debounce Timer Compare

The Debounce Timer Compare register contains an 8-bit value that is continuously compared with the 15-bit timer value. DBTC can be set from 0 to 255. The resulting debounce timings also depend on the DBCS and DBTMS bits of the debounce control register DBCR (see Table 3-83 and Table 3-84). The calculation of the debounce time is shown in the following table and the resulting timing ranges in Table 3-86.

After the debouncing time a wait time caused by a handshake synchronizer needs to be considered before the next debouncing cycle on the appropriate pin is started (approximately 6 clock cycles of debounce clock and 6 clock cycles of I/O clock).

Table 3-85. Debounce Timing Calculation
DBCSDBTMSTdebounce_ty
00(DBTC * 128 + 134) * 8 µs
01(DBTC + 7) * 8 µs
10(DBTC * 128 + 134) * 157 ns
11(DBTC + 7) * 157 ns
Table 3-86. Debounce Timing Ranges
DBCS0 (SRC)1 (FRC)
DBTMS0101
DBTC0255025502550255
Debounce Time1.1 ms262 ms56 µs2.1 ms21 µs5.1 ms1.1 µs41.1 µs