Rev 2578 Rev 2582
Line 1... Line 1...
1 #include <18F4550.h> 1 #include <16F887.h>
2 #device adc=8 2 #device adc=8
3   3  
4 #FUSES NOWDT //No Watch Dog Timer 4 #FUSES WDT //Watch Dog Timer
5 #FUSES WDT128 //Watch Dog Timer uses 1:128 Postscale 5 #FUSES HS //High speed Osc (> 4mhz for PCM/PCH) (>10mhz for PCD)
6 #FUSES INTRC //Internal RC Osc 6 #FUSES PUT //Power Up Timer
7 #FUSES NOPROTECT //Code not protected from reading -  
8 #FUSES NOBROWNOUT //No brownout reset -  
9 #FUSES BORV20 //Brownout reset at 2.0V 7 #FUSES MCLR //Master Clear pin enabled
10 #FUSES NOPUT //No Power Up Timer 8 #FUSES NOPROTECT //Code not protected from reading
11 #FUSES NOCPD //No EE protection 9 #FUSES NOCPD //No EE protection
12 #FUSES STVREN //Stack full/underflow will cause reset -  
13 #FUSES NODEBUG //No Debug mode for ICD 10 #FUSES NOBROWNOUT //No brownout reset
14 #FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O -  
15 #FUSES NOWRT //Program memory not write protected -  
16 #FUSES NOWRTD //Data EEPROM not write protected -  
17 #FUSES IESO //Internal External Switch Over mode enabled 11 #FUSES IESO //Internal External Switch Over mode enabled
18 #FUSES FCMEN //Fail-safe clock monitor enabled 12 #FUSES FCMEN //Fail-safe clock monitor enabled
19 #FUSES PBADEN //PORTB pins are configured as analog input channels on RESET 13 #FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
20 #FUSES NOWRTC //configuration not registers write protected 14 #FUSES NODEBUG //No Debug mode for ICD
21 #FUSES NOWRTB //Boot block not write protected 15 #FUSES NOWRT //Program memory not write protected
22 #FUSES NOEBTR //Memory not protected from table reads -  
23 #FUSES NOEBTRB //Boot block not protected from table reads -  
24 #FUSES NOCPB //No Boot Block code protection -  
25 #FUSES MCLR //Master Clear pin enabled -  
26 #FUSES LPT1OSC //Timer1 configured for low-power operation -  
27 #FUSES NOXINST //Extended set extension and Indexed Addressing mode disabled (Legacy mode) -  
28 #FUSES PLL1 //No PLL PreScaler 16 #FUSES BORV40 //Brownout reset at 4.0V
29 #FUSES CPUDIV1 //No System Clock Postscaler -  
30 #FUSES USBDIV //USB clock source comes from PLL divide by 2 -  
31 #FUSES VREGEN //USB voltage regulator enabled -  
32 #FUSES ICPRT //ICPRT enabled -  
33   17  
34 #use delay(clock=8000000) 18 #use delay(clock=8000000,RESTART_WDT)
35 #use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8) 19 #use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8,restart_wdt)
36   20