串口如何读取十六进制值 [英] how the serialport read the hex value
本文介绍了串口如何读取十六进制值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好..
我的程序基于通过打印机打印文本.我将字体大小作为十六进制值(我的打印机固件支持字体大小作为十六进制值)我想将十六进制值发送到串行端口,而串行端口get&设置十六进制值并读取该值.
hello all..
my program is based on print the text through printer.i took font size as hex value (my printer firmware support font size as hex value ) i want to send the hex value to serial port the serial port get & set the hex value and read the value.
str = TextBox1.Text
Dim w As String = "" 'declare w as string
w = Hex(27) + Hex(33) + Hex(12) 'convert decimal to hex
serialport1.write(str) 'write the text
thx
bhagavath
thx
bhagavath
推荐答案
看看这些链接可能对您有帮助
http://csharp.simpleserial.com/
http://bytes.com/topic/net/answers/685229-receiving-data-串行端口
Have a look at these link may these will help you
http://csharp.simpleserial.com/
http://bytes.com/topic/net/answers/685229-receiving-data-serial-port
这篇关于串口如何读取十六进制值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文