Line 1... |
Line 1... |
1 |
#include <16F887.h> |
1 |
#include <16F887.h> |
2 |
#device adc=8 |
2 |
#device adc=8 |
3 |
|
3 |
|
4 |
#FUSES NOWDT //No Watch Dog Timer |
4 |
#FUSES NOWDT //No Watch Dog Timer |
5 |
#FUSES INTRC //Internal RC Osc |
5 |
#FUSES INTRC_IO //Internal RC Osc |
6 |
#FUSES NOPUT //No Power Up Timer |
6 |
#FUSES NOPUT //No 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 |
Line 16... |
Line 16... |
16 |
#FUSES BORV40 //Brownout reset at 4.0V |
16 |
#FUSES BORV40 //Brownout reset at 4.0V |
17 |
|
17 |
|
18 |
#use delay(clock=8000000) |
18 |
#use delay(clock=8000000) |
19 |
|
19 |
|
20 |
#use i2c(master, sda=PIN_C4, scl=PIN_C3) |
20 |
#use i2c(master, sda=PIN_C4, scl=PIN_C3) |
21 |
#use rs232(baud=9600,parity=N,xmit=PIN_B3,rcv=PIN_B2,bits=8) //rcv TXD xmit RXD |
21 |
#use rs232(baud=9600,parity=N,xmit=PIN_B7,rcv=PIN_B6,bits=8) //rcv TXD xmit RXD |
22 |
|
22 |
|