using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO.Ports;
namespace 串口调试助手
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
System.Windows.Forms.Control.CheckForIllegalCrossThreadCalls = false;
}
private void Form1_Load(object sender, EventArgs e)
{
for (int i = 0; i < 10; i++)
{
comboBox1.Items.Add("COM" + i.ToString());
}
comboBox1.Text = "COM1";//串口号默认值
comboBox2.Text = "4800";//波特率默认值
/***************非常重要*****************/
serialPort1.DataReceived &
C#串口调试助手代码
最新推荐文章于 2024-07-11 23:40:40 发布
本文介绍如何使用C#编程语言创建一个串口调试助手,涵盖了串口通信的基础设置,包括打开、关闭串口,发送和接收数据,以及数据解析等功能。通过此工具,开发者可以方便地进行串口设备的调试工作。
摘要由CSDN通过智能技术生成