- 
	
	
	
		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
 
 
- 
	
	
	
		Re: Hersin timeout 
		I believe the maximum variable size is 65535. 
 
- 
	
	
	
		Re: Hersin timeout 
		Hi Dave
 
 I knew that :-) Honest !
 
 Thank you.
 
 
- 
	
	
	
		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