/** * @file DAC5.h * @brief 5-bit binary-weighted DAC * @details 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 * @copyright Lab solution, do not post, * @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)
******************************************************************************/ #ifndef __DAC5_H__ #define __DAC5_H__ /** * Initialize 5-bit DAC * - PB4 output MSBit * - PB3 output * - PB2 output * - PB1 output * - PB0 output LSBit * @param none * @return none * @brief Initialize DAC * @note LaunchPad_Init has been called; this program should not reset Port B */ void DAC5_Init(void); /** * Output to 5-bit DAC * @param data is 5-bit value to output, 0 to 31 * @return none * @brief Output to DAC5 * @note this solution must be friendly */ void DAC5_Out(uint32_t data); #endif // __DAC5_H__