Skip to content

Step 4 of 11

Course config bits

Goal

Add the four course CONFIG lines and build again with no errors.

Config bits are set when you program the PIC — 20 MHz HS crystal, watchdog off, etc. They go after the include and before any ORG, as in Config bits.

If you change boards later, these four lines are usually the same in the UNEXPO course.

  1. Below #include, add the four CONFIG lines from the highlighted block (or copy the full file).
  2. Do not remove LIST, #include, or END.
  3. Build again — still BUILD SUCCESSFUL.
  4. If a CONFIG fails: check spelling (FOSC, WDT, LVP, PBADEN).
						        LIST    P=18F4550
        #include <P18F4550.INC>

        CONFIG  FOSC = HS
        CONFIG  WDT = OFF
        CONFIG  LVP = OFF
        CONFIG  PBADEN = OFF

        END
					
						        CONFIG  FOSC = HS
        CONFIG  WDT = OFF
        CONFIG  LVP = OFF
        CONFIG  PBADEN = OFF
					
  • All four CONFIG lines are in the file.
  • Builds with no errors.