Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about pure MCU work #219

Open
howardjp opened this issue Aug 25, 2021 · 1 comment
Open

Question about pure MCU work #219

howardjp opened this issue Aug 25, 2021 · 1 comment

Comments

@howardjp
Copy link

howardjp commented Aug 25, 2021

Problem Description

I'd like to be able to use Simba directly on 8-bit Atmel AVR microcontrollers like the ATmega328P and ATtiny85. Adding a new board appears to be quite trivial, but is dependent upon the concept of there being a carrier board for the MCU to ride on, even if that carrier board is something as relatively sophisticated as an Arduino.

Motivating Example (skip if not interested)

As an ongoing project, my kids and I have been building a custom homebrew Z80 computer. I'd like to put an SPI controller on it, since that would be fun. There are plans for such things, implemented entirely in hardware because the author didn't want '"cheat" with a microcontroller.'

I am completely about cheating and using a microcontroller because then I can put a wicked ring buffer on both transmit and receive and an ATmega328P running Simba is a great solution here. However, this is not an Arduino Uno and I want to program on the raw ATmega328P.

Options

The viable options appear to be two-fold: First, I can create a "board" that is basically a passthrough to the MCU. It's essentially the Uno board most of the stuff taken out or relabeled. Of course, I would submit all of that back so others interested could use them. The downside here is that for each AVR microcontroller, a new board definition would have to be created. While there are some overlapping definitions (ATmega48A/PA/88A/PA/168A/PA/328/P, the actual document title), that's still a number of board definitions.

The second option is to create a "board" that represents the physical one-off board we're hand-building. This would look not at all like an Uno and given this, I could optimize some of the definitions, such as gluing together 8 pins into a parallel interface, and that would be cool. However, this would be dependent on a design we're building for fun and haven't finalized. That's not a problem for me, but nobody would care beyond us, and this board definition would not be submitted. Is there a mechanism to define a board for Simba inside my PlatformIO project so I don't have to hack it directly into the Simba source code?

Question

So, how should I approach this problem? What is the best way? Does anyone else work directly with MCUs they are going to drop onto boards like this? How do you solve this issue?

@eerimoq
Copy link
Owner

eerimoq commented Aug 25, 2021

I think both options are good, but if you want to contribute to Simba most users are probably interested in the first option, a "bare" board.

My knowledge about PlatformIO is very limited, but I'm pretty sure you cannot add a new board without changing the Simba source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants