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

📄 freescale

📁 Freescale 系列单片机常用模块与综合系统设计
💻
字号:
/** ###################################################################
**     Filename  : handheld_ultrasonic_rangefinder.C
**     Project   : handheld_ultrasonic_rangefinder
**     Processor : MC9S08JM60CLHE
**     Version   : Driver 01.11
**     Compiler  : CodeWarrior HCS08 C Compiler
**     Date/Time : 2010-1-7, 20:59
**     Abstract  :
**         Main module.
**         This module contains user's application code.
**     Settings  :
**     Contents  :
**         No public methods
**
** ###################################################################*/
/* MODULE handheld_ultrasonic_rangefinder */


/* Including needed modules to compile this module/procedure */
#include "Cpu.h"
#include "Events.h"
#include "LCD_CONTROL.h"
#include "LCD_DATA.h"
#include "Receiver.h"
#include "Key1.h"
#include "Key2.h"
#include "Key3.h"
#include "Transmiter.h"
#include "Timer0_250kHz.h"
#include "Timer1_40kHz.h"
/* Include shared modules, which are used for whole project */
#include "PE_Types.h"
#include "PE_Error.h"
#include "PE_Const.h"
#include "IO_Map.h"
#include "Variables.h"
#include "Transducer.h"

/* User includes (#include below this line is not maintained by Processor Expert) */

void main(void)
{
  /* Write your local variable definition here */

  /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
  PE_low_level_init();
  /*** End of Processor Expert internal initialization.                    ***/
   System_Initialize();
  /* Write your code here */
  for(;;) {
    if(delayedsend == 0)     //a delay before sending the next pulse
    {	 					
		if(time1 == 0)
		{
			Ultrasonic_Send_Pulse();
			time1 = t1;
		}
	}
	if(time2 == 0)     //timer for 30 ms
	{ 							
		Key_Process();
		time2 = t2;
	}
	Ultrasonic_Receive_Process();
  } 
}
/* END handheld_ultrasonic_rangefinder */
/*
** ###################################################################
**
**     This file was created by Processor Expert 3.07 [04.34]
**     for the Freescale HCS08 series of microcontrollers.
**
** ###################################################################
*/

⌨️ 快捷键说明

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