-
Notifications
You must be signed in to change notification settings - Fork 0
/
dac.h
32 lines (27 loc) · 837 Bytes
/
dac.h
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 4 bits for the DAC, but you could have 5 or 6 bits
// Runs on LM4F120 or TM4C123
// Program written by: put your names here
// Date Created: 3/6/17
// Last Modified: 3/5/18
// Lab number: 6
// Hardware connections
// TO STUDENTS "REMOVE THIS LINE AND SPECIFY YOUR HARDWARE********
#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 4-bit DAC, called once
// Input: none
// Output: none
void DAC_Init(void);
// **************DAC_Out*********************
// output to DAC
// Input: 4-bit data, 0 to 15
// Input=n is converted to n*3.3V/15
// Output: none
void DAC_Out(uint8_t data);
#endif