list p=16f54 pic54 equ 1ffh tmr0b equ d'177' tmr0 equ 01 pc equ 02 status equ 03 fsr equ 04 ra equ 05 rb equ 06 ;-----bit--------------------- z equ 2 c equ 0 w equ 0 f equ 1 ;----------------------------- org 000h main movlw 00h tris ra movlw 0fh movwf ra movlw d'00000100' movwf option movlw tmr0b movwf tmr0 start loop movf tmr0,w btfss status,z goto loop movlw 0fh xorwf ra movlw tmr0b movwf tmr0 goto start ;------------------------------- org 0x1ff goto main end