📄 to1.c
字号:
/** ###################################################################
** THIS BEAN MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
** Filename : TO1.C
** Project : NODE_A
** Processor : MC9S12C64CFA16
** Beantype : TimerOut
** Version : Bean 02.146, Driver 01.10, CPU db: 2.87.339
** Compiler : Metrowerks HC12 C Compiler
** Date/Time : 2006-11-11, 14:37
** Abstract :
** This bean implements a periodic signal generator 1:1 (Flip-Flop Output).
** The signal alternates the "0" and "1" output values in exactly
** regular intervals; that is why the time length of the "0" part
** of one pulse is equal to the "1" part of one pulse.
** Settings :
** Used output pin :
** ----------------------------------------------------
** Number (on package) | Name
** ----------------------------------------------------
** 3 | PT2_PWM2_IOC2
** ----------------------------------------------------
**
** Timer name : TIM (16-bit)
** Compare name : TC2
** Counter shared : No
**
** High speed mode
** Prescaler : divide-by-64
** Clock : 62500 Hz
** Pulse width
** Xtal ticks : 8000000
** microseconds : 1000000
** milliseconds : 1000
** seconds : 1
** seconds (real) : 1.0000000
** Hz : 1
**
** Runtime setting : none
**
** Initialization:
** Output level : low
** Timer : Enabled
** Events : Enabled
**
** Timer registers
** Counter : TCNT [68]
** Mode : TIOS [64]
** Run : TSCR1 [70]
** Prescaler : TSCR2 [77]
**
** Compare registers
** Compare : TC2 [84]
**
** Flip-flop registers
** Mode : TCTL2 [73]
** Contents :
** No public methods
**
** (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 TO1. */
#include "PE_Error.h"
#include "TO1.h"
#pragma DATA_SEG TO1_DATA
#pragma CODE_SEG TO1_CODE
/*
** ===================================================================
** Method : TO1_Init (bean TimerOut)
**
** Description :
** This method is internal. It is used by Processor Expert only.
** ===================================================================
*/
void TO1_Init(void)
{
TC2 = 62500; /* Store given value to the compare register */
TC7 = 62500; /* Store given value to the modulo register */
TSCR2_PR = 6; /* Set prescaler register according to the selected high speed mode */
TCTL2_OL2 = 1; /* Connect timer to output pin */
TSCR1_TEN = 1; /* Enable timer */
}
/* END TO1. */
/*
** ###################################################################
**
** 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 + -