Micro-Controller GPIO Pins for C-Blocks

I have this crazy dream to plug a micro-controller emulator into C-Block code. But QSpice C-Blocks don’t have tri-state ports. We’re going to need something like this to implement micro-controller GPIO ports.

The GPIO_Pin symbol and sub-circuit is now on the dev branch of my GitHub page in the Miscellany folder.

Note: If you have a suggestion for a better graphic for the symbol, please let me know.

–robert

1 Like

Still chasing my QSpice micro-controller dreams… I’ve created templates and classes to wrap the multiple C-Block ports for a GPIO_Pin symbol into a (hopefully) simple interface.

The example code implements “Charlieplexing” of LEDs – that being the only case that I can think of where “tri-stating on the fly” was required.

(For what it’s worth, I’m still hoping someone will suggest a better graphic for the GPIO_Pin symbol.)

The files are available in the GPIO folder of the dev branch of my GitHub repository here.

–robert