6 Steuerungsphase V (SpeedNone)

Die letzte Phase der Winkelpositionierung besteht aus dem ,,Abstellen'' des Drehvorganges durch Zurücksetzen des Steuerungs-Sollwertes auf 0 und der Speicherung dieser Position im Permanentspeicher des Mikrocontrollers als ,,letzte Position''.

	; ....................................................................
	; PHASE V: no rotation phase begins
	  rcall stop_rotation             ; set speed to 0x00 and store angle
	 
	; ... from lib/rotation.lib
	; ==================================================================
	; rotation control stopping function
	; ---------------------------------
	; we ALWAYS use this function to stop rotation, because it
	; stores the "last value" in EEPROM
	; ---------------------------------
	stop_rotation:
	  push  temp1
	  push  temp2
	  clr   temp1                          ; stop rotation...
	  rcall PCF_SEND_VALUE                 ; send STOP to pcf
	  ldi   temp2, 5                       ; wait a rather long
	  rcall wait_loop                      ; time... (0.5secs)
	  rcall store_current_angle            ; store angle value in eeprom
	  STSB  rotation_mode, ModeSpeedNone   ; set rotation mode to 'none'
	  STSB  var_valdirection, ValueDirNone ; set rotation flag to 'none'
	  pop   temp2
	  pop   temp1
	  ret 
Der Modul-Code für den Auto-Positionier-Mechanismus befindet in mod/goto_pos.asm.

gerhard.reithofer@tech-edv.co.at