ABSTRACT

Digits are a human invention; nature does not count or measure using numbers. Natural phenomena occur in analog quantities. The analog quantity is converted to a discrete digital value range. The device that performs either conversion is called an analog-to-digital (A/D) or analog-to-digital converter. The reverse process, digital-to-analog, is also necessary, although not as often as A/D. The chapter explores A/D conversions in PIC software and hardware. It discusses the measurement of time in discrete units, and explains the use of real-time clocks in PIC circuits. In electronics, the typical A/D or ADC converter is a device that takes a voltage input and returns a binary digital number. An ideal A/D converter outputs into an infinite number of discrete steps that exactly represent the analog quantity. In the context of microcontrollers and embedded systems, real-time clocks are integrated circuits designed to keep track of time in conventional hours, that is, in years, days, hours, minutes, and seconds.