MSPM0_ValvanoWare  1.0
ECE445L starter code
Functions
DAC5.h File Reference

5-bit binary-weighted DAC More...

Go to the source code of this file.

Functions

void DAC5_Init (void)
 Initialize DAC. More...
 
void DAC5_Out (uint32_t data)
 Output to DAC5. More...
 

Detailed Description

5-bit binary-weighted DAC

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
Note
For more information see http://users.ece.utexas.edu/~valvano/
Date
October 2, 2023
Pins on the 5-bit DAC
Pin GPIOHardware
PB4 outputbit 4 (most significant)
PB3 outputbit 3
PB2 outputbit 2
PB1 outputbit 1
PB0 outputbit 0 (least significant)

Function Documentation

◆ DAC5_Init()

void DAC5_Init ( void  )

Initialize DAC.

Initialize 5-bit DAC

  • PB4 output MSBit
  • PB3 output
  • PB2 output
  • PB1 output
  • PB0 output LSBit
    Parameters
    none
    Returns
    none
    Note
    LaunchPad_Init has been called; this program should not reset Port B

◆ DAC5_Out()

void DAC5_Out ( uint32_t  data)

Output to DAC5.

Output to 5-bit DAC

Parameters
datais 5-bit value to output, 0 to 31
Returns
none
Note
this solution must be friendly