;***************************************************************************************** include ;****************************************************************** ;Variables definition ;****************************************************************** COUNTER res 1 ;Counter used for counting key debounce time COUNTER1 res 1 ;Counter used for counting key debounce time TEMP res 1 ;Temparary variable TEMP1 res 1 ;------------------------------------------------------------------------ org 0x0008 ;******************************************************************* ;IO_PORT_Init clrf TRISA ; ;******************************************************************* MAIN_LOOP movlw 0x01 movwf PORTA call tempo call tempo call tempo movlw 0x02 movwf PORTA call tempo call tempo call tempo movlw 0x04 movwf PORTA call tempo call tempo call tempo goto MAIN_LOOP ;******************************************************************************* tempo setf COUNTER loop call ptmp call ptmp call ptmp call ptmp decfsz COUNTER bra loop return ptmp movlw 0xFF floop addlw 0xFF bnz floop return end