Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Design Problem ( 2 0 points ) Given the quadrature encoder signal below for clockwise ( CW ) and counter - clockwise ( CCW )
Design Problem points
Given the quadrature encoder signal below for clockwise CW and counterclockwise CCW rotation, design an interrupt driven embedded software for the NucleoSTML to keep count of the angular rotation of the encoder.
Specifications: CHA connected to GPIO labeled D on the NucleoLRG CHB connected to GPIO labeled D on the NucleoLRG
Write a C program to keep track of both CCW and CW rotation of the encoder. Configure both GPIO inputs to interrupt on both rising and falling edge. With each edge transition develop a counter to increment one count for each edge as it rotates CW and decrement by one count for each edge in the CCW direction.
Your program should initialize and configure each GPIO properly.
Write all of the appropriate ISR's Include all appropriate header files.
Within the main background loop, the program should print the encoder count approximately every
Your program should be very well commented.
Submit your completed C source file on Canvas.
Remember this is software, there are many ways to tackle this problem, so what are the odds two would be similar.
Page of
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