Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

DO IT ALL, please. Part C: 1. Which port of the Atmega2560 microcontroller is connected to pins 20 and 21 of the Arduino Mega ADK

DO IT ALL, please.

image text in transcribed

Part C: 1. Which port of the Atmega2560 microcontroller is connected to pins 20 and 21 of the Arduino Mega ADK board? 2. Rewrite the same code as part B, but using direct access to the corresponding port. 3. Do the LED's blink simultaneously? Check the delay using the oscilloscope. 4. Compute the delay between the blinking of one LED and the other. 5. Write your comments. Part C: You are required to control a stepper motor 28-BYJ-48 [1,2] using your microcontroller board through direct port access. 1. Identify the functions of all pins, and the step sequence of the stepper motor 2. Connect your motor to a port of your choice 3. Write the necessary code to make the motor rotate anticlockwise. 4. Modify the code to make the motor rotate clockwise. 5. Combine both codes in 3 and 4 to make it one single function. Make the direction controlled through 1 or 2 switches. 6. How would you control the speed of the motor? 7. Write a function to change the speed of the motor, and add a parameter to control the speed. Note: In the report, submit your code design and signal views from the simulator you used. Part C: 1. Which port of the Atmega2560 microcontroller is connected to pins 20 and 21 of the Arduino Mega ADK board? 2. Rewrite the same code as part B, but using direct access to the corresponding port. 3. Do the LED's blink simultaneously? Check the delay using the oscilloscope. 4. Compute the delay between the blinking of one LED and the other. 5. Write your comments. Part C: You are required to control a stepper motor 28-BYJ-48 [1,2] using your microcontroller board through direct port access. 1. Identify the functions of all pins, and the step sequence of the stepper motor 2. Connect your motor to a port of your choice 3. Write the necessary code to make the motor rotate anticlockwise. 4. Modify the code to make the motor rotate clockwise. 5. Combine both codes in 3 and 4 to make it one single function. Make the direction controlled through 1 or 2 switches. 6. How would you control the speed of the motor? 7. Write a function to change the speed of the motor, and add a parameter to control the speed. Note: In the report, submit your code design and signal views from the simulator you used

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Accounting questions