MSPM0_ValvanoWare  1.0
ECE445L starter code
Functions
Matrix.h File Reference

16-key matrix keyboard connected to PA27-PA24 and PB3-PB0 More...

Go to the source code of this file.

Functions

void Matrix_Init (void)
 Initialize matrix keyboard. More...
 
char Matrix_InChar (void)
 

Detailed Description

16-key matrix keyboard connected to PA27-PA24 and PB3-PB0

Matrix scanned keyboard For more information see
Section 3.4 in https://users.ece.utexas.edu/~valvano/EE445L/ebook/index.htm

Author
Valvano
Warning
AS-IS
Date
July 29, 2026
Pins on the 16-key matrix keyboard
Pin GPIOHardware
PA27 inputcolumn 3 (keypad pin 4) using 10K pull-up
PA26 inputcolumn 2 (keypad pin 3) using 10K pull-up
PB17 inputcolumn 1 (keypad pin 2) using 10K pull-up
PA25 inputcolumn 0 (keypad pin 1) using 10K pull-up
PB3 outputrow 3 (keypad pin 8)
PB2 outputrow 1 (keypad pin 7)
PB1 outputrow 1 (keypad pin 6)
PB0 outputrow 0 (keypad pin 5)

[1] [2] [3] [A]
[4] [5] [6] [B]
[7] [8] [9] [C]
[*] [0] [#] [D]
Pin1 . . . . . . . . Pin8
Pin 1 -> Column 0 (column starting with 1)
Pin 2 -> Column 1 (column starting with 2)
Pin 3 -> Column 2 (column starting with 3)
Pin 4 -> Column 3 (column starting with A)
Pin 5 -> Row 0 (row starting with 1)
Pin 6 -> Row 1 (row starting with 4)
Pin 7 -> Row 2 (row starting with 7)
Pin 8 -> Row 3 (row starting with *)

Function Documentation

◆ Matrix_InChar()

char Matrix_InChar ( void  )

input ASCII character from keypad

Parameters
none
Returns
ASCII character of key touched
Note
spin if Fifo is empty

◆ Matrix_Init()

void Matrix_Init ( void  )

Initialize matrix keyboard.

Initialization of Matrix keypad, 40 Hz SysTick interrupt

Parameters
none
Returns
none
Note
LaunchPad_Init has been called; this program should not reset Port A or B