User Tools

Site Tools


mcan

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
mcan [2018/08/03 12:34]
antichambre // receive the messages from MCANx and forward it to the USBx
mcan [2018/08/03 12:53] (current)
antichambre [A basic example]
Line 256: Line 256:
 **But before any MIDI features we need the MIOS32 driver for that CAN controller...** **But before any MIDI features we need the MIOS32 driver for that CAN controller...**
 ---- ----
-===== MIOS32_CAN ​implementation ​=====+===== MIOS32_CAN =====
 ==== CAN controller as a generic peripheral in MIOS32. ==== ==== CAN controller as a generic peripheral in MIOS32. ====
 MIOS32_CAN feature is only compilable under STM32F4.\\ ​ MIOS32_CAN feature is only compilable under STM32F4.\\ ​
Line 395: Line 395:
 ---- ----
  
-===== MIOS32_CAN_MIDI ​implementation ​=====+===== MIOS32_CAN_MIDI =====
 ==== Package and Packet ==== ==== Package and Packet ====
 Like the others MIDI peripherals,​ we need a bridge between our new CAN features(mios32_can.c/​h) and the MIDI process[[http://​www.midibox.org/​mios32/​manual/​group___m_i_o_s32___m_i_d_i.html|(mios32_midi.c/​h)]]\\ Like the others MIDI peripherals,​ we need a bridge between our new CAN features(mios32_can.c/​h) and the MIDI process[[http://​www.midibox.org/​mios32/​manual/​group___m_i_o_s32___m_i_d_i.html|(mios32_midi.c/​h)]]\\
Line 458: Line 458:
 ---- ----
  
-==== Basic Mode ====+===== MCAN Basic Mode =====
 This is the default mode, the funny one, just interconnect some Cores in parallel with J18 and they are able to communicate in MIDI. Easy.\\ This is the default mode, the funny one, just interconnect some Cores in parallel with J18 and they are able to communicate in MIDI. Easy.\\
 In this mode: In this mode:
Line 471: Line 471:
 \\ \\
 \\ \\
-=== Standard Packet in Basic Mode ===+==== Standard Packet in Basic Mode ====
 Even if the MCAN make the MIDI packet for you, let me show you some of them:\\ Even if the MCAN make the MIDI packet for you, let me show you some of them:\\
 The IDE bit in frame is always 0, cause we only use the Standard Id Packet, the Type and the Cable must be placed in the Id.\\ The IDE bit in frame is always 0, cause we only use the Standard Id Packet, the Type and the Cable must be placed in the Id.\\
Line 481: Line 481:
 The Sysex messages are an exception for the DLC, we makes packets of 8 bytes(max) with it, and we mark the packets as Starts, Continues or Ends in the Type field, using the code 0x4, 0x6 and 0x7.\\ The Sysex messages are an exception for the DLC, we makes packets of 8 bytes(max) with it, and we mark the packets as Starts, Continues or Ends in the Type field, using the code 0x4, 0x6 and 0x7.\\
  
-**Real-time messages**+==== Real-time ​packet ​messages ​example ====
 <code c [mios32_midi_pcktype_num_bytes]>​ <code c [mios32_midi_pcktype_num_bytes]>​
   1, // 5: Single-byte system common message   1, // 5: Single-byte system common message
Line 494: Line 494:
 <wrap lo center> an 0xf8 MIDI Clock over the port MCAN2.</​wrap>​\\ <wrap lo center> an 0xf8 MIDI Clock over the port MCAN2.</​wrap>​\\
  
-**Voice messages**+==== Voice packet ​messages ​examples ====
 <code c [mios32_midi_pcktype_num_bytes]>​ <code c [mios32_midi_pcktype_num_bytes]>​
   3, // 8: Note Off   3, // 8: Note Off
Line 517: Line 517:
 <wrap lo center> Program: 33, on MCAN3/​Channel 13.</​wrap>​\\ <wrap lo center> Program: 33, on MCAN3/​Channel 13.</​wrap>​\\
  
-**SysEx messages**+==== SysEx packets message example ====
 <code c [mios32_midi_pcktype_num_bytes]>​ <code c [mios32_midi_pcktype_num_bytes]>​
   3, // 4: SysEx starts   3, // 4: SysEx starts
Line 547: Line 547:
  
 ---- ----
-==== Basic Mode, declare and use ====+===== Basic Mode, declare and use =====
 Just add this lines in your mios32_config.h(your app).\\ Just add this lines in your mios32_config.h(your app).\\
 <code c [mios32_config.h]>​ <code c [mios32_config.h]>​
Line 564: Line 564:
 <wrap lo>Done! MCAN is ready!</​wrap>​\\ <wrap lo>Done! MCAN is ready!</​wrap>​\\
  
-=== A basic example === +==== A basic example ​==== 
-For this example we will use 2 Core to get an 8 MIDI ports link between 2 different computers.\\+For this example we will use 2 Cores to get an 8 MIDI ports link between 2 different computers.\\
 \\ \\
 <WRAP group> <WRAP group>
Line 616: Line 616:
   }   }
 } }
-</​code>​ +</​code>​\\ 
-  +\\ 
-==== Enhanced Mode ====+**Done! Your App with the MCAN(Basic) is ready to upload and is the same for both Cores. 8-) ** 
 +\\ 
 +\\ 
 +\\ 
 + 
 +---- 
 + 
 +===== MCAN Enhanced Mode =====
 <WRAP center round todo 60%> <WRAP center round todo 60%>
  
mcan.1533299677.txt.gz · Last modified: 2018/08/03 12:34 by antichambre