/*
** ###################################################################
**
**     THIS BEAN MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
**
**     Filename  : PPG1.H
**
**     Project   : Full1
** 
**     Processor : MC68HC908AZ60MFU
**
**     Beantype  : PPG
**
**     Version   : Bean 02.061, Driver 01.02, CPU db: 2.81.019
**
**     Compiler  : Metrowerks HC08 C Compiler V-5.0.13
**
**     Date/Time : 2.4.2002, 9:36
**
**     Abstract  :
**
**         This bean "PPG" implements a programmable
**         pulse generator that generates signal with variable
**         duty and variable cycle (period).
**
**     Settings  :
**
**         Used output pin             : 
**             ----------------------------------------------------
**                Number (on package)  |    Name
**             ----------------------------------------------------
**                       15            |  PTE2_TACH0
**             ----------------------------------------------------
**
**         Timer name                  : TIMA_PPG [16-bit] 
**           PWM signal generation     : unbuffered
**
**         Counter                     : TACNT     [34]
**         Mode register               : TASC      [32]
**         Run register                : TASC      [32]
**         Prescaler                   : TASC      [32]
**         Compare 1 register          : TAMOD     [36]
**         Compare 2 register          : TACH0     [39]
**         Flip-flop 1 register        : TASC      [32]
**         Flip-flop 2 register        : TASC0     [38]
**
**         User handling procedure     : not specified
**
**         Output pin
**
**         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]
**
**         Runtime setting period      : none
**         Runtime setting ratio       : calculated
**         Initialization:
**              Output level           : low
**              Timer                  : Enabled
**              Event                  : Enabled
**         High-speed CPU mode
**             Prescaler               : divide-by-4
**             Clock                   : 500000 Hz
**           Initial value of            period        pulse width (ratio 25%)
**             Xtal ticks              : 1024000       256000
**             microseconds            : 128000        32000
**             milliseconds            : 128           32
**             seconds (real)          : 0.1280000     0.0320000
**
**
**     Contents  :
**
**         SetRatio16 - byte PPG1_SetRatio16(word Ratio);
**         SetDutyUS  - byte PPG1_SetDutyUS(word Time);
**         SetDutyMS  - byte PPG1_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 __PPG1
#define __PPG1

/*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 PPG1. */

#include "Cpu.h"

byte PPG1_SetRatio16(word Ratio);
/*
** ===================================================================
**     Method      :  PPG1_SetRatio16 (bean PPG)
**
**     Description :
**         This method sets a new duty-cycle ratio.
**     Parameters  :
**         NAME       - DESCRIPTION
**         Ratio      - Ratio is expressed as an 16-bit unsigned integer
**                      number. 0 - 65535 value is proportional
**                      to ratio 0 - 100%
**         Note: Calculated duty-cycle ratio depends on the timer
**               possibilities and on the selected period.
**     Returns     :
**         ---        - Error code
** ===================================================================
*/

byte PPG1_SetDutyUS(word Time);
/*
** ===================================================================
**     Method      :  PPG1_SetDutyUS (bean PPG)
**
**     Description :
**         This method sets the new duty value of the output signal. The
**         duty is expressed in microseconds as a 16-bit unsigned integer
**         number.
**     Parameters  :
**         NAME       - DESCRIPTION
**         Time       - Duty to set [in microseconds]
**                      (0 to 65535 us in high speed CPU mode)
**     Returns     :
**         ---        - Error code
** ===================================================================
*/

byte PPG1_SetDutyMS(word Time);
/*
** ===================================================================
**     Method      :  PPG1_SetDutyMS (bean PPG)
**
**     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 128 ms in high speed CPU mode)
**     Returns     :
**         ---        - Error code
** ===================================================================
*/

void PPG1_Init(void);
/*
** ===================================================================
**     Method      :  PPG1_Init (bean PPG)
**
**     Description :
**         This method is internal. It is used by Processor Expert
**         only.
** ===================================================================
*/

__interrupt void  PPG1_Interrupt(void);
/*
** ===================================================================
**     Method      :  PPG1_Interrupt (bean PPG)
**
**     Description :
**         This method is internal. It is used by Processor Expert
**         only.
** ===================================================================
*/


/* END PPG1. */

#endif /* ifndef __PPG1 */
/*
** ###################################################################
**
**     This file was created by UNIS Processor Expert 02.84 for 
**     the Motorola HC08 series of microcontrollers.
**
** ###################################################################
*/
