Re: decoding quadrature encoders
		
		
				
				
		
			
				
					Excuse me Henrik, If you read the spec. sheet you can set the interrupt edge for the INT0 and INT1. It is not required to set it each time. Also the interrupt routine look like:
'*************************************************  ********************
INC_C:		'INTERRUPT SERVICE ROUTINE FOR EXTERNAL INTERRUPT-0
'*************************************************  ********************
	POSITION = POSITION + 1
@	INT_RETURN
	
'*************************************************  ********************
DEC_C:		'INTERRUPT SERVICE ROUTINE FOR EXTERNAL INTERRUPT-1
'*************************************************  ********************
	POSITION = POSITION - 1
@	INT_RETURN
	
That's all there is to it.
				
			 
			
		 
			
                        	
		         
			
			Dave Purola,
N8NTA
EN82fn
			
			
		 
	
Bookmarks