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

📄 freescale

📁 Freescale 系列单片机常用模块与综合系统设计
💻
字号:
/** ###################################################################
**     THIS COMPONENT MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
**     Filename  : RTC1.C
**     Project   : rtc
**     Processor : MC9S08JM60CLHE
**     Component : Init_RTC
**     Version   : Component 01.017, Driver 01.09, CPU db: 3.00.046
**     Compiler  : CodeWarrior HCS08 C Compiler
**     Date/Time : 2010-1-9, 20:41
**     Abstract  :
**          This file implements the API (RTC) module 
**          initialization according to the Peripheral Initialization 
**          Bean settings, and defines interrupt service routines prototypes.
**          The Autonomous periodical Interrupt module can generate
**          periodical interrupts independent of the clock source of 
**          the MCU. To enable the timer, the bit APIFE needs to be 
**          set. The API timer is either clocked by a trimmable 
**          internal RC oscillator or the bus clock. Timer operation
**          will freeze when MCU clock source is selected and bus clock 
**          is turned off. The clock source can be selected with bit
**          APICLK. As soon as the configured timeout period of the API 
**          has elapsed, the APIF bit is set. An interrupt, indicated by 
**          flag APIF = 1, is triggered if interrupt enable bit APIE = 1.
**     Settings  :
**          Bean name                                      : RTC1
**          Device                                         : RTC
**          Settings                                       : 
**            Clock settings                               : 
**              Clock select                               : 1-kHz low power oscillator
**              Prescaler                                  : OFF
**              RTC modulo value                           : 0
**              Period                                     : ?
**          Interrupts                                     : 
**            Interrupt                                    : Vrtc
**            RTC Interrupt                                : Enabled
**            ISR name                                     : Rtc_Timer
**          Initialization                                 : 
**            NON_MCU_INIT                                 : 
**              Call Init method                           : yes
**     Contents  :
**         Init - void RTC1_Init(void);
**
**     Copyright : 1997 - 2009 Freescale Semiconductor, Inc. All Rights Reserved.
**     
**     http      : www.freescale.com
**     mail      : support@freescale.com
** ###################################################################*/

/* MODULE RTC1. */

#include "RTC1.h"

/*
** ###################################################################
**
**  The interrupt service routine(s) must be implemented
**  by user in one of the following user modules.
**
**  If the "Generate ISR" option is enabled, Processor Expert generates
**  ISR templates in the CPU event module.
**
**  User modules:
**      rtc.c
**      Events.c
**
** ###################################################################
      ISR(Rtc_Timer)
      {
      // NOTE: The routine should include the following actions to obtain
      //       correct functionality of the hardware.
      //
      //       The RTIF bit must be set to 1 to clear the interrupt request.
      //       Example: RTCSC_RTIF = 1;
      }

*/
/*
** ===================================================================
**     Method      :  RTC1_Init (component Init_RTC)
**
**     Description :
**         This method initializes registers of the RTC module
**         according to this Peripheral Initialization Bean settings.
**         Call this method in the user code to initialize the
**         module. By default, the method is called by PE
**         automatically; see "Call Init method" property of the
**         bean for more details.
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/
void RTC1_Init(void)
{
  /* RTCMOD: RTCMOD=0 */
  setReg8(RTCMOD, 0x00);               /* Set modulo register */ 
  /* RTCSC: RTIF=1,RTCLKS=0,RTIE=1,RTCPS=0 */
  setReg8(RTCSC, 0x90);                /* Configure RTC */ 
}

/* END RTC1. */

/*
** ###################################################################
**
**     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 + -