i have implement an usart routine with PIC16F877 to display a simple menu message. it's seems to work well but i'm not able to stabilyse my menu. each time i power on my circuit menu is displayed and this process continue all 2 seconde (about). i want that menu come just one time and wait for another task. if someone can help me how to do that i will appreciate. a part of my routine is : list p=16f877 ; list directive to define processor #include ; processor specific variable definitions __CONFIG _CP_OFF & _WDT_ON & _BODEN_ON & _PWRTE_ON & _XT_OSC & _WRT_ENABLE_ON & _LVP_ON & _DEBUG_OFF & _CPD_OFF temp0 equ 20h check equ 21h CR equ 0x0D LF equ 0x0A ORG 00h ; Reset Vector main: goto init_uart ORG 10h ; Begining of Program space ;--------------------------------------------------------------------------- -- ; Main Program ;--------------------------------------------------------------------------- -- init_uart: bsf STATUS,RP0 ; select bank 1 bcf STATUS,RP1 movlw 19h ;9600 baud @4MHz movwf SPBRG movlw b'00100100' ;transmit enable, Async, High baud rate movwf TXSTA ; bsf PIE1,TXIE bsf PIE1,RCIE bcf STATUS,RP0 ; selact bank 0 bcf STATUS,RP1 movlw b'10010000' ;Serial port Enable, continous reception movwf RCSTA . . . . . Start: clrf temp0 ;initialize table index main_loop: movf temp0,w ; update table index call menu ; get menu table entry movwf check movf check,w ;load acc with table char bz continue1 call put_char ;display character incf temp0,f ;inc. index goto main_loop ;repeat until done continue1: goto continue1 . . . . . . put_char: ; btfss PIR1,TXIF ;check TX Buff flag bsf STATUS,RP0 ; select bank 1 bcf STATUS,RP1 btfss TXSTA,TRMT goto put_char ;If buff full wait bcf STATUS,RP0 ; select bank 0 bcf STATUS,RP1 movwf TXREG ;if buff empty output next char return . . . . . . . echo_char: bcf STATUS,RP0 ; select bank 0 bcf STATUS,RP1 btfss PIR1,RCIF goto echo_char ;If buff full wait movf RCREG,w call put_char ;if buff empty output next char return . . . . menu: addwf PCL,f dt "MENU:",CR,LF dt "READ TEMPERATURE...... [1] ",CR,LF dt "SET U/C ATTENUATION....[2] ",CR,LF dt "SET D/C ATTENUATION....[3] ",CR,LF,0 . . . . end