25/09/22 - Extension Board Interface & Abstraction

A project log for PicoGamePad

A gamepad utilizing the RP2040 Microcontroller. Comes in low-cost and high-performance versions.

miclmicl 09/25/2022 at 00:450 Comments
The board assignment subschematic, a chosen symbol representing the source of mappings is unwrapped, and then only the interfaces are exposed to the rest of your design.

I'm not sure how familiar the general public is with hierarchical schematics in KiCAD, but they're powerful if you use them the right way. To make these boards easy to extend, the way that students design extensions for them should be clean.

On the outside of the schematic which abstracts the hardware mappings, you refer to the datasheet listed titles for functions of the RP2040, and while in the firmware you would need to address the correct mappings of pin-to-interface, this makes it possible to work with the final pin functions.

At the end of the day, if both two pins (i.e GPIO4 and GPIO10) are used for function A or B, and both _can_ perform A *OR* B, then the order does not matter. Instead, in the parent schematic, all you see is:

What the assignment schematic looks like to the rest of the schematic.

And you simply connect the pin for X to the thing that needs X. For example:

Example of unfolding I2C_0's two bus lines to be used elsewhere.
Now, I can use I2C_0, only by referring to it. This makes extending boards like the PicoGamePad so much nicer for students who do not want to spend several hours unravelling the RP2040 datasheet and reviewing the original board design.