⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 constant_tables.c

📁 基于MSPF449的三相电压表功率的开发程序
💻 C
字号:
//**************************************************************************
//    This is a simple sinne gen function written in C
//
//    Vincent Chan 
//    Texas Instruments Hong Kong Ltd
//    Date        Comments
//    =====================
//    01/09/19    Code Starts
//**************************************************************************
#include "emeter_3phase.h"
//--------------------------------------------------------------------------

const int cos_table[] = {
		0x7fff,0x7ffe,0x7ff6,0x7fea,0x7fd9,0x7fc2,0x7fa7,0x7f87,
		0x7f62,0x7f38,0x7f0a,0x7ed6,0x7e9d,0x7e60,0x7e1e,0x7ddd,
		0x7d8a,0x7d3a,0x7ce4,0x7c89,0x7c2a,0x7bc6,0x7b5d,0x7aef,
		0x7a7d,0x7a06,0x798a,0x790a,0x7885,0x77fb,0x776c,0x76d9,
		0x7642,0x75a6,0x7505,0x7460,0x73b6,0x7308,0x7255,0x719e,
		0x70e3,0x7023,0x6f5f,0x6e97,0x6dca,0x6cf9,0x6c24,0x6b4b,
		0x6a6e,0x698c,0x68a7,0x67bd,0x66d0,0x65de,0x64e9,0x63ef,
		0x62f2,0x61f1,0x60ec,0x5fe4,0x5ed7,0x5dc8,0x5cb4,0x5b9d,
		0x5a82,0x5964,0x5843,0x571e,0x55f6,0x54ca,0x539b,0x5269,
		0x5134,0x4ffb,0x4ec0,0x4d81,0x4c40,0x4afb,0x49b4,0x486a,
		0x471d,0x45cd,0x447b,0x4326,0x41ce,0x4074,0x3f17,0x3db8,
		0x3c57,0x3af3,0x398d,0x3825,0x36ba,0x354e,0x33df,0x326e,
		0x30fc,0x2f87,0x2e11,0x2c99,0x2b1f,0x29a4,0x2827,0x26a8,
		0x2528,0x23a7,0x2224,0x209f,0x1f1a,0x1d93,0x1c0c,0x1a83,
		0x18f9,0x176e,0x15e2,0x1455,0x12c8,0x113a,0x0fab,0x0e1c,
		0x0c8c,0x0afb,0x096b,0x07d9,0x0648,0x04b6,0x0324,0x0192};

// This contains the FIR beta and gain adjustment values for phase delays from
//  (-63/64)*5.49degree to (+63/64)*5.49degree
  
const int FIR_COEFF[] = {
-16483,65326,
-16347,64802,
-16210,64278,
-16070,63755,
-15929,63231,
-15785,62709,
-15638,62186,
-15490,61664,
-15339,61142,
-15185,60620,
-15029,60099,
-14870,59578,
-14709,59057,
-14545,58537,
-14378,58017,
-14208,57497,
-14035,56977,
-13859,56458,
-13680,55938,
-13498,55419,
-13313,54901,
-13124,54382,
-12932,53864,
-12736,53346,
-12536,52828,
-12332,52311,
-12125,51793,
-11913,51276,
-11698,50759,
-11478,50242,
-11253,49726,
-11024,49210,
-10791,48693,
-10552,48178,
-10309,47662,
-10060,47146,
-9806,46631,
-9546,46116,
-9281,45600,
-9009,45086,
-8732,44571,
-8448,44056,
-8158,43542,
-7861,43028,
-7557,42513,
-7245,41999,
-6926,41486,
-6599,40972,
-6264,40458,
-5921,39945,
-5568,39432,
-5207,38918,
-4836,38405,
-4455,37892,
-4064,37379,
-3662,36867,
-3249,36354,
-2824,35841,
-2387,35329,
-1938,34817,
-1475,34304,
-998,33792,
-507,33280,
0,32768,
522,32256,
1062,31744,
1618,31232,
2193,30721,
2788,30209,
3402,29697,
4039,29186,
4697,28674,
5380,28163,
6087,27651,
6821,27140,
7584,26628,
8375,26117,
9199,25606,
10056,25094,
10948,24583,
11878,24072,
12848,23561,
13861,23049,
14920,22538,
16028,22027,
17189,21516,
18406,21004,
19683,20493,
21026,19982,
22440,19471,
23929,18960,
25501,18448,
27162,17937,
28921,17426,
30786,16914,
32768,16403,
34877,15891,
37126,15380,
39531,14868,
42106,14357,
44872,13845,
47850,13334,
51067,12822,
54551,12310,
58337,11798,
62467,11286,
66991,10774,
71966,10262,
77464,9750,
83572,9238,
90399,8726,
98078,8213,
106781,7701,
116726,7188,
128201,6675,
141587,6163,
157407,5650,
176389,5137,
199588,4624,
228586,4110,
265868,3597,
315576,3084,
385165,2570,
489545,2056,
663510,1542,
1011435,1028,
2055200,514};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -