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. Master unit.

Dependencies:   mbed

Revision:
0:855b6e84e744
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Oct 31 22:13:47 2014 +0000
@@ -0,0 +1,26 @@
+#include "mbed.h"
+#include "spiMasterProtocol.h"
+
+// https://developer.mbed.org/forum/helloworld/topic/2541/
+
+Serial pc(USBTX, USBRX); // tx, rx
+
+int main() {
+    spiMasterProtocol* canDevice = new spiMasterProtocol();
+ 
+    pc.printf("======================================================\r\n");
+    pc.printf("Press any key to start...\r\n");
+    pc.getc(); // wait for keyboard
+ 
+    while (1) {
+ 
+        canDevice->get42();
+        
+        wait(0.5); // Wait for 5 seconds for readability only
+        
+        canDevice->get84();
+        
+        wait(0.5);
+        
+    }
+}
\ No newline at end of file