Created
September 28, 2014 11:26
-
-
Save sashoo/c091b838ff828822b08a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef _Waveforms_h_ | |
#define _Waveforms_h_ | |
#define PI 3.141592 | |
#define FREQ 200 | |
#define PHI_STEPS 100 | |
#define V_AMP 2047 | |
#define OMEGA (PI*FREQ*2.0) | |
#define T (1000000/FREQ) // microseconds | |
#define DT (T/PHI_STEPS) // microseconds | |
static int sine_wave[] = { | |
0x7ff, 0x880, 0x900, 0x97f, 0x9fc, 0xa78, 0xaf1, 0xb67, 0xbd9, 0xc48, | |
0xcb2, 0xd18, 0xd78, 0xdd3, 0xe28, 0xe77, 0xebf, 0xf01, 0xf3b, 0xf6e, | |
0xf9a, 0xfbe, 0xfda, 0xfee, 0xffa, 0xffe, 0xffa, 0xfee, 0xfda, 0xfbe, | |
0xf9a, 0xf6e, 0xf3b, 0xf01, 0xebf, 0xe77, 0xe28, 0xdd3, 0xd78, 0xd18, | |
0xcb2, 0xc48, 0xbd9, 0xb67, 0xaf1, 0xa78, 0x9fc, 0x97f, 0x900, 0x880, | |
0x7ff, 0x77e, 0x6fe, 0x67f, 0x602, 0x586, 0x50d, 0x497, 0x425, 0x3b6, | |
0x34c, 0x2e6, 0x286, 0x22b, 0x1d6, 0x187, 0x13f, 0xfd, 0xc3, 0x90, | |
0x64, 0x40, 0x24, 0x10, 0x4, 0x0, 0x4, 0x10, 0x24, 0x40, | |
0x64, 0x90, 0xc3, 0xfd, 0x13f, 0x187, 0x1d6, 0x22b, 0x286, 0x2e6, | |
0x34c, 0x3b6, 0x425, 0x497, 0x50d, 0x586, 0x602, 0x67f, 0x6fe, 0x77e, | |
}; | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment