Hserin / out Woes..


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Join Date
    May 2012
    Location
    Merseyside, UK
    Posts
    237

    Default Re: Hserin / out Woes..

    Hi

    Thanks for reply ...

    Will try tomorrow and post what happens ...

    Thank you for advice

    Andy

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624

    Default Re: Hserin / out Woes..

    Hi,
    You can always just use a "HSERIN" bogus statement to throw away anything in the buffer before you execute your regular "HSERIN" statements.
    Just keep in mind that if there is no garbage data in the RX buffer then the bogus statement will throw away the real data when it comes so if you go down that route make sure you specify a very low timeout value for the initial bogus statement.

    Here's another way to flush the buffer:
    Code:
    RCIF VAR PIR1.3    ' Alias to the RX Interrupt flag for USART 1 on an 18F25k22
    Dummy VAR BYTE
    WHILE RCIF
       Dummy = RCREG1
    WEND
    /Henrik.

Similar Threads

  1. SPI woes
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 27th September 2013, 15:04
  2. Capture woes...
    By ardhuru in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 22nd May 2011, 09:36
  3. LCDOut Woes
    By LetTheSmokeOut in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 11th June 2008, 02:45
  4. ICD Woes
    By spad13m in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 14th February 2008, 06:56
  5. Still HSEROUT woes
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 34
    Last Post: - 11th July 2006, 22:13

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