[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。
Public Class Form1
Private WithEvents BackgroundWorker1 As New System.ComponentModel.BackgroundWorker
Private SerialPort1 As New System.IO.Ports.SerialPort
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles MyBase.Load
If SerialPort1.IsOpen = False Then
SerialPort1.PortName = System.IO.Ports.SerialPort.GetPortNames()(0)
SerialPort1.BaudRate = 9600
SerialPort1.DataBits = 8
SerialPort1.Parity = System.IO.Ports.Parity.None
SerialPort1.StopBits = System.IO.Ports.StopBits.One
SerialPort1.Open()
End If
BackgroundWorker1.WorkerReportsProgress = True
BackgroundWorker1.RunWorkerAsync()
End Sub
Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object, _
ByVal e As System.ComponentModel.DoWorkEventArgs) _
Handles BackgroundWorker1.DoWork
Try
Static rxcnt As Integer = 0
Static rxbuf(1024) As Byte
While True
If SerialPort1.BytesToRead <> 0 Then
rxcnt = SerialPort1.Read(rxbuf, rxcnt, SerialPort1.BytesToRead)
BackgroundWorker1.ReportProgress(0, rxbuf)
End If
End While
Catch ex As Exception
End Try
End Sub
Private Sub BackgroundWorker1_ProgressChanged(ByVal sender As System.Object, _
ByVal e As System.ComponentModel.ProgressChangedEventArgs) _
Handles BackgroundWorker1.ProgressChanged
Dim rxbuf() As Byte = e.UserState
TextBox1.Text = rxbuf(0)
End Sub
End Class
4.6 I/O ファイルに関する注意事項
- 本製品では、以下の I/O ファイルは添付していません。- R8C/3xE グループ、R8C/3xF グループ、R8C/3xG グループ、R8C/3xH グループ、R8C/Mx グループ、R8C/LxC グループ用 I/O ファイル これらの I/O ファイルについては、ハードウェアマニュアル Rev.1.00 公開後に提供予定です。
- I/O ウィンドウの表示内容に誤りがある場合、I/O ファイルの修正によって解決する場合があります。
- I/O ファイルの作成・修正・カスタマイズは、お客様にて実施いただくことが可能です。 その方法は、High-performance Embedded Workshop ヘルプの「I/O ファイルフォーマット」を参照くだ さい。
04 | 2025/05 | 06 |
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |