Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- list p=PIC18f8722
- #include p18f8722.inc
- CONFIG OSC = HS, WDT = OFF, LVP = OFF
- #define LED LATD
- #define LED_IO TRISD
- ; Begin
- code 0
- goto initialize
- ; Memory mapping
- udata
- counter res .3
- ; Start
- PRG code
- initialize
- clrf LED_IO
- clrf LED
- main incf LED
- call delay_200ms
- bra main
- delay_400us
- movlw .249
- movwf counter
- nop
- delay_400us_loop
- nop
- decfsz counter
- bra delay_400us_loop
- return
- delay_200ms
- movlw .2
- movwf counter + 1
- delay_200ms_loop1
- movlw .250
- movwf counter + 2
- delay_200ms_loop2
- call delay_400us
- decfsz counter + 2
- bra delay_200ms_loop2
- decfsz counter + 1
- bra delay_200ms_loop1
- return
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement