/******************** (C) COPYRIGHT 2007 STMicroelectronics ********************
* File Name          : Readme.txt
* Author             : MCD Application Team
* Version            : V4.0
* Date               : 10/09/2007
* Description        : Description of the ADC Interrupt Example.
********************************************************************************
* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*******************************************************************************/

Example description
===================
 This example demonstrates how to use the ADC12 in single channel conversion 
 mode and switch ON a led (LD3 or LD4 or LD5 or LD6) connected to Port 0 according  
 to the conversion result using the ADC12 interrupt service routine.
 Use the board varistor (R63: mounted on the MB393B board) to modify the channel 0
 analog input value. When running the example, only one of the four
 leds on the GPIO0 is switched ON according to the ADC conversion result. 
 For example, the led LD3 is switched ON if the ADC conversion result is greater 
 than 0x3C8 and less than 0x790.  

 This example demonstrates :

  - The conversion mode and the channel selection.
  - The prescaler configuration.
  - The use of the converter in single channel conversion mode.
  - ADC12 interrupt configuration.
  - ADC12 interrupt handling.

 This example is split into 4 parts:

1) Analog input configuration:

   - Configure the used analog input (channel 0)to High impedance Analog input.

2) EIC configuration:

   - ADC12 channel priority configuration,
   - Enable ADC12 channel interrupt,
   - Enable Interrupt.

3) Converter configuration:

  - Initialize the converter,
  - Configure the sampling frequency,
  - Configure the conversion mode,
  - Select the channel to be converted,
  - Enable ADC interrupts,
  - Start the convertion.

4) Get the convertion result and switch on a led in the ADC12_IRQHandler:

  - Read the conversion result,
  - Locate the conversion result 
  - switch on one led on GPIO0 according to the ADC conversion result.

Directory contents
==================
 71x_conf.h  Library Configuration file
 71x_it.c    Interrupt handlers
 71x_it.h    Interrupt handlers header file
 main.c      Main program


Hardware environment
====================
This example works as standalone on the STR71x-Eval board (mb393) and extra 
hardware implementation is not required to run the example.

How to use it
=============
In order to make the program work, you must do the following:
- Create a project and setup all your toolchain's start-up files
- Compile the directory content files and required Library files :
  + 71x_lib.c
  + 71x_adc12.c
  + 71x_apb.c
  + 71x_gpio.c
  + 71x_rccu.c
  + 71x_eic.c
  + 71x_uart.c

  
- Link all compiled files and load your image into either RAM or FLASH
- Run the example


******************* (C) COPYRIGHT 2007 STMicroelectronics *****END OF FILE****
