Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Design Problem ( 2 0 points ) Given the quadrature encoder signal below for clockwise ( CW ) and counter - clockwise ( CCW )

Design Problem (20 points)
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.
Page 2 of 2
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 And SQL

Authors: Lucy Scott

3rd Edition

1087899699, 978-1087899695

More Books

Students also viewed these Databases questions

Question

Distinguish between formal and informal reports.

Answered: 1 week ago