M
me_guitarist
Guest
Ciao ragazzi,
Ho compilato il codice, ma quando ho premuto il pulsante di chiamata non double_flash.
Qualcuno mi può punto là fuori?Grazie in anticipo!
list p = 12f629
# include <p12f629.inc>
errorlevel -302
;***** configurazione
__CONFIG _MCLRE_ON & _CP_OFF & _CPD_OFF & _BODEN_OFF & _WDT_OFF & _PWRTE_ON & _INTRC_OSC_NOCLKOUT
Variabile ;***** Definizioni
UDATA_SHR
sGPIO res 1
DC1 res 1
DC2 res 1
DC3 res 1
;************************************************* ************************************************** *******
RESET CODICE 0x0000
chiamata 0x03FF
banksel OSCCAL
movwf OSCCAL
;***** Principale del programma
movlw b'001000 '; configurare GP1 (solo) in un output
banksel TRISIO; GP3 è un output
movwf TRISIO
banksel GPIO
clrf GPIO;***** Main loop
principale
chiamata single_flash
btfss GPIO, GP3
chiamata double_flash
goto principale
;***** Subroutine ******************************************* *************************************************
single_flash
movlw b'110111 '
movwf GPIO
movlw ,20
chiamata delay10
clrf GPIO
movlw ,80
chiamata delay10
goto single_flash
double_flash
_flash1
movlw b'110111 '
movwf GPIO
movlw ,10
chiamata delay10
clrf GPIO
movlw ,40
chiamata delay10
_flash2
movlw b'110111 '
movwf GPIO
movlw ,10
chiamata delay10
clrf GPIO
movlw ,40
chiamata delay10
_off
movlw b'001000 '
movwf GPIO
movlw ,25
chiamata delay10
clrf GPIO
movlw ,25
chiamata delay10
goto double_flash;***** Delay10
delay10
movwf DC3
dly2 movlw ,13
movwf DC2
clrf DC1
dly1 decfsz DC1, f
goto dly1
decfsz DC2, f
goto dly1
decfsz DC3, f
goto dly2
ritornoFINEAggiunto dopo 7 minuti:NO uscita se ho premuto il pulsante.
Ho compilato il codice, ma quando ho premuto il pulsante di chiamata non double_flash.
Qualcuno mi può punto là fuori?Grazie in anticipo!
list p = 12f629
# include <p12f629.inc>
errorlevel -302
;***** configurazione
__CONFIG _MCLRE_ON & _CP_OFF & _CPD_OFF & _BODEN_OFF & _WDT_OFF & _PWRTE_ON & _INTRC_OSC_NOCLKOUT
Variabile ;***** Definizioni
UDATA_SHR
sGPIO res 1
DC1 res 1
DC2 res 1
DC3 res 1
;************************************************* ************************************************** *******
RESET CODICE 0x0000
chiamata 0x03FF
banksel OSCCAL
movwf OSCCAL
;***** Principale del programma
movlw b'001000 '; configurare GP1 (solo) in un output
banksel TRISIO; GP3 è un output
movwf TRISIO
banksel GPIO
clrf GPIO;***** Main loop
principale
chiamata single_flash
btfss GPIO, GP3
chiamata double_flash
goto principale
;***** Subroutine ******************************************* *************************************************
single_flash
movlw b'110111 '
movwf GPIO
movlw ,20
chiamata delay10
clrf GPIO
movlw ,80
chiamata delay10
goto single_flash
double_flash
_flash1
movlw b'110111 '
movwf GPIO
movlw ,10
chiamata delay10
clrf GPIO
movlw ,40
chiamata delay10
_flash2
movlw b'110111 '
movwf GPIO
movlw ,10
chiamata delay10
clrf GPIO
movlw ,40
chiamata delay10
_off
movlw b'001000 '
movwf GPIO
movlw ,25
chiamata delay10
clrf GPIO
movlw ,25
chiamata delay10
goto double_flash;***** Delay10
delay10
movwf DC3
dly2 movlw ,13
movwf DC2
clrf DC1
dly1 decfsz DC1, f
goto dly1
decfsz DC2, f
goto dly1
decfsz DC3, f
goto dly2
ritornoFINEAggiunto dopo 7 minuti:NO uscita se ho premuto il pulsante.