SERIN2 Receiving Wrong Data


+ Reply to Thread
Results 1 to 26 of 26

Hybrid View

  1. #1
    Join Date
    Aug 2011
    Posts
    414


    Did you find this post helpful? Yes | No

    Default Re: SERIN2 Receiving Wrong Data

    From an old DT post (https://www.picbasic.co.uk/forum/sho...roblem?p=90526)

    Anytime you are using interrupts (other than ON INTERRUPT), it interrupts things.
    USB_ASM_Service uses USB interrupts that happen quite frequently.

    Software timed routines like SEROUT2, PAUSE, PULSIN/OUT etc. Will lose time that they don't know about.

    When using interrupts, Hardware devices should be use instead of software commands.
    Instead of SEROUT2, use HSEROUT with the USART.

    PAUSE ... use a timer.
    PULSIN ... use a CCP module.
    COUNT ... use a Timer

    There are still many PBP commands you can use without problems.
    But, if if they require specific timing thru software, that timing will be disturbed.

  2. #2
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    654


    Did you find this post helpful? Yes | No

    Default Re: SERIN2 Receiving Wrong Data

    Quote Originally Posted by tumbleweed View Post
    Yes, that explains everything. Unfortunately, I can't use the HSERIN/HSEROUT ports available in the 18F4550 because they are already taken doing the hardware communication. Increasing the baud rate worked.
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,821


    Did you find this post helpful? Yes | No

    Default Re: SERIN2 Receiving Wrong Data

    Quote Originally Posted by rsocor01 View Post
    Increasing the baud rate worked.
    You mean decreasing ovbiously. But problem is not solved and at random time it is possible that will happen again. Maybe more seldom but it will.

    Ioannis

  4. #4
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    654


    Did you find this post helpful? Yes | No

    Default Re: SERIN2 Receiving Wrong Data

    Quote Originally Posted by Ioannis View Post
    You mean decreasing ovbiously. But problem is not solved and at random time it is possible that will happen again. Maybe more seldom but it will.

    Ioannis
    So far it hasn't fail yet with a 9600 baud rate, but I can live with a very low failure rate.
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

Similar Threads

  1. Replies: 6
    Last Post: - 19th August 2013, 11:22
  2. how to display data receiving from xbee to LCD
    By NURULHAIZA in forum mel PIC BASIC
    Replies: 2
    Last Post: - 19th November 2010, 21:24
  3. Sending/receiving data using Linx modules
    By Goat 403 in forum Serial
    Replies: 3
    Last Post: - 21st May 2009, 13:57
  4. Receiving and Transmitting Serial data at the same time
    By BobP in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 12th April 2007, 22:00
  5. Receiving data from more than one serial Port
    By PICtron in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th March 2005, 10:20

Members who have read this thread : 17

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