Documentos de Académico
Documentos de Profesional
Documentos de Cultura
; This routine loads SVM data into an allocated registers (SVM registers)
movlw 00h
movwf 10h ;file 10h is the table pointer
movlw 13h
movwf 04h ; SVM registers starts from 13h to 1ah
getnext incf 10h,1 ;increment table pointer
movf 10h,0 ;move the content of 10h to the working reg
; subroutine for switching times(T0,T1, and T2) - use Delay Code Generator
DelT0_2 movlw 0ah ;Delay for 33us
movwf 0fh
del0_2 DECFSZ 0fh,1
GOTO del0_2
RETURN
movf 14h,0
movwf 06h
CALL DelT1
movf 15h,0
movwf 06h
CALL DelT2
movf 1ah,0
movwf 06h
CALL DelT0
movf 15h,0
movwf 06h
CALL DelT2
movf 14h,0
movwf 06h
CALL DelT1
movf 13h,0
movwf 06h
CALL DelT0_2
movf 16h,0
movwf 06h
CALL DelT1
movf 15h,0
movwf 06h
CALL DelT2
movf 1ah,0
movwf 06h
CALL DelT0
movf 15h,0
movwf 06h
CALL DelT2
movf 16h,0
movwf 06h
CALL DelT1
movf 13h,0
movwf 06h
CALL DelT0_2
movf 16h,0
movwf 06h
CALL DelT1
movf 17h,0
movwf 06h
CALL DelT2
movf 1ah,0
movwf 06h
CALL DelT0
movf 17h,0
movwf 06h
CALL DelT2
movf 16h,0
movwf 06h
CALL DelT1
movf 13h,0
movwf 06h
CALL DelT0_2
movf 18h,0
movwf 06h
CALL DelT1
movf 17h,0
movwf 06h
CALL DelT2
movf 1ah,0
movwf 06h
CALL DelT0
movf 17h,0
movwf 06h
CALL DelT2
movf 18h,0
movwf 06h
CALL DelT1
movf 13h,0
movwf 06h
CALL DelT0_2 ;
movf 18h,0
movwf 06h
CALL DelT1
movf 19h,0
movwf 06h
CALL DelT2
movf 1ah,0
movwf 06h
CALL DelT0
movf 19h,0
movwf 06h
CALL DelT2
movf 18h,0
movwf 06h
CALL DelT1
movf 13h,0
movwf 06h
CALL DelT0_2
movf 14h,0
movwf 06h
CALL DelT1
movf 19h,0
movwf 06h
CALL DelT2
movf 1ah,0
movwf 06h
CALL DelT0
movf 19h,0
movwf 06h
CALL DelT2
movf 14h,0
movwf 06h
CALL DelT1
movf 13h,0
movwf 06h
CALL DelT0_2
GOTO gen_svm
end