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
counter-clockwise (CCW) rotation, design an interrupt driven embedded
software
for the Nucleo-64(STM32L476) to keep count of the angular rotation of the
encoder.
Specifications: CHA connected to GPIO labeled D2 on the NucleoL476RG
CHB connected to GPIO labeled D4 on the NucleoL476RG
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 500ms.
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.
 Given the quadrature encoder signal below for clockwise (CW) and counter-clockwise

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!