<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
	<TITLE>AD Converter</TITLE>
	<META NAME="GENERATOR" CONTENT="OpenOffice.org 1.0.1  (Win32)">
	<META NAME="CREATED" CONTENT="20040513;8581625">
	<META NAME="CHANGED" CONTENT="20050302;14254472">
</HEAD>
<BODY LANG="fr-FR">
<P STYLE="margin-bottom: 0cm"><FONT SIZE=2><FONT FACE="Helvetica, Arial, sans-serif"><A HREF="javascript:history.go(-1)"><IMG SRC="../images/back.gif" NAME="Image1" ALT="Back" ALIGN=MIDDLE HSPACE=5 WIDTH=37 HEIGHT=44 BORDER=0></A><A HREF="javascript:history.go(-1)">
</A>
<A HREF="../summary.html"><IMG SRC="../images/sommaire.gif" NAME="Image2" ALT="Summary" ALIGN=MIDDLE HSPACE=5 WIDTH=37 HEIGHT=44 BORDER=0></A><A HREF="../summary.html">
</A><BR><IMG SRC="../images/entete.gif" NAME="Image3" ALIGN=BOTTOM WIDTH=541 HEIGHT=13 BORDER=0>
</FONT></FONT>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm"><FONT FACE="Helvetica, Arial, sans-serif"><FONT SIZE=2><B>AD
Converter</B></FONT></FONT></P>
<P STYLE="margin-left: 2cm"><BR><BR>
</P>
<P STYLE="margin-left: 2cm"><FONT FACE="Helvetica, Arial, sans-serif"><FONT SIZE=2>Many
ST7 derivatives features an on-chip Analog to Digital Converter (ADC)
peripheral. This ADC is a successive approximation converter with
internal sample and hold circuitry. It is associated with an analog
multiplexer that allows to convert analog voltage level from
different sources.</FONT></FONT></P>
<CENTER>
	<TABLE WIDTH=90% BORDER=0 CELLPADDING=0 CELLSPACING=0>
		<TR>
			<TD WIDTH=30 VALIGN=TOP>
				<P><FONT FACE="Helvetica, Arial, sans-serif"><FONT SIZE=2><IMG SRC="../images/ADC_conf_and_use.gif" NAME="Image4" ALT="ADC Configure and Use" ALIGN=BOTTOM WIDTH=225 HEIGHT=20 BORDER=0>
				</FONT></FONT>
				</P>
			</TD>
		</TR>
		<TR>
			<TD VALIGN=TOP>
				<P><FONT FACE="Helvetica, Arial, sans-serif"><FONT SIZE=2>Check
				this option to use the AD Converter. This will make the other
				options visible. </FONT></FONT>
				</P>
			</TD>
		</TR>
	</TABLE>
</CENTER>
<P><BR><BR>
</P>
<CENTER>
	<TABLE WIDTH=90% BORDER=0 CELLPADDING=0 CELLSPACING=0>
		<TR>
			<TD WIDTH=30 VALIGN=TOP>
				<P><FONT FACE="Helvetica, Arial, sans-serif"><FONT SIZE=2><IMG SRC="../images/ADC_en_int.gif" NAME="Image5" ALT="ADC Enable Interrupt" ALIGN=BOTTOM WIDTH=225 HEIGHT=20 BORDER=0>
				</FONT></FONT>
				</P>
			</TD>
		</TR>
		<TR>
			<TD VALIGN=TOP>
				<P><FONT FACE="Helvetica, Arial, sans-serif"><FONT SIZE=2>Check
				this option to enable the AD Converter Interrupt that occurs at
				the end of the conversion.</FONT></FONT></P>
			</TD>
		</TR>
	</TABLE>
</CENTER>
<P><BR><BR>
</P>
<CENTER>
	<TABLE WIDTH=90% BORDER=0 CELLPADDING=0 CELLSPACING=0>
		<TR>
			<TD WIDTH=30 VALIGN=TOP>
				<P><FONT FACE="Helvetica, Arial, sans-serif"><FONT SIZE=2><IMG SRC="../images/ADC_en_OneShot_mode.gif" NAME="Image6" ALT="ADC Enable One Shot Mode" ALIGN=BOTTOM WIDTH=225 HEIGHT=20 BORDER=0>
				</FONT></FONT>
				</P>
			</TD>
		</TR>
		<TR>
			<TD VALIGN=TOP>
				<P><FONT FACE="Helvetica, Arial, sans-serif"><FONT SIZE=2>Check
				this option to use the AD Converter in the One Shot mode. The One
				Shot mode means that the AD Converter will be stopped when end of
				conversion is reached (single measurement).</FONT></FONT></P>
			</TD>
		</TR>
	</TABLE>
</CENTER>
<P><BR><BR>
</P>
<CENTER>
	<TABLE WIDTH=90% BORDER=0 CELLPADDING=0 CELLSPACING=0>
		<TR>
			<TD WIDTH=30 VALIGN=TOP>
				<P><FONT FACE="Helvetica, Arial, sans-serif"><FONT SIZE=2><IMG SRC="../images/ADC_speed.gif" NAME="Image7" ALT="ADC Speed" ALIGN=BOTTOM WIDTH=225 HEIGHT=20 BORDER=0>
				</FONT></FONT>
				</P>
			</TD>
		</TR>
		<TR>
			<TD VALIGN=TOP>
				<P><FONT FACE="Helvetica, Arial, sans-serif"><FONT SIZE=2>This
				option selects the speed of the AD Converter. it can be either
				<I>f<FONT SIZE=1>cpu</FONT>/4</I>, <I>f<FONT SIZE=1>cpu</FONT>/2</I>
				or <I>f<FONT SIZE=1>cpu</FONT></I>.<BR><FONT COLOR="#009900">Note:
				fcpu can be used only on the following microcontrollers:
				ST7LITE20, ST7LITE25, ST7LITE29, ST7LITE10, ST7LITE15, ST7LITE19,
				ST7LITE02, ST7LITE05, ST7LITE09, ST7LITES2, ST7LITES5,
				ST7DALI.<BR>On the following microcontrollers, f<FONT SIZE=1>cpu</FONT>
				can be used only if the CPU frequency is less or equal to 4 MHz:
				ST72260G1, ST72262G1, ST72262G2, ST72264G1, ST72264G2.</FONT></FONT></FONT></P>
			</TD>
		</TR>
	</TABLE>
</CENTER>
<P><BR><BR>
</P>
<CENTER>
	<TABLE WIDTH=90% BORDER=0 CELLPADDING=0 CELLSPACING=0>
		<TR>
			<TD WIDTH=30 VALIGN=TOP>
				<P><FONT FACE="Helvetica, Arial, sans-serif"><FONT SIZE=2><IMG SRC="../Images/ADC_Slow_Mode.gif" NAME="Image8" ALT="ADC Enable One Shot Mode" ALIGN=BOTTOM WIDTH=225 HEIGHT=20 BORDER=0>
				</FONT></FONT>
				</P>
			</TD>
		</TR>
		<TR>
			<TD VALIGN=TOP>
				<P><FONT FACE="Helvetica, Arial, sans-serif"><FONT SIZE=2>Check
				this option to use the AD Converter in the slow mode. </FONT></FONT>
				</P>
			</TD>
		</TR>
	</TABLE>
</CENTER>
<P><BR><BR>
</P>
<CENTER>
	<TABLE WIDTH=90% BORDER=0 CELLPADDING=0 CELLSPACING=0>
		<TR>
			<TD WIDTH=30 VALIGN=TOP>
				<P><FONT FACE="Helvetica, Arial, sans-serif"><FONT SIZE=2><IMG SRC="../Images/ADC_channel.gif" NAME="Image9" ALT="ADC Enable One Shot Mode" ALIGN=BOTTOM WIDTH=225 HEIGHT=20 BORDER=0>
				</FONT></FONT>
				</P>
			</TD>
		</TR>
		<TR>
			<TD VALIGN=TOP>
				<P><FONT FACE="Helvetica, Arial, sans-serif"><FONT SIZE=2>Select
				the channel to be used with the ADC. Only one channel can be
				selected by RBuilder. RBuilder presents the channel from 0 to 15,
				but not all devices offers all those channels. Refer to your
				device datasheet to make sure that the channel is supported by
				your device.</FONT></FONT></P>
			</TD>
		</TR>
	</TABLE>
</CENTER>
<P><BR><BR>
</P>
<CENTER>
	<TABLE WIDTH=90% BORDER=0 CELLPADDING=0 CELLSPACING=0>
		<TR>
			<TD WIDTH=30 VALIGN=TOP>
				<P><FONT FACE="Helvetica, Arial, sans-serif"><FONT SIZE=2><IMG SRC="../images/ADC_gen_sample_code.gif" NAME="Image10" ALT="ADC Generate Sample Code" ALIGN=BOTTOM WIDTH=225 HEIGHT=20 BORDER=0>
				</FONT></FONT>
				</P>
			</TD>
		</TR>
		<TR>
			<TD VALIGN=TOP>
				<P><FONT FACE="Helvetica, Arial, sans-serif"><FONT SIZE=2>Check
				this option if you want <I>RBuilder</I> to generate an example of
				source code using the AD Converter. The code will be inserted in
				the main function. This is usefull to see how the <I>ST7 library</I>
				can be used.<BR>To make this example working with REva (whatever
				the daugther board), you need to set the &laquo;&nbsp;enabling&nbsp;&raquo;
				jumpers for the LEDs (blue on the picture below) and also for the
				potentiometer (red). Then, if you turn the potentiometer, you
				will light more or less of the 8 LEDs depending on the position.</FONT></FONT></P>
				<P><IMG SRC="ADCSample.jpg" NAME="Image12" ALIGN=LEFT WIDTH=357 HEIGHT=221 BORDER=0><BR CLEAR=LEFT><FONT FACE="Helvetica, Arial, sans-serif"><FONT SIZE=2><BR><FONT COLOR="#00ae00">Note:
				depending on the microcontroller, two pins of the ouput port
				could be reserved for ICC (debugging/programming port). <BR>RBuilder
				will automatically reserve these pins (and the LEDs will not
				light when turning the potentiometer).</FONT></FONT></FONT></P>
			</TD>
		</TR>
	</TABLE>
</CENTER>
<P><FONT SIZE=2><FONT FACE="Helvetica, Arial, sans-serif"><BR><BR><BR><BR><BR><IMG SRC="../images/pieddepage.gif" NAME="Image11" ALIGN=BOTTOM WIDTH=541 HEIGHT=39 BORDER=0>
<BR><BR><BR><BR><BR><BR><BR></FONT></FONT><BR><BR><BR><BR><BR><BR><BR>
</P>
</BODY>
</HTML>