Weird problem with Debugin


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Dec 2004
    Location
    USA
    Posts
    36


    Did you find this post helpful? Yes | No

    Default Re: Weird problem with Debugin

    You beat me to it Henrik.

    www.saleae.com

  2. #2
    Join Date
    Jan 2010
    Posts
    51


    Did you find this post helpful? Yes | No

    Default Re: Weird problem with Debugin

    Thanks. That makes some sense now. I tried experimenting more with it and realized that ASCII is not the format (blame the Chinese).
    Has anyone used this: http://www.serialmon.com as a serial port sniffer?

    Also Debug and Debugin both work as mode 0. At that time I was only checking Debugin so left debug as mode 1 (please ignore it in the code above)

  3. #3
    Join Date
    Jan 2010
    Posts
    51


    Did you find this post helpful? Yes | No

    Default Update

    The character is coming in some UTF8 format! Does someone knows how to handle this type?

  4. #4
    Join Date
    Jan 2010
    Posts
    51


    Did you find this post helpful? Yes | No

    Default Re: Update

    Ok, here is the update. The serialMon pic is attached. The first HEX code is when I receive a '4' and the second is when I receive 'a'.
    I tried modifying the code and a few versions of it actually, but nothing worked. How do I capture the value coming as in the pic attached.

    My attempts were:
    1) b0...b4 var byte
    Debugin [B0,skip 1,B1,skip 1,b2,skip 1,b3,skip 1,b4]
    DIDN'T worked

    2) B0,B1 Var word : B2 var byte
    Debugin [B0,B1,B2]
    DIDN'T worked

    Any further pointers pleaseName:  Capture.PNG
Views: 421
Size:  8.7 KB?

  5. #5
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,623


    Did you find this post helpful? Yes | No

    Default Re: Weird problem with Debugin

    Hi,
    34 is the ASCII code (in HEX) for '4' and 61 is the ASCII code (in HEX) for 'a' so the actual data you want to capture is the fifth byte in the received packet. How about
    Code:
    DEBUGIN[WAIT (1), B0]    ' Wait for the 01 part of the string then grab the next byte
    or
    Code:
    DEBUGIN[SKIP 4, B0]    ' Skip the first four bytes, grab the fifth.
    /Henrik.

    EDIT: Or, if it's actually the 01 part you want to capture (and it's NOT the ASCII code for the digit 1 by the way) then perhaps DEBUGIN[SKIP 3, B0]
    Last edited by HenrikOlsson; - 4th June 2013 at 07:03.

  6. #6
    Join Date
    Jan 2010
    Posts
    51


    Did you find this post helpful? Yes | No

    Default Job done!

    Quote Originally Posted by HenrikOlsson View Post
    Hi,
    34 is the ASCII code (in HEX) for '4' and 61 is the ASCII code (in HEX) for 'a' so the actual data you want to capture is the fifth byte in the received packet. How about
    Code:
    DEBUGIN[WAIT (1), B0]    ' Wait for the 01 part of the string then grab the next byte
    or
    Code:
    DEBUGIN[SKIP 4, B0]    ' Skip the first four bytes, grab the fifth.
    /Henrik.

    EDIT: Or, if it's actually the 01 part you want to capture (and it's NOT the ASCII code for the digit 1 by the way) then perhaps DEBUGIN[SKIP 3, B0]
    JOB DONE! Cheers for the help

Similar Threads

  1. Weird Random problem
    By Del Tapparo in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 15th August 2012, 23:06
  2. Weird Problem
    By isaac in forum General
    Replies: 9
    Last Post: - 22nd September 2008, 20:30
  3. DebugIn problem
    By Mutiaz in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 2nd January 2006, 16:51
  4. Weird Oscillator Problem
    By eoasap in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 17th December 2005, 15:21
  5. Debugin problem
    By moby in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 11th September 2004, 16:12

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

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