主题 : mini2440 wince5.0 串口程序问题 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 32409
精华: 0
发帖: 21
金钱: 105 两
威望: 21 点
综合积分: 42 分
注册时间: 2010-11-15
最后登录: 2016-06-05
楼主  发表于: 2010-12-06 10:52

 mini2440 wince5.0 串口程序问题

在vb2005环境下,简单的串口初始化和接收,问题:在初始化和接收到数据时,总是返回一些信息,怎样设置才能使板子不发送这些信息?

程序如下:
Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        SerialPort1.PortName = "COM1"
        SerialPort1.BaudRate = 19200
        SerialPort1.DataBits = 8
        SerialPort1.StopBits = IO.Ports.StopBits.One
        SerialPort1.Parity = IO.Ports.Parity.None
        SerialPort1.ReceivedBytesThreshold = 100
        SerialPort1.Open()

    End Sub
    Private Sub SerialPort1_DataReceived(ByVal sender As System.Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived
        Dim CS(1000) As Byte
        Dim n As Int32
        n = SerialPort1.BytesToRead
        SerialPort1.Read(CS, 0, n)
    End Sub
End Class

返回如下:
初始化后:
AKY=00001005 PC=02a32840(ser2440.dll+0x00002840) RA=02a3282c(ser2440.dll+0x00002
82c) BVA=06000000 FSR=00000007
Data Abort: Thread=8f810784 Proc=8e026160 'device.exe'
AKY=00001005 PC=02a32840(ser2440.dll+0x00002840) RA=02a3282c(ser2440.dll+0x00002
82c) BVA=06000000 FSR=00000007
Data Abort: Thread=8f810784 Proc=8e026160 'device.exe'
AKY=00001005 PC=02a32840(ser2440.dll+0x00002840) RA=02a3282c(ser2440.dll+0x00002
82c) BVA=06000000 FSR=00000007
接收到数据时返回:
+SL_GetStatus 0x38250
+SL_GetStatus 0x38250
+SL_GetStatus 0x38250
+SL_GetStatus 0x38250
自由,自强,共享,共创。
级别: 论坛版主
UID: 12573
精华: 27
发帖: 8838
金钱: 46490 两
威望: 9298 点
综合积分: 18216 分
注册时间: 2010-01-09
最后登录: 2019-07-16
1楼  发表于: 2010-12-07 18:08
请试试最新的wince5
新手如何向我们反馈有效的信息,以便解决问题,见此贴:
http://www.arm9home.net/read.php?tid-14431.html

[注]: 此处签名链接仅为指引方向,而非解答问题本身.