⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 第一届飞思卡尔智能车竞赛华中科技大学的程序清单 2_大学生参考网.mht

📁 飞思卡尔单片机mc9s12dg128的ad初始化参考程序
💻 MHT
📖 第 1 页 / 共 5 页
字号:
            <P class=3DDefault style=3D"MARGIN: 0cm 0cm 0pt"><FONT =
size=3D3><SPAN=20
            lang=3DEN-US style=3D"COLOR: #009a00; FONT-FAMILY: 'Times =
New Roman'">*=20
            </SPAN><SPAN=20
            style=3D"COLOR: #009a00; mso-bidi-font-family: 'Times New =
Roman'; mso-ascii-font-family: 'Times New Roman'"><FONT=20
            face=3D=BA=DA=CC=E5>=D7=A2=D2=E2=A3=BA</FONT></SPAN><SPAN=20
            style=3D"COLOR: #009a00; FONT-FAMILY: 'Times New Roman'"> =
</SPAN><SPAN=20
            style=3D"COLOR: #009a00; mso-bidi-font-family: 'Times New =
Roman'; mso-ascii-font-family: 'Times New Roman'"><FONT=20
            =
face=3D=BA=DA=CC=E5>=D5=E2=B8=F6=BA=AF=CA=FD=B5=F7=D3=C3=C1=CB</FONT></SP=
AN><SPAN lang=3DEN-US=20
            style=3D"COLOR: #009a00; FONT-FAMILY: 'Times New Roman'">=20
            Init_PWMout()nit_INT_Timer()nit_PID()</SPAN><SPAN=20
            style=3D"COLOR: #009a00; FONT-FAMILY: =D0=C2=CB=CE=CC=E5; =
mso-bidi-font-family: 'Times New Roman'; mso-ascii-font-family: 'Times =
New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=A1=A1=A1=A1</SPAN><SPAN=20
            lang=3DEN-US=20
            style=3D"COLOR: #009a00; FONT-FAMILY: 'Times New Roman'; =
mso-fareast-font-family: =D0=C2=CB=CE=CC=E5">=20
            <o:p></o:p></SPAN></FONT></P>
            <P class=3DDefault style=3D"MARGIN: 0cm 0cm 0pt"><SPAN =
lang=3DEN-US=20
            style=3D"COLOR: #009a00; FONT-FAMILY: 'Times New Roman'; =
mso-fareast-font-family: =D0=C2=CB=CE=CC=E5"><FONT=20
            size=3D3>* <o:p></o:p></FONT></SPAN></P>
            <P class=3DDefault style=3D"MARGIN: 0cm 0cm 0pt"><FONT =
size=3D3><SPAN=20
            lang=3DEN-US=20
            style=3D"COLOR: #009a00; FONT-FAMILY: 'Times New Roman'; =
mso-fareast-font-family: =D0=C2=CB=CE=CC=E5">*=20
            </SPAN><SPAN=20
            style=3D"COLOR: #009a00; mso-bidi-font-family: 'Times New =
Roman'; mso-ascii-font-family: 'Times New Roman'"><FONT=20
            face=3D=BA=DA=CC=E5>=CB=B5=C3=F7=A3=BA</FONT></SPAN><SPAN=20
            style=3D"COLOR: #009a00; FONT-FAMILY: 'Times New Roman'"> =
</SPAN><SPAN=20
            style=3D"COLOR: #009a00; mso-bidi-font-family: 'Times New =
Roman'; mso-ascii-font-family: 'Times New Roman'"><FONT=20
            face=3D=BA=DA=CC=E5>=CE=DE</FONT></SPAN><SPAN lang=3DEN-US=20
            style=3D"COLOR: #009a00; FONT-FAMILY: 'Times New Roman'">=20
            <o:p></o:p></SPAN></FONT></P>
            <P class=3DDefault style=3D"MARGIN: 0cm 0cm 0pt"><SPAN =
lang=3DEN-US=20
            style=3D"COLOR: #009a00; FONT-FAMILY: 'Times New =
Roman'"><FONT=20
            =
size=3D3>****************************************************************=
******************/=20
            <o:p></o:p></FONT></SPAN></P>
            <P class=3DDefault style=3D"MARGIN: 0cm 0cm 0pt"><FONT =
size=3D3><SPAN=20
            lang=3DEN-US style=3D"COLOR: blue; FONT-FAMILY: 'Times New =
Roman'">void=20
            </SPAN><SPAN lang=3DEN-US=20
            style=3D"COLOR: #870000; FONT-FAMILY: 'Times New =
Roman'">Init</SPAN><SPAN=20
            lang=3DEN-US style=3D"FONT-FAMILY: 'Times New =
Roman'">(</SPAN><SPAN=20
            lang=3DEN-US=20
            style=3D"COLOR: blue; FONT-FAMILY: 'Times New =
Roman'">void</SPAN><SPAN=20
            lang=3DEN-US style=3D"FONT-FAMILY: 'Times New Roman'">)=20
            <o:p></o:p></SPAN></FONT></P>
            <P class=3DDefault style=3D"MARGIN: 0cm 0cm 0pt"><SPAN =
lang=3DEN-US=20
            style=3D"FONT-FAMILY: 'Times New Roman'"><FONT size=3D3>{=20
            <o:p></o:p></FONT></SPAN></P>
            <P class=3DDefault style=3D"MARGIN: 0cm 0cm 0pt"><FONT =
size=3D3><SPAN=20
            lang=3DEN-US style=3D"FONT-FAMILY: 'Times New =
Roman'">REFDV=3D0x01;=20
            </SPAN><SPAN lang=3DEN-US=20
            style=3D"COLOR: #009a00; FONT-FAMILY: 'Times New Roman'">/* =
initiate=20
            PLL clock */ <o:p></o:p></SPAN></FONT></P>
            <P class=3DDefault style=3D"MARGIN: 0cm 0cm 0pt"><FONT =
size=3D3><SPAN=20
            lang=3DEN-US style=3D"FONT-FAMILY: 'Times New Roman'">SYNR =
=3D0x02;=20
            </SPAN><SPAN lang=3DEN-US=20
            style=3D"COLOR: #009a00; FONT-FAMILY: 'Times New Roman'">/* =
system=20
            clock <st1:chmetcnv TCSC=3D"0" NumberType=3D"1" =
Negative=3D"False"=20
            HasSpace=3D"False" SourceValue=3D"24" UnitName=3D"m"=20
            w:st=3D"on">24M</st1:chmetcnv> */ =
<o:p></o:p></SPAN></FONT></P>
            <P class=3DDefault style=3D"MARGIN: 0cm 0cm 0pt"><FONT =
size=3D3><SPAN=20
            lang=3DEN-US style=3D"COLOR: blue; FONT-FAMILY: 'Times New =
Roman'">while=20
            </SPAN><SPAN lang=3DEN-US=20
            style=3D"FONT-FAMILY: 'Times New Roman'">(!(CRGFLG &amp; =
0x08)){}=20
            </SPAN><SPAN lang=3DEN-US=20
            style=3D"COLOR: #009a00; FONT-FAMILY: 'Times New Roman'">/* =
wait=20
            untill steady */ <o:p></o:p></SPAN></FONT></P>
            <P class=3DDefault style=3D"MARGIN: 0cm 0cm 0pt"><FONT =
size=3D3><SPAN=20
            lang=3DEN-US style=3D"FONT-FAMILY: 'Times New =
Roman'">CLKSEL=3D0x80;=20
            </SPAN><SPAN lang=3DEN-US=20
            style=3D"COLOR: #009a00; FONT-FAMILY: 'Times New Roman'">/*=20
            </SPAN><SPAN=20
            style=3D"COLOR: #009a00; mso-bidi-font-family: 'Times New =
Roman'; mso-ascii-font-family: 'Times New Roman'"><FONT=20
            =
face=3D=BA=DA=CC=E5>=D1=A1=B6=A8=CB=F9=CF=E0=BB=B7=CA=B1=D6=D3</FONT></SP=
AN><SPAN lang=3DEN-US=20
            style=3D"COLOR: #009a00; FONT-FAMILY: 'Times New Roman'"> */ =

            <o:p></o:p></SPAN></FONT></P>
            <P class=3DDefault style=3D"MARGIN: 0cm 0cm 0pt"><FONT =
size=3D3><SPAN=20
            lang=3DEN-US style=3D"FONT-FAMILY: 'Times New =
Roman'">FCLKDIV=3D0x49;=20
            </SPAN><SPAN lang=3DEN-US=20
            style=3D"COLOR: #009a00; FONT-FAMILY: 'Times New Roman'">/*=20
            </SPAN><SPAN=20
            style=3D"COLOR: #009a00; mso-bidi-font-family: 'Times New =
Roman'; mso-ascii-font-family: 'Times New Roman'"><FONT=20
            face=3D=BA=DA=CC=E5>=CA=B9</FONT></SPAN><SPAN lang=3DEN-US=20
            style=3D"COLOR: #009a00; FONT-FAMILY: 'Times New =
Roman'">FLASH=20
            </SPAN><SPAN=20
            style=3D"COLOR: #009a00; mso-bidi-font-family: 'Times New =
Roman'; mso-ascii-font-family: 'Times New Roman'"><FONT=20
            face=3D=BA=DA=CC=E5>=BA=CD</FONT></SPAN><SPAN lang=3DEN-US=20
            style=3D"COLOR: #009a00; FONT-FAMILY: 'Times New Roman'"> =
EEPROM */=20
            <o:p></o:p></SPAN></FONT></P>
            <P class=3DDefault style=3D"MARGIN: 0cm 0cm 0pt"><FONT =
size=3D3><SPAN=20
            lang=3DEN-US style=3D"COLOR: #009a00; FONT-FAMILY: 'Times =
New Roman'">/*=20
            </SPAN><SPAN=20
            style=3D"COLOR: #009a00; mso-bidi-font-family: 'Times New =
Roman'; mso-ascii-font-family: 'Times New Roman'"><FONT=20
            =
face=3D=BA=DA=CC=E5>=B5=C4=B2=C1=B3=FD=B2=D9=D7=F7=B9=A4=D7=F7=C6=B5=C2=CA=
=D4=DA</FONT></SPAN><SPAN lang=3DEN-US=20
            style=3D"COLOR: #009a00; FONT-FAMILY: 'Times New =
Roman'">200HZ</SPAN><SPAN=20
            style=3D"COLOR: #009a00; mso-bidi-font-family: 'Times New =
Roman'; mso-ascii-font-family: 'Times New Roman'"><FONT=20
            face=3D=BA=DA=CC=E5>=D7=F3=D3=D2</FONT></SPAN><SPAN =
lang=3DEN-US=20
            style=3D"COLOR: #009a00; FONT-FAMILY: 'Times New Roman'"> */ =

            <o:p></o:p></SPAN></FONT></P>
            <P class=3DDefault style=3D"MARGIN: 0cm 0cm 0pt"><SPAN =
lang=3DEN-US=20
            style=3D"FONT-FAMILY: 'Times New Roman'"><FONT =
size=3D3>ECLKDIV=3D0x49;=20
            <o:p></o:p></FONT></SPAN></P>
            <P class=3DDefault style=3D"MARGIN: 0cm 0cm 0pt"><FONT =
size=3D3><SPAN=20
            lang=3DEN-US=20
            style=3D"COLOR: #870000; FONT-FAMILY: 'Times New =
Roman'">Init_PWMout</SPAN><SPAN=20
            lang=3DEN-US style=3D"FONT-FAMILY: 'Times New Roman'">(); =
</SPAN><SPAN=20
            lang=3DEN-US style=3D"COLOR: #009a00; FONT-FAMILY: 'Times =
New Roman'">/*=20
            01:50Hz 45:1kHz */ <o:p></o:p></SPAN></FONT></P>
            <P class=3DDefault style=3D"MARGIN: 0cm 0cm 0pt"><FONT =
size=3D3><SPAN=20
            lang=3DEN-US=20
            style=3D"COLOR: #870000; FONT-FAMILY: 'Times New =
Roman'">Init_INT_Timer</SPAN><SPAN=20
            lang=3DEN-US style=3D"FONT-FAMILY: 'Times New Roman'">(); =
</SPAN><SPAN=20
            lang=3DEN-US style=3D"COLOR: #009a00; FONT-FAMILY: 'Times =
New Roman'">/*=20
            initiate ETC(Enhanced Capture Clock) */=20
<o:p></o:p></SPAN></FONT></P>
            <P class=3DDefault style=3D"MARGIN: 0cm 0cm 0pt"><FONT =
size=3D3><SPAN=20
            lang=3DEN-US=20
            style=3D"COLOR: #870000; FONT-FAMILY: 'Times New =
Roman'">Init_PID</SPAN><SPAN=20
            lang=3DEN-US style=3D"FONT-FAMILY: 'Times New Roman'">(); =
</SPAN><SPAN=20
            lang=3DEN-US style=3D"COLOR: #009a00; FONT-FAMILY: 'Times =
New Roman'">/*=20
            initiate PID caculating process */ =
<o:p></o:p></SPAN></FONT></P>
            <P class=3DDefault=20
            style=3D"MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><FONT =
size=3D3><SPAN=20
            lang=3DEN-US style=3D"FONT-FAMILY: 'Times New Roman'">DDRK =
|=3D 0x80;=20
            </SPAN><SPAN lang=3DEN-US=20
            style=3D"COLOR: #009a00; FONT-FAMILY: 'Times New Roman'">/* =
Start Car=20
            -- stop car */ <o:p></o:p></SPAN></FONT></P>
            <P class=3DDefault style=3D"MARGIN: 0cm 0cm 0pt"><SPAN =
lang=3DEN-US=20
            style=3D"FONT-FAMILY: 'Times New Roman'"><FONT =
size=3D3>PORTK &amp;=3D=20
            0x<st1:chmetcnv TCSC=3D"0" NumberType=3D"1" =
Negative=3D"False"=20
            HasSpace=3D"False" SourceValue=3D"7" UnitName=3D"F"=20
            w:st=3D"on">7F</st1:chmetcnv>; <o:p></o:p></FONT></SPAN></P>
            <P class=3DDefault=20
            style=3D"TEXT-JUSTIFY: inter-ideograph; MARGIN: 0cm 0cm 0pt; =
TEXT-ALIGN: justify"><SPAN=20
            lang=3DEN-US style=3D"FONT-FAMILY: 'Times New Roman'"><FONT =
size=3D3>}=20
            <o:p></o:p></FONT></SPAN></P>
            <P class=3DDefault style=3D"MARGIN: 0cm 0cm 0pt"><SPAN =
lang=3DEN-US=20
            style=3D"COLOR: #009a00; FONT-FAMILY: 'Times New =
Roman'"><FONT=20
            size=3D3>/* <o:p></o:p></FONT></SPAN></P>
            <P class=3DDefault style=3D"MARGIN: 0cm 0cm 0pt"><SPAN =
lang=3DEN-US=20
            style=3D"COLOR: #009a00; FONT-FAMILY: 'Times New =
Roman'"><FONT=20
            =
size=3D3>****************************************************************=
*******************=20
            <o:p></o:p></FONT></SPAN></P>
            <P class=3DDefault style=3D"MARGIN: 0cm 0cm 0pt"><SPAN =
lang=3DEN-US=20
            style=3D"COLOR: #009a00; FONT-FAMILY: 'Times New =
Roman'"><FONT=20
            size=3D3>* SmartCar.c <o:p></o:p></FONT></SPAN></P>
            <P class=3DDefault style=3D"MARGIN: 0cm 0cm 0pt"><SPAN =
lang=3DEN-US=20
            style=3D"COLOR: #009a00; FONT-FAMILY: 'Times New =
Roman'"><FONT=20
            size=3D3>* <o:p></o:p></FONT></SPAN></P>
            <P class=3DDefault style=3D"MARGIN: 0cm 0cm 0pt"><SPAN =
lang=3DEN-US=20
            style=3D"COLOR: #009a00; FONT-FAMILY: 'Times New =
Roman'"><FONT=20
            size=3D3>* (c) Copyright 2006,Zhao Cheng =
<o:p></o:p></FONT></SPAN></P>
            <P class=3DDefault style=3D"MARGIN: 0cm 0cm 0pt"><SPAN =
lang=3DEN-US=20
            style=3D"COLOR: #009a00; FONT-FAMILY: 'Times New =
Roman'"><FONT=20
            size=3D3>* All Rights Reserved <o:p></o:p></FONT></SPAN></P>
            <P class=3DDefault style=3D"MARGIN: 0cm 0cm 0pt"><SPAN =
lang=3DEN-US=20
            style=3D"COLOR: #009a00; FONT-FAMILY: 'Times New =
Roman'"><FONT=20
            size=3D3>* <o:p></o:p></FONT></SPAN></P>
            <P class=3DDefault style=3D"MARGIN: 0cm 0cm 0pt"><SPAN =
lang=3DEN-US=20
            style=3D"COLOR: #009a00; FONT-FAMILY: 'Times New =
Roman'"><FONT=20
            size=3D3>* By : Zhao Cheng <o:p></o:p></FONT></SPAN></P>
            <P class=3DDefault style=3D"MARGIN: 0cm 0cm 0pt"><SPAN =
lang=3DEN-US=20
            style=3D"COLOR: #009a00; FONT-FAMILY: 'Times New =
Roman'"><FONT=20
            size=3D3>* Data : 2006_5_6 <o:p></o:p></FONT></SPAN></P>
            <P class=3DDefault style=3D"MARGIN: 0cm 0cm 0pt"><SPAN =
lang=3DEN-US=20
            style=3D"COLOR: #009a00; FONT-FAMILY: 'Times New =
Roman'"><FONT=20
            size=3D3>* Note : Don't change this file if possible.=20
            <o:p></o:p></FONT></SPAN></P>
            <P class=3DDefault style=3D"MARGIN: 0cm 0cm 0pt"><SPAN =
lang=3DEN-US=20
            style=3D"COLOR: #009a00; FONT-FAMILY: 'Times New =

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -