📄 pwm6.h
字号:
/** ###################################################################
** THIS BEAN MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
** Filename : PWM6.H
** Project : NODE_A
** Processor : MC9S12C64CFA16
** Beantype : PWM
** Version : Bean 02.112, Driver 01.09, CPU db: 2.87.339
** Compiler : Metrowerks HC12 C Compiler
** Date/Time : 2006-11-11, 14:37
** Abstract :
** This bean implements a pulse-width modulation generator
** that generates signal with variable duty and fixed cycle.
** Settings :
** Used output pin :
** ----------------------------------------------------
** Number (on package) | Name
** ----------------------------------------------------
** 1 | PT0_PWM0_IOC0
** ----------------------------------------------------
**
** Timer name : PWM0 [8-bit]
** Counter : PWMCNT0 [236]
** Mode register : PWMCTL [229]
** Run register : PWME [224]
** Prescaler : PWMPRCLK [227]
** Compare 1 register : PWMPER0 [242]
** Compare 2 register : PWMDTY0 [248]
** Flip-flop 1 register : PWMPOL [225]
**
** User handling procedure : not specified
**
** Output pin
**
** Port name : T
** Bit number (in port) : 0
** Bit mask of the port : 1
** Port data register : PTT [576]
** Port control register : DDRT [578]
**
** Runtime setting period : none
** Runtime setting ratio : calculated
** Initialization:
** Aligned : Left
** Output level : low
** Timer : Enabled
** Event : Enabled
** High speed mode
** Prescaler : divide-by-1
** Clock : 268 Hz
** Initial value of period pulse width (ratio 5.098%)
** Xtal ticks : 7605120 387712
** microseconds : 950640 48464
** milliseconds : 951 48
** seconds : 1 0
** seconds (real) : 0.9506400 0.0484640
**
** Contents :
** SetRatio8 - byte PWM6_SetRatio8(byte Ratio);
** SetDutyMS - byte PWM6_SetDutyMS(word Time);
**
** (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
** ###################################################################*/
#ifndef __PWM6
#define __PWM6
/* MODULE PWM6. */
#include "Cpu.h"
#pragma CODE_SEG PWM6_CODE
byte PWM6_SetRatio8(byte Ratio);
/*
** ===================================================================
** Method : PWM6_SetRatio8 (bean PWM)
**
** Description :
** This method sets a new duty-cycle ratio.
** Parameters :
** NAME - DESCRIPTION
** Ratio - Ratio is expressed as an 8-bit unsigned integer
** number. 0 - 255 value is proportional
** to ratio 0 - 100%
** Note: Calculated duty depends on the timer possibilities
** and on the selected period.
** Returns :
** --- - Error code, possible codes:
** ERR_OK - OK
** ERR_SPEED - This device does not work in
** the active speed mode
** ===================================================================
*/
byte PWM6_SetDutyMS(word Time);
/*
** ===================================================================
** Method : PWM6_SetDutyMS (bean PWM)
**
** Description :
** This method sets the new duty value of the output signal. The
** duty is expressed in milliseconds as a 16-bit unsigned integer
** number.
** Parameters :
** NAME - DESCRIPTION
** Time - Duty to set [in milliseconds]
** (0 to 951 ms in high speed mode)
** Returns :
** --- - Error code, possible codes:
** ERR_OK - OK
** ERR_SPEED - This device does not work in
** the active speed mode
** ERR_MATH - Overflow during evaluation
** ERR_RANGE - Parameter out of range
** ===================================================================
*/
void PWM6_Init(void);
/*
** ===================================================================
** Method : PWM6_Init (bean PWM)
**
** Description :
** Initializes the associated peripheral(s) and the bean's
** internal variables. The method is called automatically as a
** part of the application initialization code.
** This method is internal. It is used by Processor Expert only.
** ===================================================================
*/
#pragma CODE_SEG DEFAULT
/* END PWM6. */
#endif /* ifndef __PWM6 */
/*
** ###################################################################
**
** 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 + -