Professional Documents
Culture Documents
Chapter 6
Objectives
Upon completion of this chapter, you will be able to:
Explain the ADC programming in C Explain the DAC interfacing, Sensor and Actuator interfacing. Discuss and apply the sensor and actuator system interfacing.
Introduction to ADC
Analog-to-Digital Converter (ADC) Widely used in data acquisition (DAQ)
ADC Resolution
n-bit 8 10 12 No. of steps 28 = 256 210 = 1024 212 = 4096 Step size (mV) 5/256 = 19.53mV 5/1024 = 4.88mV 5/4096 = 1.2mV
Assuming VREF = 5V
PCFG3:PCFG0 = 0000, AN10 AN0 as analog input PCFG3:PCFG0 = 1111, AN10 AN0 as digital I/O