/** ###################################################################
**     THIS COMPONENT MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
**     Filename  : ADC1.C
**     Project   : PE_LL64_Quick_Start
**     Processor : MC9S08LL64C_LQFP80
**     Component : Init_ADC
**     Version   : Component 01.209, Driver 01.18, CPU db: 3.00.023
**     Compiler  : CodeWarrior HCS08 C Compiler
**     Date/Time : 11/30/2009, 5:48 PM
**     Abstract  :
**          This file implements the ADC (ADC) module initialization 
**          according to the Peripheral Initialization Bean settings, and defines
**          interrupt service routines prototypes. 

**     Settings  :
**          Bean name                                      : ADC1
**          Device                                         : ADC
**          Prescaler                                      : 8
**          Sample time                                    : ?
**          Conversion mode                                : Single conversion
**          Result data formats                            : 8-bit right
**          ADC Channels                                   : 5
**          Pins                                           : PTA0_KBIP0_SS_ADP4
**                                                           PTA1_KBIP1_SPSCK_ADP5
**                                                           PTA2_KBIP2_SDA_MISO_ADP6
**                                                           PTA3_KBIP3_SCL_MOSI_ADP7
**                                                           PTA6_KBIP6_ADP10_ACMPPLUS
**          Interrupt                                      : Vadc
**          Conversion complete interrupt                  : Disabled
**          ISR name                                       : 
**          Initial channel select                         : ADC Disabled
**          Call Init method                               : yes
**          Enable module                                  : Disabled

**     Contents  :
**         Init - void ADC1_Init(void);
**
**     Copyright : 1997 - 2009 Freescale Semiconductor, Inc. All Rights Reserved.
**     
**     http      : www.freescale.com
**     mail      : support@freescale.com
** ###################################################################*/

/* MODULE ADC1. */

#include "ADC1.h"

/*
** ===================================================================
**     Method      :  ADC1_Init (component Init_ADC)
**
**     Description :
**         This method initializes registers of the ADC module
**         according to this Peripheral Initialization Bean settings.
**         Call this method in user code to initialize the module.
**         By default, the method is called by PE automatically; see
**         "Call Init method" property of the bean for more details.
**     Parameters  : None
**     Returns     : Nothing
** ===================================================================
*/
void ADC1_Init(void)
{
  /* APCTL1: ADPC7=1,ADPC6=1,ADPC5=1,ADPC4=1,??=0,??=0,??=0,ADPC0=0 */
  setReg8(APCTL1, 0xF0);                
  /* APCTL2: ??=0,??=0,??=0,ADPC12=0,ADPC11=0,ADPC10=1,ADPC9=0,ADPC8=0 */
  setReg8(APCTL2, 0x04);                
  /* ADCCFG1: ADLPC=0,ADIV1=1,ADIV0=1,ADLSMP=1,MODE1=0,MODE0=0,ADICLK1=0,ADICLK0=0 */
  setReg8(ADCCFG1, 0x70);               
  /* ADCCFG2: ??=0,??=0,??=0,??=0,ADACKEN=0,ADHSC=0,ADLSTS1=0,ADLSTS0=0 */
  setReg8(ADCCFG2, 0x00);               
  /* ADCCV1: ??=0,??=0,??=0,??=0,CV111=0,CV110=0,CV19=0,CV18=0,CV17=0,CV16=0,CV15=0,CV14=0,CV13=0,CV12=0,CV11=0,CV10=0 */
  setReg16(ADCCV1, 0x00U);              
  /* ADCSC2: ADACT=0,ADTRG=0,ACFE=0,ACFGT=0,??=0,??=0,??=0,??=0 */
  setReg8(ADCSC2, 0x00);                
  /* ADCSC3: ??=0,??=0,??=0,??=0,ADCO=0,??=0,??=0,??=0 */
  setReg8(ADCSC3, 0x00);                
  /* ADCSC1: COCO=0,AIEN=0,??=0,ADCH4=1,ADCH3=1,ADCH2=1,ADCH1=1,ADCH0=1 */
  setReg8(ADCSC1, 0x1F);                
}
/* END ADC1. */

/*
** ###################################################################
**
**     This file was created by Processor Expert 3.07 [04.34]
**     for the Freescale HCS08 series of microcontrollers.
**
** ###################################################################
*/
