Rev Author Line No. Line
2980 kaklik 1 #include <16F887.h>
2 #device adc=8
3  
4  
5  
6 //#FUSES WDT // Watch Dog Timer
7 #FUSES NOWDT //No Watch Dog Timer
8 #FUSES INTRC //Internal RC Osc
9 #FUSES NOPUT //No Power Up Timer
10 #FUSES MCLR //Master Clear pin enabled
11 #FUSES NOPROTECT //Code not protected from reading
12 #FUSES NOCPD //No EE protection
13 #FUSES NOBROWNOUT //No brownout reset
14 #FUSES IESO //Internal External Switch Over mode enabled
15 #FUSES FCMEN //Fail-safe clock monitor enabled
16 #FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
17 #FUSES NODEBUG //No Debug mode for ICD
18 #FUSES NOWRT //Program memory not write protected
19 #FUSES BORV40 //Brownout reset at 4.0V
20  
21 #use delay(clock=8000000)
22  
23 //set I2C
2984 kaklik 24 #define PIN_SDA PIN_C4
25 #define PIN_SCL PIN_C3
2980 kaklik 26 #use i2c(master, sda=PIN_SDA, scl=PIN_SCL)
27 //set RS232
2984 kaklik 28 #use rs232(baud=38400,parity=N,xmit=PIN_C7,rcv=PIN_C6,bits=8) //rcv TXD xmit RXD
2980 kaklik 29