STM32实现USB串口源码(可与电脑通信),移植可用,亲测有效
2023-10-07 11:20:05 638KB stm32 软件/插件 网络 网络
1
stm32f10x串口驱动源码(环形队列+内存动态分配+DMA)串口发送模板(第三版)
2023-04-12 21:28:36 1.08MB stm32f 串口 源码
1
麻雀虽小该有的也算有了,希望能对你有用!谢谢!
2023-03-22 11:11:11 75KB C# 串口 源码 serialport
1
本demo是基于Android studio开发的蓝牙串口demo,包含蓝牙配对、列表搜索结果、简单的聊天;可用于和蓝牙模块HC-05通信
2023-02-15 14:20:32 10.26MB 蓝牙串口源码 Android Studio版本 HC-05
1
stm32l4平台,使用串口中断模式,实现串口数据的收发
2022-10-22 13:18:51 10.32MB stm32l4xx STM32L4 stm32l4串口
1
Android 连接多个通用USB转串口实例, 实现多串口的发送与接收
2022-08-15 09:06:03 3.13MB Android开发 通用USB 源码 案例
1
使用Java语言开发的一个串口调试助手,在PL2303和台式机串口上测试都没有问题,时自己练习Java时写的,经过多次修改,可能还存在一些小问题。现在共享给大家,以供想要学习Java串口应用开发的朋友参考。若发现代码有错误之处,还望能够提出改正,大家共同学习,共同进步。
2022-07-22 09:57:38 319KB Java 串口 源码
1
C# 串口源码
2022-05-28 22:59:31 4.01MB C#串口源码
1
欢迎反馈建议,其中包含了串口类、XML类、数据库类等功能。程序中使用线程处理数据接收用以解决SerialPort类死锁问题。
2022-05-24 00:12:42 243KB c# 串口 源码
1
namespace 串口实例 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void btnSend_Click(object sender, EventArgs e) { //手动发送 SendMsg(); } private void SendMsg() { this.serialPort1.Write(this.txtSend.Text); } #region 控制输入数字 private void ComboBox_TextUpdate(object sender, EventArgs e) { ComboBox cbo = sender as ComboBox; int n; if (!int.TryParse(cbo.Text, out n)) { cbo.Text = cbo.Text.Substring(0, cbo.Text.Length - 1); } else { if (n <= 0) { cbo.Text = cbo.Text.Substring(0, cbo.Text.Length - 1); } } } private void txtTime_TextChanged(object sender, EventArgs e) { TextBox text = sender as TextBox; int n; if (!int.TryParse(text.Text, out n)) { text.Text = text.Text.Substring(0, text.Text.Length - 1); } else { if (n <= 0) { text.Text = text.Text.Substring(0, text.Text.Length - 1); } else { this.timer1.Interval = n; } } } #endregion /// /// 清空显示文本框 /// /// /// private void btnClear_Click(object sender, EventArgs e) { this.txtRecive.Clear(); } private void timer1_Tick(object sender, EventArgs e) { SendMsg(); } private void cbtSend_CheckedChanged(object sender, EventArgs e) { CheckBox check = sender as CheckBox; if (check.Checked) { this.timer1.Start(); } else { this.timer1.Stop(); } } /// /// 接收返回的数据 /// /// /// private void serialPort1_DataReceived(object sender, System.IO.Ports.SerialDataReceivedEventArgs e) { string a=""; if (this.cbkShow16.Checked) { //十六进制显示 a = this.serialPort1.ReadExisting(); } else { //字符串显示 byte[] by = new byte[this.serialPort1.BytesToRead]; this.serialPort1.Read(by, 0, this.serialPort1.BytesToRead); a = Encoding.ASCII.GetString(by); } this.txtRecive.AppendText(a); this.txtRecive.ScrollToCaret(); } private void Form1_Load(object sender, EventArgs e) { //加载 this.serialPort1.RtsEnable = true; button1_Click(this.btnOpen, null); } private void button1_Click(object sender, EventArgs e) { Button btn = sender as Button; if (btn.Text == "打开端口") { try { this.serialPort1.PortName = this.cboPortName.Text; this.serialPort1.BaudRate = Convert.ToInt32(this.cboRaudRate.Text); this.serialPort1.DataBits = Convert.ToInt32(this.cboDataBits.Text); this.serialPort1.ReceivedBytesThreshold = Convert.ToInt32(this.cboReceivedBytesThreshold.Text); this.serialPort1.Open(); btn.Text = "关闭端口"; } catch { MessageBox.Show("打开端口失败,请检查端口是否被占用."); } } else { this.serialPort1.Close(); btn.Text = "打开端口"; } } private void Form1_FormClosing(object sender, FormClosingEventArgs e) { try { this.serialPort1.Close(); } catch { } } } }
2022-05-17 15:17:21 52KB C# 串口 源码
1