Go Down

Topic: Pin-mapping (non)conventions for custom Arduino boards? (Read 2 times) previous topic - next topic


Sounds like we're in about the same boat. I figured there wasn't much sense trying to keep shield-compatible an official (Arduino, Sanguino) board since the vast majority of shields aren't designed with power management provisions (no need to, since the Arduino pulls ~17mA idle on its own) - so while I'm doing my own thing, I decided to make it perfboard-friendly (leave that funny header spacing behind) and split the headers into 3 sections with the common bus signals (e.g. SPI, I2C, power/gnd) replicated for each.

Some libraries may have to be tweaked anyway (SD lib won't initialize a card more than once; necessary when cutting its power during idle periods), but hopefully they are in the minority!


maintain my own forks of various libraries with the pin numbers changed / settable in constructor.

Yeah, I feel your pain.  IMO, all pin assignments should be given in the constructor.  The biggest annoyance here to me is libraries hard-coding their SPI chip select pin.  I find myself refactoring libraries all the time to account for this.  Not sure if it's too late for this, but I would really advocate for Arduino to pick up that standard.


Some libraries may have to be tweaked anyway .........

This is definately true!
Usually you may also not find serious error handling, an absolute 'no go' for reliable software, but tolerable for hobby applications.
That what Arduino was designed for!

Defining a new GPIO-Pinout will not prevent users selecting boards like the mosquino.
If users share there tweakened libs with the cummunity, mosquino will be an serious tool.
But why not use it with AVR-Studio and some reliable and tested libraries/drivers for the ATMega family ....
The Arduino Software was never intended for use in commercial/critical projects!

The 'three port' solution that mosquino uses, allows als an dedicated shield for debugging porposes via the JTAG Interface if this is necessary.

And .... evolutionary changes of technical concepts will usually bring some benefit for the user or software developer ;-)


I guess most of the library were written for a specific situation at the first place.
Few years back when I was writing library for PIC microcontroller, the library always have options like:

  • Hardware or software based peripheral

  • Interrupt based or polling based

  • Which pin to use

But this of course take quite a long time to come out with a solid group of library for all peripheral and interface.
IMHO, there should be like a framework or skeleton body how a library should be in order for everyone who wish to write libraries.

Go Up