Page 4 of 4

Re: Messaging between multiple Maple Mini clones

Posted: Fri Sep 23, 2016 8:37 pm
by RogerClark
Joe

It looks like an ingeniously simple system.

Perhaps it needs a name ;-)

"Maple bus" ;-)

Re: Messaging between multiple Maple Mini clones

Posted: Fri Sep 23, 2016 9:57 pm
by joevpt
Roger,

In order to use the Maple mini in my project (porting it directly from Arduino Mega), I would need the I2C library to support both master and slave mode. This solution is so much easier that trying to add the slave code to the library, and while it does mean I need to write a little more code to make a protocol as others have described in the topic, it adds the functionality without any limitations.

I like 'Maple bus' as a term, but of course the solution works with any MCU which has a UART port.

Great forum, with lots of great ideas here, so well done to you all.

Joe

Re: Messaging between multiple Maple Mini clones

Posted: Fri Sep 23, 2016 10:08 pm
by RogerClark
Hi Joe

Thanks

I understand that it will work with any MCU and you can have 5V and 3.3V on the bus at the same time, which is great as sometimes there is a need to mix 5V Arduino pro-mini's and STM32 in the same project.

So "Maple bus" is perhaps not the best name, but I couldn't think of anything else at the spur of the moment ;-)

Re: Messaging between multiple Maple Mini clones

Posted: Sat Sep 24, 2016 6:20 am
by Pito
It is basically an "1-Wire" bus developed by Dallas Semiconductor. I think to write a well working software "driver" for such a setup would be a challenge.

Re: Messaging between multiple Maple Mini clones

Posted: Sat Sep 24, 2016 4:48 pm
by martinayotte
Indeed, the challenge is the software, not the hardware, same challenge as with an RS485 bus : Collisions when used in Multi Master protocol.
Though, having a single Master/Arbiter solves such issues.

Re: Messaging between multiple Maple Mini clones

Posted: Sun Sep 25, 2016 8:46 am
by Pito
As I wrote earlier, I had a 1Master - XSlaves setup (a small lab automation project in 80ties) and we finished with an app where the Master sent a request with [addr] and [command] and the Slave_XY responded with some action or [data]. Afaik to make it work somehow reliably we put a long delays/timeouts everywhere to avoid collisions (the responses from the Slaves were not immediate sometimes, and depended on other external events) :)
But today are guys much clever than we were in the era of the dinosaurs :) so I am quite confident a good sw for that 1-wire setup is doable..

Re: Messaging between multiple Maple Mini clones

Posted: Mon Mar 20, 2017 4:38 pm
by douginarug
Hello All,
I'm new to the STM32 devices and this forum.
I was wondering if anyone has been working on the "maple bus" code. Does anyone have some example code or possibly a new library for this type of communication?

I had a project that used two pro mini arduinos that talked I2C. One master and one slave. I was wanting to port that project to the maple mini, but don't want to re-invent the wheel.