Aquí os dejo lo que tengo hecho del programa, ahora mismo puedo controlar dos servos a la vez el ángulo que yo quiera y el tiempo que quiera pero necesito poder controlar un servo y luego el otro. Solo me falta esto para dar vida a mi primer robot, una ayudita.
;************************************* Panchito.asm *************************************
;
;
;
; ZONA DE DATOS **********************************************************************
LIST P=16F84A
INCLUDE <P16F84A.INC>
__CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _XT_OSC
CBLOCK 0x0C
Contador
FactorAlto
ENDC
TMR0_CARGA EQU -d'90'
#DEFINE Salida PORTB,0
#DEFINE Salida1 PORTB,1
; ZONA DE CÓDIGOS ********************************************************************
ORG 0
goto Inicio
ORG .4
goto Timer0_Interrupcion
Inicio
bsf STATUS,RP0
bcf Salida
bcf Salida1
movlw b'00001000'
movwf OPTION_REG
bcf STATUS,RP0
movlw b'10100000'
movwf INTCON
clrf Contador
Principal
movlw d'3'
movwf FactorAlto
call Retardo_1s
movlw d'6'
movwf FactorAlto
call Retardo_1s
movlw d'9'
movwf FactorAlto
call Retardo_1s
movlw d'12'
movwf FactorAlto
call Retardo_1s
movlw d'15'
movwf FactorAlto
call Retardo_1s
goto Principal
; Subrutina "Timer0_Interrupcion" -------------------------------------------------------
;
;
CBLOCK
Guarda_W
Guarda_STATUS
Timer0_ContadorA
ENDC
Timer0_Interrupcion
movwf Guarda_W
swapf STATUS,W
movwf Guarda_STATUS
bcf STATUS,RP0
movlw TMR0_CARGA
movwf TMR0
decfsz Timer0_ContadorA,F
goto Fin_Timer0_Interrupcion
btfsc Salida
goto EstabaAlto
EstabaBajo
bsf Salida
bsf Salida1
movf FactorAlto,W
movwf Timer0_ContadorA
goto Fin_Timer0_Interrupcion
EstabaAlto
bcf Salida
bcf Salida1
movf FactorAlto,W
sublw .256
movwf Timer0_ContadorA
Fin_Timer0_Interrupcion
swapf Guarda_STATUS,W
movwf STATUS
swapf Guarda_W,F
swapf Guarda_W,W
bcf INTCON,RBIF
bcf INTCON,T0IF
retfie
INCLUDE <RETARDOS.INC>
END