Jump to content

MBNet


ultra
 Share

Recommended Posts

perhaps this should be in the "assembler" category, but i really know nothing about that language and i'm hoping for a c related response.  also the application i'm writing for my control surface will be in c.

i want to use two cores together with mbnet for my control surface application.  basically, i just want simple communication for this purpose:

core 1 tells core 2 what layer it's on, so core 2 can change states appropriately.

core 2 tells core 1 what knob/switch has been changed, so core 1 can send out the commands on that interface.

are there any programming examples out there?  i've searched the forum and ucapps and i haven't come up with anything.  i've also tried looking at the sidv2 software but it's a bit beyond my understanding.  is mbnet considered to be just for advanced programmers, or is it just that not many have used it so there isn't much information out there yet?  any help at all on how to get started with this would be much appreciated!

ultra

Link to comment
Share on other sites

I think mbnet is rather new - AFAIK it's only been used in the SIDv2 until now. But actually I see lots of applications. Once I get around re-designing the MB UC I could use it there, too. It's very attractive to have a return-channel (as opposed to the MIDI chain solution).

Sorry I can't be of more help than just manifesting my interest in a C interface  :-\.

Best regards, ilmenator

Link to comment
Share on other sites

perhaps this should be in the "assembler" category, but i really know nothing about that language and i'm hoping for a c related response.  also the application i'm writing for my control surface will be in c.

I would very much like to have a C-wrapped ASM CAN implementation, but there isn't one yet. It's also quite possible to make a performant library written in native C, but... Why bother when the ASM is already done :)

core 1 tells core 2 what layer it's on

core 2 tells core 1 what knob/switch has been changed

Totally doable. I guess you've already seen the MIDIbox Network page? You may have noticed that it's a master/slave arrangement, so you should keep that in mind. Instead of a

X tells Y: 'A' ... Y tells X: 'B'

it's more of a:

X tells Y: 'A', and asks about stuff, and then Y replies: 'B'

You could do this by reading RAM from the slave after writing some...or you could implement your own extension to the MBNet protocol by using the special TOS flags 16...127, where your master can send a payload (bank), and request a payload in response (which button's pushed) ... or you could use a multi-master environment where each core takes turns being the master.... Each has it's benefits and drawbacks.

As illy mentioned, the only example in use right now is SIDv2, so I can understand why it's not sinking in right away! Is there anything in particular you want to know? The whole story is a bit long heh. Have you scoped the wikipedia article on CAN and the philips datasheet on it? It helps a lot to understand how CAN itself works. A lot of the hard work is taken care of by the protocol itself (and the hardware support for it in the 4685). You might also find Microchip Appnotes AN738 © and AN853 (ASM) interesting, although keep in mind that they are intended for a different architecture so they may just confuse matters... But maybe they'll help show how the registers are used. Reading the 4685 datasheet is an absolute must, you'll need to get to know what the registers are. If you can memorise them all in less than a few weeks, you're a bigger geek than I :) Once you've done that, have a look at the mbnet.inc file and it might make a bit of sense ...

Uhm...what else?

Link to comment
Share on other sites

You could do this by reading RAM from the slave after writing some...or you could implement your own extension to the MBNet protocol by using the special TOS flags 16...127, where your master can send a payload (bank), and request a payload in response (which button's pushed) ... or you could use a multi-master environment where each core takes turns being the master.... Each has it's benefits and drawbacks.

I would like to use MBNet for my control surface. Simple messaging, same as the original poster. Any simple examples (C or assembler) would be much appreciated.

Regards,

Frank

Link to comment
Share on other sites

Hi Frank, that's similar to the appnotes I posted above (wonder why yours wasn't in the search I ran?). It's actually more appropriate as it's for ECAN not CAN, so thankyou!

As with those other appnotes, that's a different thing to MBNet though, so it would only really be useful for learning what the registers do.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...