Question: Given the quadrature encoder signal below for clockwise ( CW ) and counter - clockwise ( CCW ) rotation, design an interrupt driven embedded software
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 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.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
