【正文】
Mid(Date$, 1, 4) amp。延時 NextEnd SubPrivate Sub Check1_Click()If = 1 Then x = 1Else x = 0 End IfEnd SubPrivate Sub cmdquit_Click()Open C:\ For Output As 2Print 2, Close 2EndEnd SubPrivate Sub Form_Load() 39。延時 NextEnd SubPrivate Sub Button_RECV_C_Click() = = + 9End SubPrivate Sub Button_SEND_C_Click() = End SubPrivate Sub Button_SEND_Click()Dim x As String If = Then 39。 = 2 For I = 1 To 2 39。發(fā)送數(shù)據(jù) T = 10 39。0—9ASCII碼表 TAB: DB 3fh,06h,5bh,4fh,66h 。取在b中的個位 movc a,a+dptr mov sbuf,a 。LCALL DISPLAY 。因此可只用兩位十進制數(shù)表示 mov dptr,ascii_tab 。0,1,2,3 DB 6dh,7dh,07h,7fh,6fh 。4,5,6,7 DB 058H,040H,00H 。分出十位在acc中,個位在b中 movc a,a+dptr 。啟動串口發(fā)送10位的數(shù)據(jù) jnb ti,$ 。LCALL BCDZH 。0,1,2,3 DB 6dh,7dh,07h,7fh,6fh 。 = 1 For I = 1 To 2 39。延時 NextEnd SubPrivate Sub button_now3_Click() = + 3 39。發(fā)送數(shù)據(jù)不能為空 x = MsgBox(發(fā)送數(shù)據(jù)不能為空, 16) Exit Sub End If If Not Then 39。端口設置 = 1 = 9600,n,8,1 = 0 = 1024 = 512 = True = 0 = 1 = 0 = 0 = = End SubPrivate Sub MSComm_OnComm() Select Case 39。 Mid(Date$, 6, 2) amp。錯誤處理 Case EventOverrun = = Exit Sub Case EventRxOver = = Exit Sub Case EventTxFull = = Exit Sub Case EvReceive Dim str As String b = Date$ a = Time$ 39。發(fā)送數(shù)據(jù) For I = 1 To 200 39。 = 2 For I = 1 To 2 39。發(fā)送數(shù)據(jù) T = 11 39。8,9,A,b,C,c,黑屏 END三、計算機實驗室溫控系統(tǒng)PC機應用程序代碼:(Visual Basic)