Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Construct the circuit as shown in the Figure. Check your wiring and make sure that no connection is made to the 5 V supply. The

Construct the circuit as shown in the Figure.
Check your wiring and make sure that
no connection is made to the 5V supply.
The ADC peripheral should be configured to
sample CH0 and CH1 using Sequence A.
The serial port USART0 should be configured
for a baud rate of 38400 and as a serial
terminal.
Write a program that will do the following
in the main loop:
1. Prints out a message such as: "Press a key to start conversion."
2. Starts the ADC Sequence A when a key is pressed from the PC keyboard
3. Waits until one conversion on Sequence A is complete.
4. Converts the results to voltages on the two channels using the reference
voltage of 3V3.(Determine the resolution of the ADC by consulting the reference
manual. Use an int16_t, and represent the voltage in millivolts, as the terminal
program cannot print floating point numbers.)
5. Prints out the result of the conversion in the format :
"ADC0=xxxx mV, ADC1=yyyy mV"
6. Repeat.
Remember that the terminal program in the PC must also be set to the same
baud rate as Alakart. Otherwise, garbled output, or even, no output will be
seen.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Relational Database And Transact SQL

Authors: Lucy Scott

1st Edition

1974679985, 978-1974679980

More Books

Students also viewed these Databases questions