Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Connect 3 LED's ( GPIO ) , 2 Push buttons ( EXTI ) , and voltage divider ( R 3 = 1 k and R

Connect 3 LED's (GPIO),2 Push buttons (EXTI), and voltage divider (R3=1k and R5=10k||R6=10k) to the proper pins of the microcontroller. WARNING: Show the lector, before connecting to USB.
Setup.
Setup Microcontroller pinout and all microcontroller settings:
1.16 Add a User Label for GPIO with your initials as an example LED_GREEN_VZ.
1.17 Setup GPIO EXTI interrupt for reacting on the falling edge of the push buttons.
1.18 Set up ADC for reading data using the pooling method.
1.19 Setup Timer blinking AND reading.
1.20 Setup UART for speed 57600 with 8 bits of data and one stop bit.
Code.
Write a code for:
After reset all LEDs must blink with 1.5Hz frequency and send to the UART your name and surname (please write to the report the formula and parameters for the blinking frequency you calculated and set in CubelDE).
If the first button is released - Send to the UART message "EFFECT 1" and LEDs should start blinking with the "EFFECT 1" sequence: 110,011,101,111,101,000 with 98Hz frequency.
If the second button is pressed - Send to the UART text "EFFECT 2" and LEDs should start blinking with the "EFFECT 2" sequence: 110,010,011 with 22Hz frequency.
If send the command "SB" to UART, LEDs should stop blinking and need to be OFF. UART should print out text "Stop Blinking".
If send the command "G1" to the microcontroller UART, LEDs should start blinking with the 3Hz frequency (please write to the repo the formula and parameters for the blinking frequency you calculated and set in CubelDE).
If sending the command "AN" to UART - ADC should read the voltage from analog input and send to UART voltage value. IF value than 1,5V- LEDs should be off if less ON.
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 Design A Practical Approach

Authors: Marilyn Campbell

1st Edition

1587193175, 978-1587193170

More Books

Students also viewed these Databases questions