HSEROUT Problems


Closed Thread
Results 1 to 4 of 4
  1. #1
    SergioRM's Avatar
    SergioRM Guest

    Default HSEROUT Problems

    Hi People,

    I've been some problems with HSEROUT. I have a 16F628 receiving a string from PC via RS485 half-duplex (using HSERIN without problems).
    When a PIC receive the string, it has to send another string to PC like this:

    A00000000000000F,

    But always its missing the last 2 bytes (0F). If I remove 2 bytes from the string, the problem still occurs...

    May I have to clear some register associated with the USART before use HSEROUT or only when using HSERIN?

    I have read the datashet lots, melabs achive and I dont know what is happening....

    Any tip will be usefull...

    Thanks,

    Sérgio

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    To ensure data is flushed out of the buffers, I always terminate with two characters on the end of my data packet (eg CR,LF - $13,$10).

  3. #3
    SergioRM's Avatar
    SergioRM Guest


    Did you find this post helpful? Yes | No

    Default

    Thanks Melanie, I'll try it...

    Regards,

    Sérgio

  4. #4
    SergioRM's Avatar
    SergioRM Guest


    Did you find this post helpful? Yes | No

    Default

    Hy Melanie,

    Your sugestion works 100%!!!!!

    Thank you very much!

    Regards,

    Sérgio

Similar Threads

  1. I2C Slave with a PIC
    By ralfmayr in forum mel PIC BASIC Pro
    Replies: 129
    Last Post: - 21st August 2016, 17:44
  2. HSEROUT and Commas, What? Help Me Understand
    By altech6983 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 20th July 2009, 19:12
  3. Is HSEROUT corrupting bit 7 ?????
    By Robert Wells in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 23rd October 2008, 16:26
  4. HSERIN and HSEROUT problems
    By amindzo in forum Serial
    Replies: 1
    Last Post: - 6th September 2006, 21:11
  5. Problems with HSERIN HSEROUT
    By Pesticida in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 20th September 2005, 17:24

Members who have read this thread : 1

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