Subversion Repositories HomeAutomation

Rev

Rev 1115 | Blame | Compare with Previous | Last modification | View Log | SVN | RSS feed

#ifndef CONFIG_H_
#define CONFIG_H_

/* set to 0 for not sending timestamps on bus */
#define SENDTIMESTAMP                   1
#define USE_STDCAN          1
#define NODE_ID             0
#define STDCAN_FILTER           0

// Kolla makefile för att sätta MCU!!

//#define F_CPU                     8000000UL
#define F_CPU                   20000000UL

//#define MCU atmega88
#define CAN_CONTROLLER          MCP2515
#define MCP_CS_PORT             PORTC
#define MCP_CS_DDR              DDRC
#define MCP_CS_BIT              PC3
#define MCP_CAN_BITRATE_KBPS    250
#define MCP_CLOCK_FREQ_MHZ      20
#define MCP_CLOCK_PRESC         1

/*
Old simple-ethernet node
#define MCP_CS_PORT             PORTB
#define MCP_CS_DDR              DDRB
#define MCP_CS_BIT              PB2
*/

#define ENC28J60_USART_SPI_MODE

 /* 
 * mac and ip have to be unique in your local area network. 
 * You can not have the same numbers in two devices: 
 */

#define ENC28J60_MAC1           0x54
#define ENC28J60_MAC2           0x55
#define ENC28J60_MAC3           0x58
#define ENC28J60_MAC4           0x10
#define ENC28J60_MAC5           0x00
#define ENC28J60_MAC6           0x27

#define ENC28J60_IP1            192
#define ENC28J60_IP2            168
#define ENC28J60_IP3            16
#define ENC28J60_IP4            51


 /**
 * ENC28J60 Chip Select port on avr. 
 * Same for nodeSimpleEth and core-expansion simple-eth
 */ 
#define ENC28J60_CS_PORT    PORTC
#define ENC28J60_CS_DDR     DDRC
#define ENC28J60_CS         PC0


 /**
 * ENC28J60 Reset port on avr. 
 * Same for nodeSimpleEth and core-expansion simple-eth
 */ 
#define ENC28J60_RESET_PORT PORTC
#define ENC28J60_RESET_DDR  DDRC
#define ENC28J60_RESET      PC1

// only for USART in SPImode
#define XCK_DDR             DDRD
#define XCK                 PD4


#endif /*CONFIG_H_*/