MSP430F5529测周法测量信号频率.docxVIP

  • 14
  • 0
  • 约3.26千字
  • 约 7页
  • 2019-10-30 发布于江苏
  • 举报
-- -- MSP430F5529 测量频率 ----- 测周法 信号变换电路 过零比较器, lm393 输出上拉电阻,两电阻分压 程序 #include msp430f5529.h #include stdio.h #include math.h //测周法,在捕获过程中,定时溢出不能被检测出,选择时钟频率为低频时能测出低频,频率高 能测出频率高的部分 /* * main.c */ long long start=0; //long long int stop=0; double fre=0.0; unsigned char i=0; unsigned char over=0; void SetVcoreUp (unsigned int level) { Open PMM registers for write PMMCTL0_H = PMMPW_H; Set SVS/SVM high side new level SVSMHCTL = SVSHE + SVSHRVL0 * level + SVMHE + SVSMHRRL0 * level; // Set SVM low side to new level SVSMLCTL = SVSLE + SVMLE + SVSMLRRL0 * level; // Wait till SVM is settled while ((PMMI

文档评论(0)

1亿VIP精品文档

相关文档