Slide 1 Slide 2 Slide 3 Slide 4 Slide 5 Slide 6 Slide 7 Slide 8 Slide 9 Slide 10 Slide 11 Slide 12 Slide 13 Slide 14 Slide 15 Product List
RS08KA2-Slide8

A/D emulation is accomplished using the on-chip peripheral analog comparator and the 8-bit modulo timer (MTIM). The PTA0 pin is first set as output zero to discharge the capacitor. The analog comparator is then configured and the MTIM begins counting. The MTIM essentially measures the time it takes for the RC voltage to match the input voltage. The timer count is used against a look-up table to determine the 8-bit ADC value. Even though the memory size is limited, the table is used to resolve the charge/discharge of a capacitor. 

PTM Published on: 2011-09-19