Someone have an explanation?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: Someone have an explanation?

  1. #1
    Join Date
    Jan 2004
    Posts
    59

    Angry Someone have an explanation?

    I have an MSComm control on my dialog. It has the following settings.

    RTSThreshold=1
    InputLength=1
    115200,n,8,1
    Buffer=(Large enough, like 1024)


    Anyway, I have something sending HEX data to the port.
    Comm event fires, everything is good. The data being sent looks like
    10 02 02 00 00 01 05 89 8B 86 10 03

    I put a breakpoint in the loop retrieving the bytes, from the first 10 through the 05 is fine.......89 becomes 2030, 8B =2039, and 86 = 2020....

    Then the trailing chars come in normally. Why are those higher bytes coming through wrong???

  2. #2
    Join Date
    Aug 2002
    Location
    Cluj-Napoca,Romania
    Posts
    3,496
    Have you checked the parity?
    Har Har

  3. #3
    Join Date
    Jan 2004
    Posts
    59
    Parity is off,

    115200,n,8,1 <-- n=no parity
    sender is also using no parity

  4. #4
    Join Date
    Aug 2002
    Location
    Cluj-Napoca,Romania
    Posts
    3,496
    I had the problems you mention when the parity, data bit and stop bit where different. Have you tried receiving the data with some other application?
    Har Har

  5. #5
    Join Date
    Jan 2004
    Posts
    59
    Yes, data comes through normally everywhere except that MSComm control.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center