HSERIN and STR - character encoding


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Ok, now we're getting somewhere... Looks relatively normal so far.
    All other things equal, I'd say something 'upstream' of the XPORT module is messing with your data, but that's just me and I'm guessing.

    Get rid of the STR modifier in your SERIN statement and try just reading RAW data/numbers/characters/etc.
    What is HSEROUT going to? Right back to the XPORT module? Is the feedback from the XPORT/PIC how you are verifying that it's sending/receiving data correctly?

    And we still haven't seen your REAL code

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default

    And also no mention of the trasmitting device. If it is not sending the correct numbers in ASCII, we are playing Holmes here...

    Ioannis

  3. #3
    Join Date
    Jan 2007
    Posts
    39


    Did you find this post helpful? Yes | No

    Default Solved

    Hello, I have solved the problem. I have discoverred, that each 3rd character received doesn't correspond to the ASCII code. I have tried to change the speed of the communication and it is working. So the problem was, that some of the bits were not readed correctly. Now I am wondering why at 115200 bps it is working, because in the PIC manual is written, that there is 8% error rate at 4 Mhz and 115200 and at 19200 the error rate is only 0.6 %.

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by boban View Post
    Hello, I have solved the problem. I have discoverred, that each 3rd character received doesn't correspond to the ASCII code. I have tried to change the speed of the communication and it is working. So the problem was, that some of the bits were not readed correctly. Now I am wondering why at 115200 bps it is working, because in the PIC manual is written, that there is 8% error rate at 4 Mhz and 115200 and at 19200 the error rate is only 0.6 %.
    If that module you're using is a bit fast, say 5% fast, then that 8% might only be 3% combined, whereas with .6%, might actually be 3.4%.
    Could be a bunch of different reasons...

Similar Threads

  1. hserin and sms controller
    By xxxxxx in forum mel PIC BASIC Pro
    Replies: 25
    Last Post: - 10th February 2010, 16:49
  2. Instant Interrupts and HSERIN
    By Rob in forum mel PIC BASIC Pro
    Replies: 26
    Last Post: - 31st January 2009, 06:13
  3. TMR0 interrupt and HSERIN
    By boban in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 2nd September 2008, 12:48
  4. PIC HSERIN problem
    By shaiqbashir in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 20th July 2008, 12:08
  5. HSERIN seems to fail and I can't see WHY
    By Jumper in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 14th August 2006, 18:51

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