2001 Microchip Technology Inc.
DS51159B-page 69
Tutorial - PIC18CXXX
clrf PORTB ;Clear PortB
call DELAY ;Wait
goto LOOP ;Repeat
;***************************************
;* This routine is a software delay. *
;* Fosc = 1/Tosc; Tcycle = 4 x Tosc *
;* Delay = TEMP1xTEMP2xTEMP3xTcycle *
;***************************************
DELAY
movlw 0xFF
movwf TEMP1 ;TEMP1 = 255
movwf TEMP2 ;TEMP2 = 255
movlw 0x07
movwf TEMP3 ;TEMP3 = 7
DLOOP
decfsz TEMP1, F
goto DLOOP
decfsz TEMP2, F
goto DLOOP
decfsz TEMP3, F
goto DLOOP
return
END
Save this file by using File>Save. Then close the file using File>Close or
clicking on the right top corner of the window.
Summary of Contents for MPLAB ICE
Page 1: ...2001 Microchip Technology Inc DS51159C MPLAB ICE EMULATOR USER S GUIDE M...
Page 8: ...MPLAB ICE User s Guide DS51159B page viii 2001 Microchip Technology Inc...
Page 18: ...MPLAB ICE User s Guide DS51159B page 18 2001 Microchip Technology Inc NOTES...
Page 36: ...MPLAB ICE User s Guide DS51159B page 36 2001 Microchip Technology Inc NOTES...
Page 58: ...MPLAB ICE User s Guide DS51159B page 58 2001 Microchip Technology Inc NOTES...
Page 80: ...MPLAB ICE User s Guide DS51159B page 80 2001 Microchip Technology Inc NOTES...
Page 126: ...MPLAB ICE User s Guide DS51159B page 126 2001 Microchip Technology Inc NOTES...
Page 140: ...MPLAB ICE User s Guide DS51159B page 140 2001 Microchip Technology Inc NOTES...
Page 158: ...MPLAB ICE User s Guide DS51159B page 158 2001 Microchip Technology Inc NOTES...
Page 189: ...2001 Microchip Technology Inc DS51159B page 189 Index NOTES...
Page 190: ...MPLAB ICE User s Guide DS51159B page 190 2001 Microchip Technology Inc NOTES...
Page 191: ...2001 Microchip Technology Inc DS51159B page 191 Index NOTES...