MSPM0_ValvanoWare  1.0
ECE445L starter code
Functions
Key.h File Reference

4-bit keyboard connected to PB19-PB16 More...

Go to the source code of this file.

Functions

void Key_Init (void)
 Initialize keyboard. More...
 
uint32_t Key_In (void)
 

Detailed Description

4-bit keyboard connected to PB19-PB16

Lab 5. Digital Piano using a Digital to Analog Converter
For more information see
https://docs.google.com/document/d/1DVmHjqsx24FvLp4x8KKyr5UmDeDlBlfeQPsVvKFQF_k/edit

Version
ECE319K Spring 2024
Author
Your names go here
Warning
AS-IS
Date
October 2, 2023
Pins on the 4-bit Keyboard
Pin GPIOHardware
PB19 inputbit 3 (note with highest frequency)
PB18 inputbit 2
PB17 inputbit 1
PB16 inputbit 0 (note with lowest frequency)

Function Documentation

◆ Key_In()

uint32_t Key_In ( void  )

Input from piano key inputs on PB19-PB16

Parameters
none
Returns
0 to 15 depending on keys 0x01 is just Key0, 0x02 is just Key1, 0x04 is just Key2, 0x08 is just Key3

◆ Key_Init()

void Key_Init ( void  )

Initialize keyboard.

Initialize 4-bit keyboard

  • Piano key 3 PB19 (note with highest frequency)
  • Piano key 2 PB18
  • Piano key 1 PB17
  • Piano key 0 PB16 (note with lowest frequency)
    Parameters
    none
    Returns
    none
    Note
    LaunchPad_Init has been called; this program should not reset Port B