/* ** ################################################################### ** ** Filename : ADC.C ** ** Project : ADC ** ** Processor : 68HC908AZ60 ** ** Version : Driver 01.00 ** ** Compiler : Metrowerks HC08 C Compiler V-5.0.13 ** ** Date/Time : 17.01.2002, 13:13 ** ** 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 ADC */ //#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 "AD1.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" word Value0, Value1; byte err; void main(void) { /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/ PE_low_level_init(); /*** End of Processor Expert internal initialization. ***/ for(;;) { /* Run measurement of channel 0 with set wait for result */ err = AD1_MeasureChan(TRUE,0); /* Get result of channel 0 justified to left */ err = AD1_GetChanValue16(0,&Value0); /* Run measurement of channel 1 with set wait for result */ err = AD1_MeasureChan(TRUE,1); /* Get result of channel 1 justified to left*/ err = AD1_GetChanValue16(1,&Value1); } /*** 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 ADC */ /* ** ################################################################### ** ** This file was created by Processor Expert 02.86 for ** the Freescale HC08 series of microcontrollers. ** ** ################################################################### */