/* ** ################################################################### ** ** Filename : PWMMCdemo.C ** ** Project : PWMMCdemo ** ** Processor : MC68HC908MR32CFU ** ** Version : Driver 01.00 ** ** Compiler : Metrowerks HC08 C Compiler V-5.0.13 ** ** Date/Time : 11.07.2002, 11:38 ** ** Abstract : ** ** Main module. ** Here is to be placed user's code. ** ** Settings : ** ** ** Contents : ** ** No public methods ** ** ** Copyright: 1997 - 2009 Freescale Semiconductor, Inc. All Rights Reserved. ** ** ** ** http : www.freescale.com ** mail : support@freescale.com ** ** ################################################################### */ /* MODULE PWMMCdemo */ //#pragma MESSAGE DISABLE C1420 /* WARNING C1420: Result of function-call is ignored. You can uncomment this line to disable this compiler warning */ /*Including used modules for compilling procedure*/ #include "Cpu.h" #include "Events.h" #include "MPW1.h" /*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" byte rld; byte ft1; byte ft2; byte ft3; byte ft4; volatile byte er; void main(void) { byte i; word duty=1; /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/ PE_low_level_init(); /*** End of Processor Expert internal initialization. ***/ for(;;) { if (rld) { // on every 8 reload increase duty for (i=1; i<6; i+=2) { er=MPW1_SetDuty(i,duty); // increase duty for each pair } duty++; //duty for the next cycle rld=0; } if ( (ft1) || (ft2) || (ft3) || (ft4) ) { er=MPW1_Disable(); // stop PWMMC due to fault condition } } /*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/ for(;;){} /*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/ } /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/ /* END PWMMCdemo */ /* ** ################################################################### ** ** This file was created by Processor Expert 02.89 for ** the Freescale HC08 series of microcontrollers. ** ** ################################################################### */