Hersin timeout


+ Reply to Thread
Results 1 to 4 of 4

Thread: Hersin timeout

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

    Default Hersin timeout

    Hi All

    Am using HERSIN with a timeout... My question is :-

    What is the longest timeout I can use.... As I want to use this to put the device to sleep if no input on RX pin after X mins.

    The manual only states milliseconds so 1000 = 1 second.

    Maybe just try it and see ?

    BR
    Andy

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

    Default Re: Hersin timeout

    I believe the maximum variable size is 65535.
    Dave Purola,
    N8NTA
    EN82fn

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

    Default Re: Hersin timeout

    Hi Dave

    I knew that :-) Honest !

    Thank you.

  4. #4
    Join Date
    Aug 2003
    Location
    Australia
    Posts
    984

    Default Re: Hersin timeout

    1 second is a nice even value,
    Code:
     
    
    timeoutperiod var word
    
    ...
    
    HSERIN [Item... timeoutjump,1000] ; 1 second timeout
    resumeprogram:
    straight after the code that validates the actual input data
    Code:
    timeoutperiod = 0; // reset sleep timeout
    anywhere in your main loop
    Code:
    if timeoutperiod > 1199 then ; 20 mins with no valid input
    goto sleeproutine
    endif
    way at the end of your program...
    Code:
    timeoutjump:
    timeoutperiod = timeoutperiod + 1;
    goto resumeprogram

Similar Threads

  1. Debugin timeout
    By Alexey in forum Serial
    Replies: 4
    Last Post: - 10th May 2012, 23:03
  2. Serin2 Timeout
    By tazntex in forum Serial
    Replies: 15
    Last Post: - 15th August 2008, 15:40
  3. Packets of bytes to HERSIN again
    By crhomberg in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 19th April 2007, 16:33
  4. Need help with timeout
    By Christopher4187 in forum General
    Replies: 1
    Last Post: - 10th June 2006, 15:38
  5. SERIN timeout
    By Roger Harrold in forum General
    Replies: 2
    Last Post: - 26th November 2003, 21:21

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts