> How can i program the PIC16F84 to delay for 1 sec before make a RA > output equal to 1? > With best regards > gkranis@usa.net George, there are two ways to do timedelays - using RTCC or program delay. 1) You mau set RTCC and it's pre-scaller to make 1 sec timer period. and then explore RTCC value or use RTCC interrupt. With 1st method your program will be like that: bsf PORTA,0 ; set RA0=1 call RTCC_START ; start timer call WAIT_RTCC ; wait for the end of the timer period bcf PORTA,0 ; set RA0=0 ; With 2nd - call SET_RTCC_Interrupt_parametr bsf PORTA,0 ; set RA0=1 bsf STATUS,GIE ; enable interrupt // suppose that RTCC interrupt was enabled before ....... do something ...... Interrupt subroutine: bcf PORTA,0 ; set RA0=0 clear interrupt flag end exit. 2) Programming delay bsf PORTA,0 ; set RA0=1 call WAIT_1S ; time delay bcf PORTA,0 ; set RA0=0 ....... WAIT_1S movlw C1 ; 1st constant movwf loop1 WAIT_1S_ movlw C2 ; 2nd constant movwf loop2 decfsz loop2,f goto $-1 decfsz loop1,f goto WAIT_1S_ return Your constants (C1 & C2) depends of PIC clock frequency. Alex Torres, Kharkov, Ukraine (exUSSR) altor@chat.ru 2:461/28@FidoNet http://www.geocities.com/SiliconValley/Lab/6311