26.10.2013 Views

Analog Comparator - Freescale

Analog Comparator - Freescale

Analog Comparator - Freescale

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Implementation<br />

Emulated ADC Example using <strong>Analog</strong> <strong>Comparator</strong><br />

►Define sampling time and timer<br />

resolution<br />

►Define RC time constant<br />

►Construct lookup table<br />

►Define bus frequency<br />

►Calibration<br />

<strong>Freescale</strong> and the <strong>Freescale</strong> logo are trademarks of <strong>Freescale</strong> Semiconductor, Inc. All other product or service names are<br />

the property of their respective owners. © <strong>Freescale</strong> Semiconductor, Inc. 2007-2008. 27<br />

ChargeUpTime<br />

TimerResolution =<br />

2<br />

ChargeUpTime chosen to be 1ms<br />

n=8 for 8-bit timer (MTIM)<br />

TimerResolution is 3.9us (round to 4us)<br />

Max timer overflow = 255*4us= 1.02ms<br />

n –1<br />

TM

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!