Question
Using Atmega328ps perhipherals write a program that will read from the ADC channel 0, and display the decimal value of the ADCH:ADCL registers on the
Using Atmega328ps perhipherals write a program that will read from the ADC channel 0, and display the decimal value of the ADCH:ADCL registers on the seven segment display when a push button is pressed. You are to write the code using C, no assembly. All activities should be interupt driven. Use timers to trigger an interupt to update the seven segment display. Use a Pin Change interupt to monitor the push button and intiate a ADC reading upon detecting a button press. Use the ADC complete interupt to update the value to be displayed in memory, that is to be read in from your Analog Discovery Kit. To show that you are using interupts, each time the button is pressed toggle pin B4. This will allow you to trigger the logic analyzer on a button press.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started