v1_lab3

Fork of DACandticker_sample by William Marsh

sineTable.h

Committer:
WilliamMarshQMUL
Date:
2018-01-24
Revision:
2:e27fd3b65155
Parent:
0:5307f49cd305

File content as of revision 2:e27fd3b65155:

// Look up table for a sine wave as 16 bits
// Note that it is possible to construct the full period from 
//   the first quarter, but the code is more complex
//
// These number were calcuated using a spreadsheet 
const uint16_t sine[] = {
    32768, 35980, 39161, 42280, 45308, 48215, 50973, 53556, 
    55938, 58098, 60014, 61667, 63042, 64125, 64906, 65378, 
    65535, 65378, 64906, 64125, 63042, 61667, 60014, 58098,
    55938, 53556, 50973, 48215, 45308, 42280, 39161, 35980,
    32768, 29556, 26375, 23256, 20228, 17321, 14563, 11980,
     9598,  7438,  5522,  3869,  2494,  1411,   630,   158, 
        0,   158,   630,  1411,  2494,  3869,  5522,  7438,
     9598, 11980, 14563, 17321, 20228, 23256, 26375, 29556
    } ;