-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDAC.h
More file actions
32 lines (27 loc) · 820 Bytes
/
DAC.h
File metadata and controls
32 lines (27 loc) · 820 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// DAC.h
// This software configures DAC output
// Lab 6 requires a minimum of 6 bits for the DAC, but you could have 7 bits
// Runs on TM4C123
// Program written by: Aldo Baez and Devin Chaky
// Date Created: 3/6/17
// Last Modified: 1/2/23
// Lab number: 6
// Hardware connections
// DAC output pins on PB5-0
#ifndef DAC_H
#define DAC_H
#include <stdint.h>
// Header files contain the prototypes for public functions
// this file explains what the module does
// **************DAC_Init*********************
// Initialize 6-bit DAC, called once
// Input: none
// Output: none
void DAC_Init(void);
// **************DAC_Out*********************
// output to DAC
// Input: 6-bit data, 0 to 63
// Input=n is converted to n*3.3V/63
// Output: none
void DAC_Out(uint8_t data);
#endif