Each LPC1768 is capable of controlling 2 CAN bus lines. Linking multiple chips together via SPI allows for more bus lines to be monitored simultaneously. Slave unit.
Diff: main.cpp
- Revision:
- 0:a46303f3277c
diff -r 000000000000 -r a46303f3277c main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Oct 31 22:14:03 2014 +0000 @@ -0,0 +1,16 @@ +#include "mbed.h" +#include "rtos.h" +#include "spiSlaveProtocol.h" +#include "CAN_thread.h" + +int main() { + Thread thread(CAN_thread); + + + Serial* pc = new Serial(USBTX, USBRX); // tx, rx + + spiSlaveProtocol* device = new spiSlaveProtocol(pc); + while (1) { + device->run(); + } +} \ No newline at end of file