新闻中心

EEPW首页>模拟技术>设计应用> 利用MAXQ7667确定超声传感器的谐振频率和阻尼特性

利用MAXQ7667确定超声传感器的谐振频率和阻尼特性

作者: 时间:2012-09-14 来源:网络 收藏
; TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(255,255,255); orphans: 2; widows: 2; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">  { // has not been set, then

  half_peak = STIM; // save the time it took to reach half the peak value.

  i = 101; // Half peak found so exit the loop.

  }

  while (T2CNB0_bit.TF2 == 0) {} // Wait for timer # 0.

  T2CNB0_bit.TF2 = 0; // Clear flag.

  }

  T2CNA0_bit.TR2 = 0; // Stop timer # 0.

  return half_peak;

  }

  void main()

  {

  unsigned short i = 0;

  unsigned short peak = 0;

  unsigned short first70 = 0;

  unsigned short second70 = 0;

  unsigned short center_pllf;

  unsigned short wait2measure;

  unsigned short halfpeak;

  init();

  // **********************************

  // **********************************

  // Configuration settings

  echo_receive_gain(0); // Set receiver to minimum gain (allowed values 0-31)

  Burst_Clock_Divider = 400; // for calculating the burst-frequency in PC-Application.

  burst_setup(BURST_CLK_PLL, BURST_PULSE_1, BURST_DIV_400, 0, PLL_CLOCK_16MHZ, 0);

  step_size=10; // Sets the step-size (steps go from 0 to 511).

  // END configuration settings.

  // ******************************

  // ******************************

  while(1)



关键词:MAXQ7667超声传感器谐振频率阻尼特性

评论


相关推荐

技术专区

关闭