一份关于电脑串并口各引脚对应端口地址和操作办法的资料包,还有一些试验源程序.
源代码在线查看: 一个简单的vb串口发送程序(源码)!.mht
From:
Subject: =?gb2312?B?0ru49rzytaW1xFZCtK6/2reiy82zzNDyo6jUtMLro6mjoQ==?=
Date: Mon, 28 Apr 2003 00:00:57 +0800
MIME-Version: 1.0
Content-Type: multipart/related;
boundary="----=_NextPart_000_0052_01C30D19.3F121900";
type="text/html"
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
This is a multi-part message in MIME format.
------=_NextPart_000_0052_01C30D19.3F121900
Content-Type: text/html;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable
Content-Location: =?gb2312?B?ZmlsZTovL0Q6XE15RG9jdW1lbnRzXMHZyrHOxLz+vNBcTXklMjBXZQ==?=
=?gb2312?B?YlzSu7j2vPK1pbXEVkK0rr/at6LLzbPM0PKjqNS0wuujqaOhLmh0bQ==?=
-->=D2=BB=B8=F6=BC=F2=B5=A5=B5=C4VB=B4=AE=BF=DA=B7=A2=CB=
=CD=B3=CC=D0=F2=A3=A8=D4=B4=C2=EB=A3=A9=A3=A1
charset=3Dgb2312"> href=3D"file:///D:/MyDocuments/=C1=D9=CA=B1=CE=C4=BC=FE=BC=D0/My%2520Web/=
=D2=BB=B8=F6=BC=F2=B5=A5=B5=C4VB=B4=AE=BF=DA=B7=A2=CB=CD=B3=CC=D0=F2=A3=A8=
=D4=B4=C2=EB=A3=A9=A3=A1.files/style.css"=20
rel=3Dstylesheet>
width=3D"97%"=20
borderColorLight=3D#000000 border=3D1>
align=3Dcenter>=CE=C4=D5=C2=B1=E0=BA=C5:183----=BC=D3=C8=EB=C8=D5=C6=DA:2=
001-5-29
href=3D"javascript:self.close()">=A1=BA=B9=D8=B1=D5=B4=B0=BF=DA=A1=BB=
align=3Dcenter>=D2=BB=B8=F6=BC=F2=B5=A5=B5=C4VB=B4=AE=BF=DA=B7=A2=CB=CD=
=B3=CC=D0=F2=A3=A8=D4=B4=C2=EB=A3=A9=A3=A1
=
'-----=B7=A2=CB=CD=B0=B4=C5=A5Click=CA=C2=BC=FE=D7=D3=B3=CC=
=D0=F2-----------Private Sub=20
Fasong_Click()Dim JIHAO(0) As=20
=
Byte &nb=
sp; =A1=AF=BB=FA=BA=C5Dim=20
head_data(4) As=20
=
Byte =A1=
=AF5=20
Byte=BF=D8=D6=C6=D7=D6Dim end_data(0) As=20
=
Byte &nb=
sp;'1=20
Byte =BD=E1=CA=F8=D7=D6 JIHAO(0) =3D=20
Val(Text3.Text) head_data(0) =3D=20
Val(Text4.Text) head_data(2) =3D=20
=
&HEE  =
; 'TIMH hea=
d_data(3)=20
=3D=20
=
&HEE  =
; 'TIML hea=
d_data(4)=20
=3D=20
=
Val(Combo1.Text) 'INMOD  =
; end_data(0)=20
=3D &HFF If Combo2.Text =3D =
"=D4=F6=BC=D3" Then=20
head_data(1) =3D &H99 If =
Combo2.Text =3D "=C7=E5=BF=D5"=20
Then head_data(1) =3D &H33 If =
Combo2.Text =3D=20
"=C9=BE=B3=FD" Then head_data(1) =3D =
&H32 Ready =3D 0:=20
ErrCount =3D 0 On Error GoTo=20
=
ERRORCOM  =
; =A1=AF=B4=F2=BF=AA=B4=ED=CE=F3=B4=A6=C0=ED'-------=
--------------------------------------------------- =
If=20
com1.Value Then MSComm1.CommPort =3D =
1 'Use=20
com1 If com2.Value Then=20
MSComm1.CommPort =3D 2 'Use=20
com2 MSComm1.Settings =3D=20
FORM1.Combo3.Text +=20
=
",M,8,2" '=C9=E8=B6=A8=B2=A8=CC=D8=C2=CA=BA=CD=
=D6=C3=D0=A3=D1=E9=BA=CD=CE=BB=CE=AA1 MS=
Comm1.InputLen=20
=3D=20
=
0 =
' MSComm1.PortOp=
en=20
=3D=20
=
-1  =
; 'Open=20
the port MSComm1.OutBufferCount =
=3D=20
0 MSComm1.Output =3D=20
=
JIHAO &n=
bsp; =A1=AE=B7=A2=CB=CD=BB=FA=BA=C5  =
; MSComm1.PortOpen=20
=3D=20
=
False &n=
bsp;=A1=AF=B9=D8=B1=D5=B4=AE=BF=DA MSCom=
m1.Settings=20
=3D FORM1.Combo3.Text + ",S,8,2"=20
=
'=C9=E8=B6=A8=B2=A8=CC=D8=C2=CA=BA=CD=D6=C3=D0=A3=D1=E9=BA=CD=CE=BB=CE=AA=
=BF=D5 MSComm1.OutBufferCount =3D=20
0 MSComm1.PortOpen =3D=20
True MSComm1.Output =3D=20
head_data MSComm1.Output =3D=20
Text2.Text MSComm1.Output =3D=20
end_data MSComm1.PortOpen =3D=20
False Text1.Text =3D =
"=B7=A2=CB=CD=B3=C9=B9=A6!" + Chr(13)=20
& Chr(10) + "=B7=A2=CB=CD=D6=C1" + Text3.Text + =
"=C6=C1=CC=E5," + "=D0=C5=CF=A2=B1=E0=BA=C5:" + Text4.Text +=20
Chr(13) & Chr(10) + Chr(13) & Chr(10) +=20
Text1.Text GoTo=20
comendERRORCOM: Text1.Text =
=3D=20
"ERROR!=C7=EB=D6=D8=D0=C2=D1=A1=D4=F1COM=BF=DA!" + Chr(13) & =
Chr(10) + Chr(13) & Chr(10) +=20
Text1.Textcomend: On Error =
GoTo=20
0End=20
=
Sub &n=
bsp; &nb=
sp; &nbs=
p; -----=B0=A2=B7=C9=
=20
align=3Dleft>=B6=D4=D3=DAPDF=CE=C4=BC=FE=A3=AC=BD=A8=D2=E9=C4=FA=D3=C3=A1=
=B0=D3=D2=BC=FC/=C4=BF=B1=EA=C1=ED=B4=E6=CE=AA=A1=B1=CF=C2=D4=D8=B5=BD=B1=
=BE=B5=D8=B2=E9=BF=B4=A1=A3=BB=B6=D3=AD=C4=FA=B5=BD target=3D_blank=20
=
href=3D"http://www.mcu51.com/bbs/find.asp">51=CF=BA=CC=B3=BB=B6=
=D3=AD=C4=FA=B6=D4=B1=BE=CE=C4=CC=E1=B3=F6=C4=FA=B5=C4=BC=FB=BD=E2=A1=A3 =
color=3D#ff0000>=C8=E7=B9=FB=B1=BE=CE=C4=C7=D6=B7=B8=C1=CB=C4=FA=B5=C4=C8=
=A8=D2=E6=A3=AC=C7=EB=BC=B0=CA=B1=CD=A8=D6=AA=B0=E6=D6=F7=C9=BE=B3=FD=A3=AC=
=D0=BB=D0=BB=A3=A1=20
------=_NextPart_000_0052_01C30D19.3F121900
Content-Type: text/css;
charset="gb2312"
Content-Transfer-Encoding: 7bit
Content-Location: =?gb2312?B?ZmlsZTovLy9EOi9NeURvY3VtZW50cy/B2cqxzsS8/rzQL015JTI1MjBXZWI=?=
=?gb2312?B?L9K7uPa88rWltcRWQrSuv9q3osvNs8zQ8qOo1LTC66Opo6EuZmlsZQ==?=
=?gb2312?B?cy9zdHlsZS5jc3M=?=
.small {
FONT-SIZE: 9pt
}
.smallh20 {
FONT-SIZE: 12px; LINE-HEIGHT: 20pt
}
.smallh15 {
FONT-SIZE: 12px; LINE-HEIGHT: 15pt
}
.medium {
FONT-SIZE: 14px
}
.mediumh15 {
FONT-SIZE: 14px; LINE-HEIGHT: 15pt
}
.mediumh20 {
FONT-SIZE: 14px; LINE-HEIGHT: 20pt
}
.big {
FONT-SIZE: 16px
}
A {
COLOR: #003399
}
A:link {
COLOR: #003399
}
A:active {
COLOR: #cc0000
}
A:visited {
COLOR: #666666
}
A:hover {
COLOR: #cc0000
}
TD {
FONT-SIZE: 12px
}
BODY {
MARGIN-TOP: 5pt
}
------=_NextPart_000_0052_01C30D19.3F121900--