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..

    Thanks for the replies.....

    Will try then out later.... have been working away!

    BR
    Andy

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

    Default Re: Hserin / out Woes..

    hi All...

    Have played with my code a little more....

    Have come to conclusion that the serial port is seeing 0xFf before I type any password... I found by putting a 232 sniffer on the ports !!!


    Ie the password is 9 chars but the first on occasionally is 0xFF ????

    any Ideas ? anyone ?

    Tomorrow O will go back to Serin / Serout see how that gets on !

    Thank you for help !

  3. #3
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166

    Default Re: Hserin / out Woes..

    For reliable communications, I always clear the receive buffer before transmitting a request to any perif. That way if you have some noise on the comm lines, it won't be interpreted as bad data.
    Dave Purola,
    N8NTA
    EN82fn

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

    Default Re: Hserin / out Woes..

    Quote Originally Posted by Dave View Post
    For reliable communications, I always clear the receive buffer before transmitting a request to any perif. That way if you have some noise on the comm lines, it won't be interpreted as bad data.
    Hi Dave

    Sounds good.... But how do I do that ?

    I see no pointers in the manual V2.60

    THank you for help

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

    Default Re: Hserin / out Woes..

    MY Defines are now :-

    DEFINE HSER_RCSTA 90H 'Set receive status and control
    DEFINE HSER_TXSTA 24H 'Set transmit status and control
    DEFINE HSER_BAUD 9615 'Baud Rate
    DEFINE HSER_CLROERR 1 ' Clear Buffer

  6. #6
    Join Date
    Jan 2013
    Location
    Texas USA
    Posts
    229

    Default Re: Hserin / out Woes..

    Andy,

    You can always just use a "HSERIN" bogus statement to throw away anything in the buffer before you execute your regular "HSERIN" statements.
    Since the EUSART has a 2 byte buffer you may need to do two of the bogus "HSERIN" statements with timeouts just to make sure you don't get stuck waiting.
    Regards,
    TABSoft

  7. #7
    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

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

    Default Re: Hserin / out Woes..

    Quote Originally Posted by Tabsoft View Post
    Andy,

    You can always just use a "HSERIN" bogus statement to throw away anything in the buffer before you execute your regular "HSERIN" statements.
    Since the EUSART has a 2 byte buffer you may need to do two of the bogus "HSERIN" statements with timeouts just to make sure you don't get stuck waiting.
    Hi

    I just put your suggestion in place and it seems to be working for me .... I just used 50 as a time out figure... thank you!

    I will try the other suggestions also thank you as always Henrik

    For now I need sleep !!!!!

    Br
    Andy

Similar Threads

  1. SPI woes
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 27th September 2013, 14:04
  2. Capture woes...
    By ardhuru in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 22nd May 2011, 08:36
  3. LCDOut Woes
    By LetTheSmokeOut in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 11th June 2008, 01:45
  4. ICD Woes
    By spad13m in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 14th February 2008, 05:56
  5. Still HSEROUT woes
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 34
    Last Post: - 11th July 2006, 21: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