1 |
#include <16F887.h> |
1 |
#include <16F887.h> |
2 |
#device adc=8 |
2 |
#device adc=8 |
3 |
|
3 |
|
4 |
#FUSES WDT //Watch Dog Timer |
4 |
#FUSES WDT //Watch Dog Timer |
5 |
#FUSES HS //High speed Osc (> 4mhz for PCM/PCH) (>10mhz for PCD) |
5 |
#FUSES HS //High speed Osc (> 4mhz for PCM/PCH) (>10mhz for PCD) |
6 |
#FUSES PUT //Power Up Timer |
6 |
#FUSES PUT //Power Up Timer |
7 |
#FUSES MCLR //Master Clear pin enabled |
7 |
#FUSES MCLR //Master Clear pin enabled |
8 |
#FUSES NOPROTECT //Code not protected from reading |
8 |
#FUSES NOPROTECT //Code not protected from reading |
9 |
#FUSES NOCPD //No EE protection |
9 |
#FUSES NOCPD //No EE protection |
10 |
#FUSES NOBROWNOUT //No brownout reset |
10 |
#FUSES NOBROWNOUT //No brownout reset |
11 |
#FUSES IESO //Internal External Switch Over mode enabled |
11 |
#FUSES IESO //Internal External Switch Over mode enabled |
12 |
#FUSES FCMEN //Fail-safe clock monitor enabled |
12 |
#FUSES FCMEN //Fail-safe clock monitor enabled |
13 |
#FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O |
13 |
#FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O |
14 |
#FUSES NODEBUG //No Debug mode for ICD |
14 |
#FUSES NODEBUG //No Debug mode for ICD |
15 |
#FUSES NOWRT //Program memory not write protected |
15 |
#FUSES NOWRT //Program memory not write protected |
16 |
#FUSES BORV40 //Brownout reset at 4.0V |
16 |
#FUSES BORV40 //Brownout reset at 4.0V |
17 |
|
17 |
|
18 |
#use delay(clock=20000000) |
18 |
#use delay(clock=20000000) |
19 |
#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8,errors) |
19 |
#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8,errors) |
20 |
|
20 |
|
21 |
|
21 |
|