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

📄 events.c

📁 飞思卡尔单片机MC9SDG128B的计数器源程序
💻 C
字号:
/** ###################################################################
**     Filename  : Events.C
**     Project   : Counter
**     Processor : MC9S12DG128BCPV
**     Beantype  : Events
**     Version   : Driver 01.04
**     Compiler  : Metrowerks HC12 C Compiler
**     Date/Time : 2008-3-4, 上午 08:50
**     Abstract  :
**         This is user's event module.
**         Put your event handler code here.
**     Settings  :
**     Contents  :
**         TI1_OnInterrupt - void TI1_OnInterrupt(void);
**
**     (c) Copyright UNIS, spol. s r.o. 1997-2005
**     UNIS, spol. s r.o.
**     Jundrovska 33
**     624 00 Brno
**     Czech Republic
**     http      : www.processorexpert.com
**     mail      : info@processorexpert.com
** ###################################################################*/
/* MODULE Events */


#include "Cpu.h"
#include "Events.h"

#pragma CODE_SEG DEFAULT

/*
** ===================================================================
**     Event       :  TI1_OnInterrupt (module Events)
**
**     From bean   :  TI1 [TimerInt]
**     Description :
**         When a timer interrupt occurs this event is called (only
**         when the bean is enabled - "Enable" and the events are
**         enabled - "EnableEvent").
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/
void TI1_OnInterrupt(void)
{ 
   
      PORTB=~PACN32;
      PACN32=0x0000;
}


/*
** ===================================================================
**     Event       :  Cap1_OnCapture (module Events)
**
**     From bean   :  Cap1 [Capture]
**     Description :
**         This event is called on capturing of Timer/Counter actual
**         value (only when the bean is enabled - <"Enable"> and the
**         events are enabled - <"EnableEvent">.
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/
void Cap1_OnCapture(void)
{
   //  PORTB++;
}

/*
** ===================================================================
**     Event       :  Cap1_OnOverflow (module Events)
**
**     From bean   :  Cap1 [Capture]
**     Description :
**         This event is called if counter overflows (only when the
**         bean is enabled - <"Enable"> and the events are enabled -
**         <"EnableEvent">.
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/
void Cap1_OnOverflow(void)
{ //byte a ;
  //word Valu; 
  /* Write your code here ...*/ 
   
   //a=Cap1_GetCaptureValue(&Valu);
  // PORTAB=~Valu;
   
  // PORTB++;
  // Cap1_Reset();
  /* PORTB++;
    */   
   
     
     //TC1
}


/* END Events */

/*
** ###################################################################
**
**     This file was created by UNIS Processor Expert 2.96 [03.76]
**     for the Freescale HCS12 series of microcontrollers.
**
** ###################################################################
*/

⌨️ 快捷键说明

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