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

📄 单片机试验6位数显频率计数器.mht

📁 一些C语言单片机程序
💻 MHT
📖 第 1 页 / 共 5 页
字号:
Roman'">=D3=EB=A1=B0=B6=AF=CC=AC=CA=FD=C2=EB=CF=D4=CA=BE=A1=B1=C7=F8=D3=F2=
=D6=D0=B5=C4</SPAN><SPAN=20
        lang=3DEN-US>ABCDEFGH</SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=B6=CB=BF=DA=D3=C3</SPAN><SPAN=20
        lang=3DEN-US>8</SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=D0=BE=C5=C5=CF=DF=C1=AC=BD=D3=A1=A3</SPAN></P>
        <P class=3DMsoNormal=20
        style=3D"MARGIN-LEFT: 49.35pt; TEXT-INDENT: -49.35pt; mso-list: =
l2 level2 lfo2; tab-stops: list 0cm left 54.0pt"><SPAN=20
        lang=3DEN-US=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; =
mso-bidi-font-size: 10.5pt">=A3=A82=A3=A9=A3=AE<SPAN=20
        style=3D"FONT: 7pt 'Times New =
Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;=20
        </SPAN></SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=B0=D1=A1=B0=B5=A5=C6=AC=BB=FA=CF=B5=CD=B3=A1=B1=C7=F8=D3=F2=D6=D0=
=B5=C4</SPAN><SPAN=20
        lang=3DEN-US>P2.0</SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=A3=AD</SPAN><SPAN=20
        lang=3DEN-US>P2.7</SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=D3=EB=A1=B0=B6=AF=CC=AC=CA=FD=C2=EB=CF=D4=CA=BE=A1=B1=C7=F8=D3=F2=
=D6=D0=B5=C4</SPAN><SPAN=20
        lang=3DEN-US>S1S2S3S4S5S6S7S8</SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=B6=CB=BF=DA=D3=C3</SPAN><SPAN=20
        lang=3DEN-US>8</SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=D0=BE=C5=C5=CF=DF=C1=AC=BD=D3=A1=A3</SPAN></P>
        <P class=3DMsoNormal=20
        style=3D"MARGIN-LEFT: 49.35pt; TEXT-INDENT: -49.35pt; mso-list: =
l2 level2 lfo2; tab-stops: list 0cm left 54.0pt"><SPAN=20
        lang=3DEN-US=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; =
mso-bidi-font-size: 10.5pt">=A3=A83=A3=A9=A3=AE<SPAN=20
        style=3D"FONT: 7pt 'Times New =
Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;=20
        </SPAN></SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=B0=D1=A1=B0=B5=A5=C6=AC=BB=FA=CF=B5=CD=B3=A1=B1=C7=F8=D3=F2=D6=D0=
=B5=C4</SPAN><SPAN=20
        lang=3DEN-US>P3.4</SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=A3=A8</SPAN><SPAN=20
        lang=3DEN-US>T0</SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=A3=A9=B6=CB=D7=D3=D3=C3=B5=BC=CF=DF=C1=AC=BD=D3=B5=BD=A1=B0=C6=B5=
=C2=CA=B2=FA=C9=FA=C6=F7=A1=B1=C7=F8=D3=F2=D6=D0=B5=C4</SPAN><SPAN=20
        lang=3DEN-US>WAVE</SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=B6=CB=D7=D3=C9=CF=A1=A3</SPAN></P>
        <P class=3DMsoNormal=20
        style=3D"MARGIN-LEFT: 1cm; TEXT-INDENT: -1cm; mso-list: l2 =
level1 lfo2; tab-stops: list 1.0cm left 54.0pt"><B=20
        style=3D"mso-bidi-font-weight: normal"><I=20
        style=3D"mso-bidi-font-style: normal"><SPAN lang=3DEN-US=20
        style=3D"FONT-SIZE: 12pt; FONT-FAMILY: =
=D3=D7=D4=B2">4=A3=AE<SPAN=20
        style=3D"FONT: 7pt 'Times New =
Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
        </SPAN></SPAN></I></B><B style=3D"mso-bidi-font-weight: =
normal"><I=20
        style=3D"mso-bidi-font-style: normal"><SPAN=20
        style=3D"FONT-SIZE: 12pt; FONT-FAMILY: =
=D3=D7=D4=B2">=B3=CC=D0=F2=C9=E8=BC=C6=C4=DA=C8=DD<SPAN =
lang=3DEN-US><O:P>=20
        </O:P></SPAN></SPAN></I></B></P>
        <P class=3DMsoNormal=20
        style=3D"MARGIN-LEFT: 49.35pt; TEXT-INDENT: -49.35pt; mso-list: =
l2 level2 lfo2; tab-stops: list 0cm left 54.0pt"><SPAN=20
        lang=3DEN-US=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; =
mso-bidi-font-size: 10.5pt">=A3=A81=A3=A9=A3=AE<SPAN=20
        style=3D"FONT: 7pt 'Times New =
Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;=20
        </SPAN></SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=B6=A8=CA=B1</SPAN><SPAN=20
        lang=3DEN-US>/</SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=BC=C6=CA=FD=C6=F7</SPAN><SPAN=20
        lang=3DEN-US>T0</SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=BA=CD</SPAN><SPAN=20
        lang=3DEN-US>T1</SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=B5=C4=B9=A4=D7=F7=B7=BD=CA=BD=C9=E8=D6=C3=A3=AC=D3=C9=CD=BC=BF=C9=
=D6=AA=A3=AC</SPAN><SPAN=20
        lang=3DEN-US>T0</SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=CA=C7=B9=A4=D7=F7=D4=DA=BC=C6=CA=FD=D7=B4=CC=AC=CF=C2=A3=AC=B6=D4=
=CA=E4=C8=EB=B5=C4=C6=B5=C2=CA=D0=C5=BA=C5=BD=F8=D0=D0=BC=C6=CA=FD=A3=AC=B5=
=AB=B6=D4=B9=A4=D7=F7=D4=DA=BC=C6=CA=FD=D7=B4=CC=AC=CF=C2=B5=C4</SPAN><SP=
AN=20
        lang=3DEN-US>T0</SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=A3=AC=D7=EE=B4=F3=BC=C6=CA=FD=D6=B5=CE=AA</SPAN><SPAN=20
        lang=3DEN-US>f<SUB>OSC</SUB>/24</SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=A3=AC=D3=C9=D3=DA</SPAN><SPAN=20
        lang=3DEN-US>f<SUB>OSC</SUB></SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=A3=BD</SPAN><SPAN=20
        lang=3DEN-US>12MHz</SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=A3=AC=D2=F2=B4=CB=A3=BA</SPAN><SPAN=20
        lang=3DEN-US>T0</SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=B5=C4=D7=EE=B4=F3=BC=C6=CA=FD=C6=B5=C2=CA=CE=AA</SPAN><SPAN=20
        lang=3DEN-US>250KHz</SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=A1=A3=B6=D4=D3=DA=C6=B5=C2=CA=B5=C4=B8=C5=C4=EE=BE=CD=CA=C7=D4=DA=
=D2=BB=C3=EB=D6=BB=CA=FD=C2=F6=B3=E5=B5=C4=B8=F6=CA=FD=A3=AC=BC=B4=CE=AA=C6=
=B5=C2=CA=D6=B5=A1=A3=CB=F9=D2=D4</SPAN><SPAN=20
        lang=3DEN-US>T1</SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=B9=A4=D7=F7=D4=DA=B6=A8=CA=B1=D7=B4=CC=AC=CF=C2=A3=AC=C3=BF=B6=A8=
=CA=B1</SPAN><SPAN=20
        lang=3DEN-US>1</SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=C3=EB=D6=D0=B5=BD=A3=AC=BE=CD=CD=A3=D6=B9</SPAN><SPAN=20
        lang=3DEN-US>T0</SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=B5=C4=BC=C6=CA=FD=A3=AC=B6=F8=B4=D3</SPAN><SPAN=20
        lang=3DEN-US>T0</SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=B5=C4=BC=C6=CA=FD=B5=A5=D4=AA=D6=D0=B6=C1=C8=A1=BC=C6=CA=FD=B5=C4=
=CA=FD=D6=B5=A3=AC=C8=BB=BA=F3=BD=F8=D0=D0=CA=FD=BE=DD=B4=A6=C0=ED=A1=A3=CB=
=CD=B5=BD=CA=FD=C2=EB=B9=DC=CF=D4=CA=BE=B3=F6=C0=B4=A1=A3</SPAN></P>
        <P class=3DMsoNormal=20
        style=3D"MARGIN-LEFT: 49.35pt; TEXT-INDENT: -49.35pt; mso-list: =
l2 level2 lfo2; tab-stops: list 0cm left 54.0pt"><SPAN=20
        lang=3DEN-US=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; =
mso-bidi-font-size: 10.5pt">=A3=A82=A3=A9=A3=AE<SPAN=20
        style=3D"FONT: 7pt 'Times New =
Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;=20
        </SPAN></SPAN><SPAN lang=3DEN-US>T1</SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=B9=A4=D7=F7=D4=DA=B6=A8=CA=B1=D7=B4=CC=AC=CF=C2=A3=AC=D7=EE=B4=F3=
=B6=A8=CA=B1=CA=B1=BC=E4=CE=AA</SPAN><SPAN=20
        lang=3DEN-US>65ms</SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=A3=AC=B4=EF=B2=BB=B5=BD</SPAN><SPAN=20
        lang=3DEN-US>1</SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=C3=EB=B5=C4=B6=A8=CA=B1=A3=AC=CB=F9=D2=D4=B2=C9=D3=C3=B6=A8=CA=B1=
</SPAN><SPAN=20
        lang=3DEN-US>50ms</SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=A3=AC=B9=B2=B6=A8=CA=B1</SPAN><SPAN=20
        lang=3DEN-US>20</SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=B4=CE=A3=AC=BC=B4=BF=C9=CD=EA=B3=C9</SPAN><SPAN=20
        lang=3DEN-US>1</SPAN><SPAN=20
        style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-ascii-font-family: =
'Times New Roman'; mso-hansi-font-family: 'Times New =
Roman'">=C3=EB=B5=C4=B6=A8=CA=B1=B9=A6=C4=DC=A1=A3</SPAN></P>
        <P class=3DMsoNormal=20
        style=3D"MARGIN-LEFT: 1cm; TEXT-INDENT: -1cm; mso-list: l2 =
level1 lfo2; tab-stops: list 1.0cm left 54.0pt"><B=20
        style=3D"mso-bidi-font-weight: normal"><I=20
        style=3D"mso-bidi-font-style: normal"><SPAN lang=3DEN-US=20
        style=3D"FONT-SIZE: 12pt; FONT-FAMILY: =
=D3=D7=D4=B2">5=A3=AE<SPAN=20
        style=3D"FONT: 7pt 'Times New =
Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
        </SPAN></SPAN></I></B><B style=3D"mso-bidi-font-weight: =
normal"><I=20
        style=3D"mso-bidi-font-style: normal"><SPAN lang=3DEN-US=20
        style=3D"FONT-SIZE: 12pt; FONT-FAMILY: =
=D3=D7=D4=B2">C=D3=EF=D1=D4=D4=B4=B3=CC=D0=F2<O:P>=20
        </O:P></SPAN></I></B></P>
        <P class=3DMsoNormal=20
        style=3D"LINE-HEIGHT: 12pt; tab-stops: 54.0pt; =
mso-line-height-rule: exactly"><SPAN=20
        lang=3DEN-US style=3D"FONT-SIZE: 9pt">#include =
&lt;AT89X52.H&gt;<O:P>=20
        </O:P></SPAN></P>
        <P class=3DMsoNormal=20
        style=3D"LINE-HEIGHT: 12pt; tab-stops: 54.0pt; =
mso-line-height-rule: exactly"><SPAN=20
        lang=3DEN-US style=3D"FONT-SIZE: 9pt">unsigned char code=20
        dispbit[]=3D{0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};<O:P>=20
        </O:P></SPAN></P>
        <P class=3DMsoNormal=20
        style=3D"LINE-HEIGHT: 12pt; tab-stops: 54.0pt; =
mso-line-height-rule: exactly"><SPAN=20
        lang=3DEN-US style=3D"FONT-SIZE: 9pt">unsigned char code=20
        dispcode[]=3D{0x3f,0x06,0x5b,0x4f,0x66,<O:P> </O:P></SPAN></P>
        <P class=3DMsoNormal=20
        style=3D"LINE-HEIGHT: 12pt; tab-stops: 54.0pt; =
mso-line-height-rule: exactly"><SPAN=20
        lang=3DEN-US style=3D"FONT-SIZE: 9pt"><SPAN=20
        style=3D"mso-spacerun: =
yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
        </SPAN>0x6d,0x7d,0x07,0x7f,0x6f,0x00,0x40};<O:P> =
</O:P></SPAN></P>
        <P class=3DMsoNormal=20
        style=3D"LINE-HEIGHT: 12pt; tab-stops: 54.0pt; =
mso-line-height-rule: exactly"><SPAN=20
        lang=3DEN-US style=3D"FONT-SIZE: 9pt">unsigned char=20
        dispbuf[8]=3D{0,0,0,0,0,0,10,10};<O:P> </O:P></SPAN></P>
        <P class=3DMsoNormal=20
        style=3D"LINE-HEIGHT: 12pt; tab-stops: 54.0pt; =
mso-line-height-rule: exactly"><SPAN=20
        lang=3DEN-US style=3D"FONT-SIZE: 9pt">unsigned char =
temp[8];<O:P>=20
        </O:P></SPAN></P>
        <P class=3DMsoNormal=20
        style=3D"LINE-HEIGHT: 12pt; tab-stops: 54.0pt; =
mso-line-height-rule: exactly"><SPAN=20
        lang=3DEN-US style=3D"FONT-SIZE: 9pt">unsigned char =
dispcount;<O:P>=20
        </O:P></SPAN></P>
        <P class=3DMsoNormal=20
        style=3D"LINE-HEIGHT: 12pt; tab-stops: 54.0pt; =
mso-line-height-rule: exactly"><SPAN=20
        lang=3DEN-US style=3D"FONT-SIZE: 9pt">unsigned char =
T0count;<O:P>=20
        </O:P></SPAN></P>
        <P class=3DMsoNormal=20
        style=3D"LINE-HEIGHT: 12pt; tab-stops: 54.0pt; =
mso-line-height-rule: exactly"><SPAN=20
        lang=3DEN-US style=3D"FONT-SIZE: 9pt">unsigned char =
timecount;<O:P>=20
        </O:P></SPAN></P>
        <P class=3DMsoNormal=20
        style=3D"LINE-HEIGHT: 12pt; tab-stops: 54.0pt; =
mso-line-height-rule: exactly"><SPAN=20
        lang=3DEN-US style=3D"FONT-SIZE: 9pt">bit flag;<O:P> =
</O:P></SPAN></P>
        <P class=3DMsoNormal=20
        style=3D"LINE-HEIGHT: 12pt; tab-stops: 54.0pt; =
mso-line-height-rule: exactly"><SPAN=20
        lang=3DEN-US style=3D"FONT-SIZE: 9pt">unsigned long x;<O:P>=20

⌨️ 快捷键说明

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