看板 Visual_Basic 關於我們 聯絡資訊
我現在有2個snesor ,等於就是有2筆資料,CD4067做為區隔,且用一條232傳資料進pc... 處理器89C51程式,以及16轉10進位都ok了,可是VB我遇到很大的問題,這2筆資料要怎樣接 收進來,且放置到2個不同的Label? 以下是我的程式 Dim buf1 as string Dim buf2 as string Private Sub MSComm1_OnComm() Select Case MSComm1.CommEvent ' Case comEvReceive buf1 = MSComm1.Input label1.caption = Left((hex_dec(buf1$) / 51), 4) '將16進位轉換成10進位, 並轉換成0-5V, buf2=MSComm1.Input label1.caption = Left((hex_dec(buf2$) / 51), 4) end Select End Sub -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.134.32.140