mcan
                Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| mcan [2018/08/03 12:34] – // receive the messages from MCANx and forward it to the USBx antichambre | mcan [2018/08/03 12:53] (current) – [A basic example] antichambre | ||
|---|---|---|---|
| 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  | + | ===== 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  | + | ===== MIOS32_CAN_MIDI ===== | 
| ==== Package and Packet ==== | ==== Package and Packet ==== | ||
| Like the others MIDI peripherals, | Like the others MIDI peripherals, | ||
| 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  | 
| <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 lo center> an 0xf8 MIDI Clock over the port MCAN2.</ | ||
| - | **Voice messages** | + | ==== Voice packet  | 
| <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/ | <wrap lo center> Program: 33, on MCAN3/ | ||
| - | **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 lo>Done! MCAN is ready!</ | ||
| - | === 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: | ||
| } | } | ||
| } | } | ||
| - | </ | + | </ | 
| - | + | \\ | |
| - | ==== 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
                
                