SERIN2 buffer issues...


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    969


    Did you find this post helpful? Yes | No

    Default

    The fact that you're polling the pin for serial data in itself is the cause for the behaviour mentioned. SerOut2 is a bit-banging routine as is Serin2. Since your motor controller is echoing back all data sent to it, with some processing delay of its own, I suspect, you are not reading back fast enough to catch the data stream with serin2. Another possibility is that the data has already overflowed and the OERR flag is cleared only when you invoke Serin2.

    I can suggest you try a dummy Serin2 after each Serout2 statement. I am not sure if this will help in any way. This would keep the OERR clear if it is the one causing the problems. Other than this, I think, the only way out is to have the hardware USART interrupt to tackle this kind of a situation.

  2. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Similar Threads

  1. PC to EUART on pic 16F688
    By docaberle in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 25th October 2008, 07:33
  2. EDE702 where?
    By karenhornby in forum General
    Replies: 18
    Last Post: - 16th June 2008, 23:04
  3. Need idea hove to..?
    By phoenix_1 in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 14th May 2008, 19:41
  4. Student Project
    By aggie in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 8th July 2006, 09:56
  5. USB Interface using PIC
    By Tissy in forum mel PIC BASIC Pro
    Replies: 21
    Last Post: - 22nd May 2006, 17:04

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