Hier meine Einstellungen für:
- PIC18F4550
- CCS Compiler
- PICDEM 2 Plus Board
Die mit Ausrufezeichen versehenen Fuses ware bei mir relevant für das
debuggen mit dem ICD 2.
Ausserdem beachten, dass in der MPLAB Oberfläche unter Project > Build
Options > Project > CCS C Compiler "Compile for use with ICD Debugger"
aktiviert ist.
#include <18F4550.h>
#device ICD=TRUE
#device adc=10
#FUSES NOWDT //No Watch Dog Timer
#FUSES WDT128 //Watch Dog Timer uses 1:128 Postscale
#FUSES INTRC_IO //Internal RC Osc, no CLKOUT
#FUSES NOPROTECT //Code not protected from reading
#FUSES BROWNOUT //Reset when brownout detected
#FUSES BORV43 //Brownout reset at 4.3V
#FUSES NOPUT //!!!!! Power Up Timer !!!!!!
#FUSES NOCPD //No EE protection
#FUSES STVREN //Stack full/underflow will cause reset
#FUSES DEBUG //Debug mode for use with ICD
#FUSES NOLVP //No low voltage prgming, B3(PIC16) or
B5(PIC18) used for I/O
#FUSES NOWRT //Program memory not write protected
#FUSES NOWRTD //Data EEPROM not write protected
#FUSES IESO //Internal External Switch Over mode
enabled
#FUSES FCMEN //Fail-safe clock monitor enabled
#FUSES NOPBADEN //PORTB pins are configured as digital
I/O on RESET
#FUSES NOWRTC //configuration not registers write
protected
#FUSES NOWRTB //Boot block not write protected
#FUSES NOEBTR //Memory not protected from table reads
#FUSES NOEBTRB //Boot block not protected from table
reads
#FUSES NOCPB //No Boot Block code protection
#FUSES MCLR //Master Clear pin enabled
#FUSES NOLPT1OSC //Timer1 configured for higher power
operation
#FUSES NOXINST //Extended set extension and Indexed
Addressing mode disabled (Legacy mode)
#FUSES PLL1 //No PLL PreScaler
#FUSES CPUDIV1 //No System Clock Postscaler
#FUSES USBDIV //USB clock source comes from PLL divide
by 2
#FUSES NOVREGEN //USB voltage regulator disabled
#FUSES NOICPRT //!!!!! ICPRT disabled !!!!!!
#use delay(clock=8000000,RESTART_WDT)