Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write in C for a STM32F446RE microcontroller on the Nucleo-64 dev board Include proper headers and do NOT use HAL Write a source library that

Write in C for a STM32F446RE microcontroller on the Nucleo-64 dev board

Include proper headers and do NOT use HAL

Write a source library that contains the with the following public functions:

void keypadInit(void); /Initiallized the GPIO to read the keypad.

uint16_t readKeypad(void); //Returns the state of all of the keypad buttons in the return value at the moment the function is called.

void decodeKeypad(uint16_t, char *); //Takes the state of the keypad and returns (by reference) an array of the key's pressed.

The library should work with the following main:

int main (void) { uint16_t key; char carray[17]; keypadInit(); while(1) { while(!(key = readKeypad())); /*Get which keys pressed*/ decodeKeypad(key, carray); /*What are those keys*/ printf("%s ",carray); /*Print those keys to screen*/ while(readKeypad() == key); /*Wait for the keypad to change*/ } }

Problem 1: Write a library that works with the following pin assignments

R0 -> PC0

R1 -> PC2

R2-> PC4

R3 -> PC6

C0-> PC8

C1->PC10

C2->PC12

Problem 2: Write a library that works with the following pin assignments

R0 -> PC1

R1 -> PC3

R2-> PC5

R3 -> PC7

C0-> PC9

C1->PC11

C2->PC13

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

Advanced Database Systems For Integration Of Media And User Environments 98

Authors: Yahiko Kambayashi, Akifumi Makinouchi, Shunsuke Uemura, Katsumi Tanaka, Yoshifumi Masunaga

1st Edition

9810234368, 978-9810234362

More Books

Students also viewed these Databases questions

Question

4. What advice would you give to Carol Sullivan-Diaz?

Answered: 1 week ago