CCS PCH C Compiler, Version 4.106, 47914 27-12-10 13:42
Filename: C:\Users\kakl\Documents\MLAB\Modules\PIC\PIC18F8xTQ8001A\SW\PIC18F8310\blik.lst
ROM used: 188 bytes (2%)
Largest free fragment is 8004
RAM used: 5 (1%) at main() level
6 (1%) worst case
Stack: 1 locations
*
0000: GOTO 002C
.................... #include "C:\Users\kakl\Documents\MLAB\Modules\PIC\PIC18F8xTQ8001A\SW\PIC18F8310\blik.h"
.................... #include <18F8310.h>
.................... //////// Standard Header file for the PIC18F8310 device ////////////////
.................... #device PIC18F8310
.................... #list
....................
.................... #device adc=8
....................
.................... #FUSES NOWDT //No Watch Dog Timer
.................... #FUSES WDT128 //Watch Dog Timer uses 1:128 Postscale
.................... #FUSES INTRC_IO //Internal RC Osc, no CLKOUT
.................... #FUSES NOBROWNOUT //No brownout reset
.................... #FUSES BORV21 //Brownout reset at 2.1V
.................... #FUSES NOPUT //No Power Up Timer
.................... #FUSES BW16 //16-bit external bus mode
.................... #FUSES STVREN //Stack full/underflow will cause reset
.................... #FUSES NODEBUG //No Debug mode for ICD
.................... #FUSES IESO //Internal External Switch Over mode enabled
.................... #FUSES NOFCMEN //Fail-safe clock monitor disabled
.................... #FUSES NOXINST //Extended set extension and Indexed Addressing mode disabled (Legacy mode)
.................... #FUSES NOWAIT //Wait selections unavailable for Table Reads or Table Writes
.................... #FUSES NOPROTECT //Code not protected from reading
.................... #FUSES NOEBTR //Memory not protected from table reads
.................... #FUSES LPT1OSC //Timer1 configured for low-power operation
.................... #FUSES MCLR //Master Clear pin enabled
.................... #FUSES MCU //Microcontroller Mode
....................
.................... #use delay(clock=4000000)
0004: CLRF FEA
0006: MOVLW 06
0008: MOVWF FE9
000A: MOVF FEF,W
000C: BZ 002A
000E: MOVLW 01
0010: MOVWF 01
0012: CLRF 00
0014: DECFSZ 00,F
0016: BRA 0014
0018: DECFSZ 01,F
001A: BRA 0012
001C: MOVLW 4A
001E: MOVWF 00
0020: DECFSZ 00,F
0022: BRA 0020
0024: BRA 0026
0026: DECFSZ FEF,F
0028: BRA 000E
002A: RETLW 00
....................
....................
....................
....................
.................... #define LED PIN_J6 //CHANGE PIN_XX TO YOUR LED PIN NUMBER, EX: PIN_A5
....................
.................... void main()
.................... {
002C: CLRF FF8
002E: BCF FD0.7
0030: CLRF FEA
0032: CLRF FE9
0034: MOVLW 60
0036: MOVWF FD3
0038: MOVF FD3,W
003A: MOVF FC1,W
003C: ANDLW C0
003E: IORLW 0F
0040: MOVWF FC1
0042: MOVLW 07
0044: MOVWF FB4
....................
.................... setup_adc_ports(NO_ANALOGS|VSS_VDD);
0046: MOVF FC1,W
0048: ANDLW C0
004A: IORLW 0F
004C: MOVWF FC1
.................... setup_adc(ADC_CLOCK_DIV_2);
004E: BCF FC0.0
0050: BCF FC0.1
0052: BCF FC0.2
0054: BCF FC0.7
0056: BSF FC2.0
.................... setup_psp(PSP_DISABLED);
0058: BCF FB0.4
.................... setup_spi(SPI_SS_DISABLED);
005A: BCF FC6.5
005C: BCF F94.5
005E: BSF F94.4
0060: BCF F94.3
0062: MOVLW 01
0064: MOVWF FC6
0066: MOVLW 00
0068: MOVWF FC7
.................... setup_wdt(WDT_OFF);
006A: BCF FD1.0
.................... setup_timer_0(RTCC_INTERNAL);
006C: MOVLW 80
006E: MOVWF FD5
.................... setup_timer_1(T1_DISABLED);
0070: CLRF FCD
.................... setup_timer_2(T2_DISABLED,0,1);
0072: MOVLW 00
0074: MOVWF FCA
0076: MOVLW 00
0078: MOVWF FCB
.................... setup_ccp1(CCP_OFF);
007A: BSF F94.2
007C: CLRF FBD
.................... setup_comparator(NC_NC_NC_NC);
007E: MOVLW 07
0080: MOVWF FB4
0082: MOVF F97,W
0084: MOVWF F97
0086: MOVLW 03
0088: MOVWF 00
008A: DECFSZ 00,F
008C: BRA 008A
008E: MOVF FB4,W
0090: BCF FA1.6
.................... setup_vref(FALSE);
0092: CLRF FB5
....................
.................... //Example blinking LED program
.................... while(true){
.................... output_low(LED);
0094: BCF F9A.6
0096: BCF F91.6
.................... delay_ms(1000);
0098: MOVLW 04
009A: MOVWF 05
009C: MOVLW FA
009E: MOVWF 06
00A0: RCALL 0004
00A2: DECFSZ 05,F
00A4: BRA 009C
.................... output_high(LED);
00A6: BCF F9A.6
00A8: BSF F91.6
.................... delay_ms(1000);
00AA: MOVLW 04
00AC: MOVWF 05
00AE: MOVLW FA
00B0: MOVWF 06
00B2: RCALL 0004
00B4: DECFSZ 05,F
00B6: BRA 00AE
.................... }
00B8: BRA 0094
....................
.................... }
00BA: SLEEP
Configuration Fuses:
Word 1: 8800 INTRC_IO IESO NOFCMEN
Word 2: 0E19 NOBROWNOUT WDT128 NOWDT BORV21 NOPUT
Word 3: 85C3 BW16 CCP2C1 NOWAIT LPT1OSC MCLR MCU
Word 4: 0081 STVREN NODEBUG NOXINST NOXINST
Word 5: 0001 NOPROTECT
Word 6: 0000
Word 7: 0001 NOEBTR