Adc Interfacing With Arm Processor
Adc Interfacing With Arm Processor
COM
APPARATUS REQUIED
1. ARM processor, EK-TM4C123GXL
2. Computer with energia software.
3. 1kΩ Resistor – 5 nos
4. Bread Board.
5. Connecting wires
THEORY
Five 1kΩ resistors are connected in series. 5V is supplied and the circuit is closed by the
ground. 5V is applied across 5 1kΩ resistors, so each resistor drops 1v, totally 5v. Test point in
ground, it produces 0 analog voltage, From ground after the first resistor produces 1 analog volt,
after the second resistor produces 2 analog volt, after the third resistor produces 3 analog volt,
after the fourth resistor produces 4 analog volt, all these test point voltage nodes are connected
with the analog IN pin of ARM processor one by one. Program is written to read analog value in
analog pin using analog read syntax and this received scale value in program is converted by
multiplication factor and can be displayed as 1,2,3,4 volt as digital numbers. Finally analog
voltage across the resistors is displayed as digital voltage value numbers in ARM processor
serial monitor.
PROCEDURE
1. Connections are given as per the circuit diagram.
2. ADC energia program is loaded in ARM processor.
3. Open the serial monitor in energia
4. In circuit connect analog pin to test point - gnd, 1, 2, 3, 4.
5. Observe the respective digital voltage values in serial monitor as 0,1,2,3,4
PROGRAM
int analogPin = PE_2;
int volt;
int val = 0;
void setup()
{
Serial.begin(9600);
}
void loop()
{
val = analogRead(analogPin);
Serial.print("scale value = ");
Serial.println(val);
volt =(5*val) /5000;
Serial.print(volt);
Serial.println(" volts");
delay(1000);
}
WWW.STUDENTSFOCUS.COM
CIRCUIT DIAGRAM
INPUT OUTPUT
ANALOG VALUE DIGITAL VALUE
(Mutimeter) (energia serial monitor)
GND 0
1 1
2 2
3 3
4 4
RESULT
Thus the Conversion of Analog to Digital is performed and verified with ARM processor
successfully