Rev Author Line No. Line
1754 kakl 1 CCS PCH C Compiler, Version 4.106, 47914 27-12-10 13:42
2  
3 Filename: C:\Users\kakl\Documents\MLAB\Modules\PIC\PIC18F8xTQ8001A\SW\PIC18F8310\blik.lst
4  
5 ROM used: 188 bytes (2%)
6 Largest free fragment is 8004
7 RAM used: 5 (1%) at main() level
8 6 (1%) worst case
9 Stack: 1 locations
10  
11 *
12 0000: GOTO 002C
13 .................... #include "C:\Users\kakl\Documents\MLAB\Modules\PIC\PIC18F8xTQ8001A\SW\PIC18F8310\blik.h"
14 .................... #include <18F8310.h>
15 .................... //////// Standard Header file for the PIC18F8310 device ////////////////
16 .................... #device PIC18F8310
17 .................... #list
18 ....................
19 .................... #device adc=8
20 ....................
21 .................... #FUSES NOWDT //No Watch Dog Timer
22 .................... #FUSES WDT128 //Watch Dog Timer uses 1:128 Postscale
23 .................... #FUSES INTRC_IO //Internal RC Osc, no CLKOUT
24 .................... #FUSES NOBROWNOUT //No brownout reset
25 .................... #FUSES BORV21 //Brownout reset at 2.1V
26 .................... #FUSES NOPUT //No Power Up Timer
27 .................... #FUSES BW16 //16-bit external bus mode
28 .................... #FUSES STVREN //Stack full/underflow will cause reset
29 .................... #FUSES NODEBUG //No Debug mode for ICD
30 .................... #FUSES IESO //Internal External Switch Over mode enabled
31 .................... #FUSES NOFCMEN //Fail-safe clock monitor disabled
32 .................... #FUSES NOXINST //Extended set extension and Indexed Addressing mode disabled (Legacy mode)
33 .................... #FUSES NOWAIT //Wait selections unavailable for Table Reads or Table Writes
34 .................... #FUSES NOPROTECT //Code not protected from reading
35 .................... #FUSES NOEBTR //Memory not protected from table reads
36 .................... #FUSES LPT1OSC //Timer1 configured for low-power operation
37 .................... #FUSES MCLR //Master Clear pin enabled
38 .................... #FUSES MCU //Microcontroller Mode
39 ....................
40 .................... #use delay(clock=4000000)
41 0004: CLRF FEA
42 0006: MOVLW 06
43 0008: MOVWF FE9
44 000A: MOVF FEF,W
45 000C: BZ 002A
46 000E: MOVLW 01
47 0010: MOVWF 01
48 0012: CLRF 00
49 0014: DECFSZ 00,F
50 0016: BRA 0014
51 0018: DECFSZ 01,F
52 001A: BRA 0012
53 001C: MOVLW 4A
54 001E: MOVWF 00
55 0020: DECFSZ 00,F
56 0022: BRA 0020
57 0024: BRA 0026
58 0026: DECFSZ FEF,F
59 0028: BRA 000E
60 002A: RETLW 00
61 ....................
62 ....................
63 ....................
64 ....................
65 .................... #define LED PIN_J6 //CHANGE PIN_XX TO YOUR LED PIN NUMBER, EX: PIN_A5
66 ....................
67 .................... void main()
68 .................... {
69 002C: CLRF FF8
70 002E: BCF FD0.7
71 0030: CLRF FEA
72 0032: CLRF FE9
73 0034: MOVLW 60
74 0036: MOVWF FD3
75 0038: MOVF FD3,W
76 003A: MOVF FC1,W
77 003C: ANDLW C0
78 003E: IORLW 0F
79 0040: MOVWF FC1
80 0042: MOVLW 07
81 0044: MOVWF FB4
82 ....................
83 .................... setup_adc_ports(NO_ANALOGS|VSS_VDD);
84 0046: MOVF FC1,W
85 0048: ANDLW C0
86 004A: IORLW 0F
87 004C: MOVWF FC1
88 .................... setup_adc(ADC_CLOCK_DIV_2);
89 004E: BCF FC0.0
90 0050: BCF FC0.1
91 0052: BCF FC0.2
92 0054: BCF FC0.7
93 0056: BSF FC2.0
94 .................... setup_psp(PSP_DISABLED);
95 0058: BCF FB0.4
96 .................... setup_spi(SPI_SS_DISABLED);
97 005A: BCF FC6.5
98 005C: BCF F94.5
99 005E: BSF F94.4
100 0060: BCF F94.3
101 0062: MOVLW 01
102 0064: MOVWF FC6
103 0066: MOVLW 00
104 0068: MOVWF FC7
105 .................... setup_wdt(WDT_OFF);
106 006A: BCF FD1.0
107 .................... setup_timer_0(RTCC_INTERNAL);
108 006C: MOVLW 80
109 006E: MOVWF FD5
110 .................... setup_timer_1(T1_DISABLED);
111 0070: CLRF FCD
112 .................... setup_timer_2(T2_DISABLED,0,1);
113 0072: MOVLW 00
114 0074: MOVWF FCA
115 0076: MOVLW 00
116 0078: MOVWF FCB
117 .................... setup_ccp1(CCP_OFF);
118 007A: BSF F94.2
119 007C: CLRF FBD
120 .................... setup_comparator(NC_NC_NC_NC);
121 007E: MOVLW 07
122 0080: MOVWF FB4
123 0082: MOVF F97,W
124 0084: MOVWF F97
125 0086: MOVLW 03
126 0088: MOVWF 00
127 008A: DECFSZ 00,F
128 008C: BRA 008A
129 008E: MOVF FB4,W
130 0090: BCF FA1.6
131 .................... setup_vref(FALSE);
132 0092: CLRF FB5
133 ....................
134 .................... //Example blinking LED program
135 .................... while(true){
136 .................... output_low(LED);
137 0094: BCF F9A.6
138 0096: BCF F91.6
139 .................... delay_ms(1000);
140 0098: MOVLW 04
141 009A: MOVWF 05
142 009C: MOVLW FA
143 009E: MOVWF 06
144 00A0: RCALL 0004
145 00A2: DECFSZ 05,F
146 00A4: BRA 009C
147 .................... output_high(LED);
148 00A6: BCF F9A.6
149 00A8: BSF F91.6
150 .................... delay_ms(1000);
151 00AA: MOVLW 04
152 00AC: MOVWF 05
153 00AE: MOVLW FA
154 00B0: MOVWF 06
155 00B2: RCALL 0004
156 00B4: DECFSZ 05,F
157 00B6: BRA 00AE
158 .................... }
159 00B8: BRA 0094
160 ....................
161 .................... }
162 00BA: SLEEP
163  
164 Configuration Fuses:
165 Word 1: 8800 INTRC_IO IESO NOFCMEN
166 Word 2: 0E19 NOBROWNOUT WDT128 NOWDT BORV21 NOPUT
167 Word 3: 85C3 BW16 CCP2C1 NOWAIT LPT1OSC MCLR MCU
168 Word 4: 0081 STVREN NODEBUG NOXINST NOXINST
169 Word 5: 0001 NOPROTECT
170 Word 6: 0000
171 Word 7: 0001 NOEBTR