Blinking LED with a PIC16F877 - Assembly Code
<p>This is my first attempt at programming in assembly and I can't figure out what is the wrong with this below code because it doesn't work properly.</p>

<pre><code>include "P16F877.INC"

STATUS  equ 03h
TRISB   equ 86h
PORTB   equ 06h
COUNT1  equ 20h
COUNT2  equ 21h


        bsf     STATUS,5
        bcf     TRISB,0
        bcf     STATUS,5

Start   bsf     PORTB,0

Loop1   decfsz  COUNT1,1
        goto    Loop1
        decfsz  COUNT1,1
        goto    Loop1

        bcf     PORTB,0

Loop2   decfsz  COUNT2,1
        goto    Loop2
        decfsz  COUNT2,1
        goto    Loop2

        goto    Start


end
</code></pre>