USB-CAN Interface (AT90USB162 / hardware-USB / RS485 / CAN)
AT90USB162
16MHz
RS485
CAN (MCP2515)
3x LED
30mm x 21mm
-
PINS
LEDs
Power | GND |
RX | PB6 |
TX | PB7 |
Bootloader | PC6 |
Firmware
patch: at90usb_support.patch
Index: src/mcp2515.c
===================================================================
diff --git a/lib/can/com.kreatives-chaos/src/mcp2515.c b/lib/can/com.kreatives-chaos/src/mcp2515.c
--- a/lib/can/com.kreatives-chaos/src/mcp2515.c (revision 224)
+++ b/lib/can/com.kreatives-chaos/src/mcp2515.c (working copy)
@@ -169,7 +169,7 @@
};
// -------------------------------------------------------------------------
-bool mcp2515_init(uint8_t bitrate)
+bool mcp2515_init(can_bitrate_t bitrate)
{
if (bitrate >= 8)
return false;
Index: src/mcp2515_private.h
===================================================================
diff --git a/lib/can/com.kreatives-chaos/src/mcp2515_private.h b/lib/can/com.kreatives-chaos/src/mcp2515_private.h
--- a/lib/can/com.kreatives-chaos/src/mcp2515_private.h (revision 224)
+++ b/lib/can/com.kreatives-chaos/src/mcp2515_private.h (working copy)
@@ -61,6 +61,11 @@
#define P_MISO B,6
#define P_SCK B,7
#define SUPPORT_FOR_MCP2515__
+ #elif defined(__AVR_AT90USB82__) || defined(__AVR_AT90USB162__)
+ #define P_MOSI B,2
+ #define P_MISO B,3
+ #define P_SCK B,1
+ #define SUPPORT_FOR_MCP2515__
#elif defined(__AVR_ATmega8__) || defined(__AVR_ATmega48__) || \
defined(__AVR_ATmega88__) || defined(__AVR_ATmega168__)
#define P_MOSI B,3
Pictures
Repository
svn://ed-solutions.de/e-design/hardware/can_series/usb-rs485