Line 19... |
Line 19... |
19 |
#FUSES BORV40 //Brownout reset at 4.0V |
19 |
#FUSES BORV40 //Brownout reset at 4.0V |
20 |
|
20 |
|
21 |
#use delay(clock=8000000) |
21 |
#use delay(clock=8000000) |
22 |
|
22 |
|
23 |
//set I2C |
23 |
//set I2C |
24 |
#define PIN_SDA PIN_C3 |
24 |
#define PIN_SDA PIN_C4 |
25 |
#define PIN_SCL PIN_C4 |
25 |
#define PIN_SCL PIN_C3 |
26 |
#use i2c(master, sda=PIN_SDA, scl=PIN_SCL) |
26 |
#use i2c(master, sda=PIN_SDA, scl=PIN_SCL) |
27 |
//set RS232 |
27 |
//set RS232 |
28 |
#use rs232(baud=9600,parity=N,xmit=PIN_C7,rcv=PIN_C6,bits=8) //rcv TXD xmit RXD |
28 |
#use rs232(baud=38400,parity=N,xmit=PIN_C7,rcv=PIN_C6,bits=8) //rcv TXD xmit RXD |
29 |
|
29 |
|