Serial Communication


Closed Thread
Results 1 to 2 of 2
  1. #1
    Keith's Avatar
    Keith Guest

    Default Serial Communication

    Having a problem with the serial comm. using a Pic16F88/20mhz/baud rate 34800. When I get in a loop and do the following about 30 times, I sometimes chop off the first 2 or 3 bytes and the last 2 or 3 byte. Question am I pausing enough between sends? Is there a way to check to see if a send has completed, before I send the next? Lowering the baud rate doesn't seem to help.

    Xva var word
    Yval var Word

    for i = 0 to 29
    HSEROUT ["~","D",#Xval,"~",#Yval,":",#i]
    pauseus 50
    next

    Any help would be great,
    Keith

  2. #2


    Did you find this post helpful? Yes | No

    Default

    The hserout command won't send a character unless the buffer is empty. It does move on to the next command while the last character is being sent.

    I've seen it lose the last character if you put the PIC to sleep or hit an END command before the character is completely gone.

Similar Threads

  1. Wireless serial communication question
    By Ahmadabuomar in forum Serial
    Replies: 3
    Last Post: - 21st December 2009, 03:49
  2. PIC to PIC "wired" serial one-way communication - SERIN2/SEROUT2
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 14th April 2008, 20:02
  3. Bootloader,MCSP and Serial communication
    By surfer0815 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd March 2006, 10:52
  4. Serial Communication using 12F629
    By charudatt in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 14th March 2005, 04:24
  5. Replies: 8
    Last Post: - 11th November 2004, 20:08

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