All pastes #1005349 Raw Edit

Stuff

public text v1 · immutable
#1005349 ·published 2008-05-02 20:13 UTC
rendered paste body
List p=18f4550,f=inhx32
#include <p18f4550.inc>

    org 0

; create variables
delay1  res     2        
delay2  res     2               ;

start:  
        clrf    PORTD
        clrf	TRISD
        clrf    delay1
        clrf    delay2
.loop:
        btg     PORTD,RD1       ; toggle portd pin 1 (20)
.delay:
        decfsz  delay1,1        ; decrement delay1 by 1, and skipp till the next
                                ; instruction is delay1 is 0
        goto .delay
        decfsz  delay2,1
        goto .delay
        goto .loop
        end