#include <hidef.h> /* for EnableInterrupts macro */
#include "derivative.h" /* include peripheral declarations */
#include "MCG.h"
#include "ADC.h"
#include "Display.h"


void main(void) 
{
   EnableInterrupts;
   vfnMCG_Init();
   vfnSCIInit();
   
  /** Step1: Init ADC module*/  
  vfnADC_Init ();
  vfnADConfigChannel(0);
  /** Step3: Start Continuous Conversions */
  ADC_CONVERT_CONTINUOUS_CHANNEL(0); 

  for(;;) 
  {
	if (ADC_COCO)
	{
		ADC_COCO_CLEAR;
		vfnGraphicWords(&sADC.gu16LatestResult[0]);
	}
	
  __RESET_WATCHDOG();	
  } 
}

