/*
** ###################################################################
**
**     THIS BEAN MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
**
**     Filename  : PWM1.H
**
**     Project   : projRT2
** 
**     Processor : MC68HC908AZ60MFU
**
**     Beantype  : PWM
**
**     Version   : Bean 02.039, Driver 01.02, CPU db: 2.81.019
**
**     Compiler  : Metrowerks HC08 C Compiler V-5.0.13
**
**     Date/Time : 2.4.2002, 9:08
**
**     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
**             ----------------------------------------------------
**                       15            |  PTE2_TACH0
**             ----------------------------------------------------
**
**         Timer name                  : TIMA_PWM [16-bit] 
**           PWM signal generation     : unbuffered
**
**         Counter                     : TACNT     [34]
**         Mode register               : TASC      [32]
**         Run register                : TASC      [32]
**         Prescaler                   : TASC      [32]
**         Compare register            : TACH0     [39]
**         Flip-flop register          : TASC0     [38]
**
**         User handling procedure     : not specified
**
**         Port name                   : PTE
**         Bit number (in port)        : 2
**         Bit mask of the port        : 4
**         Port data register          : PTE       [8]
**         Port control register       : DDRE      [12]
**         Port function register      : SPCR      [16]
**
**         Initialization:
**              Output level           : low
**              Timer                  : Enabled
**              Event                  : Enabled
**         High-speed CPU mode
**             Prescaler               : divide-by-8
**             Clock                   : 250000 Hz
**           Initial value of            period     pulse width
**             Xtal ticks              : 2048000    1024000
**             microseconds            : 256000     128000
**             milliseconds            : 256        128
**             seconds (real)          : 0.2560000  0.1280000
**
**
**     Contents  :
**
**         SetDutyMS - byte PWM1_SetDutyMS(word Time);
**
**
**     (c) Copyright UNIS, spol. s r.o. 1997-2002
**
**     UNIS, spol. s r.o.
**     Jundrovska 33
**     624 00 Brno
**     Czech Republic
**
**     http      : www.processorexpert.com
**     mail      : info@processorexpert.com
**
** ###################################################################
*/

#ifndef __PWM1
#define __PWM1

/*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 "PE_Timer.h"

/* MODULE PWM1. */

#include "Cpu.h"

byte PWM1_SetDutyMS(word Time);
/*
** ===================================================================
**     Method      :  PWM1_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 256 ms in high speed CPU 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 PWM1_Init(void);
/*
** ===================================================================
**     Method      :  PWM1_Init (bean PWM)
**
**     Description :
**         This method is internal. It is used by Processor Expert
**         only.
** ===================================================================
*/


/* END PWM1. */

#endif /* ifndef __PWM1 */
/*
** ###################################################################
**
**     This file was created by UNIS Processor Expert 02.84 for 
**     the Motorola HC08 series of microcontrollers.
**
** ###################################################################
*/
