This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Speed_pr.asm (9-15-2000 Release Rev 1.0)

.include    x24x_app.h.....

CALC_SPEED:	LACC	#07FFFh 	  	;Load Numerator Hi
		RPT	#15
		SUBC	event_period
		SACL	speed_hi
		XOR	speed_hi
		OR	#0FFFFh 	  	;Load Numerator Lo
;Phase 2
		RPT	#15
		SUBC	event_period
		SACL	speed_lo		

	
		LACC	speed_lo
		ADDH	speed_hi        	;Result in ACC is in Q31(32 bit) format  
  
		rpt	shift			;The following Q numbers are for shift=10.
						;For other values of shift these will
						;change accordingly.
		SFL				;Q42????????????????????
		SACH	speed_prd_max		;Q26

ACC - 32 bits... how can Q42, and then Q26????