[arduino] what µCU can a newbie program with/through Arduino? - Page 1
Forum section: electronics / general

author: Watth
author_rank: Frequent Contributor
timestamp: November 29, 2021, 05:49:39 pm
content: Hey there.I (like others) would like to program SoC because:it takes less space and power than an arduino board so can be integrated in small projects, especially since these µCU exist with different IO pins countsome can have better performances (brain speed, RAM and prog storage, etc.)is less expensiveButI don't know much about µCU architecture aspects of Arduino.All I know is that programs compiled on the Arduino IDE can be loaded in chips (such as the ATtiny series) using an Arduino board.I already did that, in a "cargo cult" fashion, as I am not knowledgeable in what is at stake. I just follow the tutorials I found. I know: lame, but that's the burden of the hobbyist.Well lets say it's more a maker than a hacker approach.So, in the end, my question is : is there a solid information source listing the chips that can be used this way, dealing with wiring, programmer parameters, things to download, and such, for all the compatible chips?

author: Ian.M
author_rank: Super Contributor
timestamp: November 29, 2021, 06:19:37 pm
content: There are very few Arduino boards with aSoC- if it isn't capable of running a full OS, the processor is an ordinaryMCUnot a SoC.(Some high end MCUs can be SoCs.)You are unlikely to find a comprehensive and authoritative reference for which MCUs can be programmed using an Arduino as the programmer, as there are several forks of the Arduino IDE and core libraries for MCU architectures that aren't officially supported by Arduino AG, and lots of 3rd party board support packages for MCUs that aren't supported but which have the same architecture as a supported chip.Arduino AG have no incentive to centralize and organize reference material for MCUs that aren't used on any official Arduino board or board from an official partner.Then there are various open source programmer projects on Github and elsewhere, that run on Arduinos or Arduino compatible MCUs and range from half-assed abandonware to near professional grade, currently maintained projects with responsive support forums.Correlating that lot and maintain a central index would be a full-time career for several professional technical writers.

author: lucazader
author_rank: Regular Contributor
timestamp: November 29, 2021, 07:22:11 pm
content: A good series of small, and more capable but that are still widely compatible with arduino is the teensy boards -https://www.pjrc.com/teensy/These go from small arm cortex processors and boards with low power requirements. All the way up to 600Mhz+ with USB 2.0 Host/deviceAnother decent and really capable processor/board that is widely compatible is the ESP32. This processor is dual core 240Mhz, and include WiFi and Bluetooth.You could also look into the arudino Pro linup eg the portentia H7. It has lots of bells and whistles.But there are lots more than just these!

author: PCB.Wiz
author_rank: Super Contributor
timestamp: November 29, 2021, 09:37:28 pm
content: Quote from: Watth on November 29, 2021, 05:49:39 pmI think your SoC here means single-chip-microcontroller as you mention different io pin counts, less expensive and less space ?If you want to head into the smaller, single chip microcontroller space, then download the AVR tools and get a low cost eval board and have a play.AVR128DB48 CURIOSITY NANO or AVR128DA48 CURIOSITY NANO are their newest AVR offerings.Ardunio is a wrapper and library that tends to start on the medium sizes single chip MCUs, simply because on a board of that size/cost, it makes little sense to 'under power it for a few cents'.https://www.engineersgarage.com/articles-arduino-arduino-pro-microcontroller-boards/If you do not want to do your own PCB designs, but want smaller modules, then look at something like the teensy series - a wide range of horsepower and compact modules.https://www.pjrc.com/teensy/techspecs.htmlhttps://www.pjrc.com/teensy/teensyduino.html

author: Watth
author_rank: Frequent Contributor
timestamp: November 29, 2021, 10:37:45 pm
content: @Ian.M @PCB.WizThanks for the clarification. I think indeed I mistook SoC with µCU.Writing this post made me understand a few things, in addition to your feedback.I finally came to realize a fewveryobvious things!Some Arduino compatible boards are built on more powerful µCU, so that simply means that as the IDE can be set-up for this, I could program a µCU of the same model to work on a another project without needing the whole Arduino-like board. For (a little extreme) example, one could simply de-solder it and put it on a PCB they made, provide proper power and it would work, right?Does this also mean that Arduino IDE will only work with ARM 8 bits µCU? Or can it be setup for other architectures and bus sizes?Is an alternative to program with a different IDE, and most importantly without basic Arduino librairies? (by this I mean the basic functions that, e.g., allow to manage IO pins with simpler functions)

author: PCB.Wiz
author_rank: Super Contributor
timestamp: November 29, 2021, 10:59:34 pm
content: Quote from: Watth on November 29, 2021, 10:37:45 pmBroadly, yes. I think Arduino use a ceramic resonator for sysCLK.Quote from: Watth on November 29, 2021, 10:37:45 pmIt is open source, so some have migrated it if you look at the links above.Quote from: Watth on November 29, 2021, 10:37:45 pmYes. That's why I suggested getting a newish small AVR Eval board, and the AVR Studio so you can get a feel for how that works out.The Debug support on Vendor MCU eval boards is usually quite good, older Arduino just used printf variants for debug. I think selected new ones have SWD = firmware debug supported, which is better than printf()

author: Ian.M
author_rank: Super Contributor
timestamp: November 30, 2021, 03:26:45 pm
content: The Arduino IDE can in theory be set up for just about any MCU there's a GCC cross compiler for. However you'd also have to provide Arduino compatible libraries for that MCU.

author: westfw
author_rank: Super Contributor
timestamp: December 01, 2021, 10:57:06 am
content: I *think* the OP is asking "Using the ArduinoISP sketch, I can use an Arduino as a device programmer for burning code into some other (bare) processors, even if it isn't Arduino code. I'd like to have a list of which "other processors" can be programmed that way."In that case, the answer is that ArduinoISP supports what Atmel/Microchip calls "ISP programming", which is SPI based. At least in theory, you can burn code into any AVR that supports this ISP progamming method. That includes most ATmega and ATtiny chips, up through about the time of the Microchip acquisition. It does NOT support newer chips like the Mega-0 (ATmega4809), Tiny-0, Tiny-1, Tiny-2, or AVR-Dx, all of which use a new programming protocol called UPDI. It also doesn't support "xmega" chips (which use "PDI"), the utra-tiny "braindead" chips like the ATtiny10 (uses "TPI"), or certain older chips that require "High Voltage Parallel Programming" or "HV Serial Programming" (ATtiny28 and ATtiny11 come to mind. Not that you're likely to be able to buy either of those.) It also doesn't support the HV programming modes of the mainstream chips, which is annoying if you want to re-use the RESET pin as IO because you need "just one more pin."But ArduinoISP is not the only "programmer" software for an Arduino. There is other software, sometimes with additional hardware requirements, that will support UPDI and HVPP, for example. I've even heard of software that will allow an Arduino to program the 8-bit PIC chips (in their "low voltage serial" programming modes.)I'd be shocked if someone hasn't written something that does SWD for ARM chips (although that gets "complicated", and may require a Native-USB-capable Arduino to properly implement "CMSIS-DAP" and work with host-side software like OpenOCD.But if you're serious about programming a variety of chips, you should probably shell out the $35 for something like a "Microchip SNAP" programmer/debugger. (or wait for it to go on sale, sometimes 50% off.) These support a wide variety of chips and programming protocols (8bit PIC, 16bit PIC, 32bit PIC, ARM, AVRs of several sorts. And also debugging using the native debug protocols, which is ... sometimes very much more useful than using "print" to debug. (but not always.)Which chips are supported by the Arduino IDE and "Cores" is a separate question.

author: Watth
author_rank: Frequent Contributor
timestamp: December 02, 2021, 06:14:16 pm
content: You're right in pointing that what I'm looking for is to program a bare µCU; as a smaller and less expansive alternative to a pre-made board.I'm looking into ways to make my own PCB design, so that I can select the minimum extra components (e.g. such as power supply/conditionning, external cristal or oscillator, RTC, etc.).But what I failed to make clear is I was initially talking about program made with the Arduino IDE and libraries, therefore looking for the most performant compatible chips.Now, I would be open to other solutions, as long as they still offer basic libraries that help with basic functions (typically IO management and data reading/writing, serial com with the PC, etc.). Especially if that gives me the opportunity to use µCU with better speed and memory performances. And as you suggested, I'm open to buying a programmer if it's reasonably priced for my budget and competences. As you see, although I can manage programming, I'm still unknowledgeable in the "put program in chip" discipline.

author: SiliconWizard
author_rank: Super Contributor
timestamp: December 02, 2021, 06:41:54 pm
content: If you want MCUs that are supported by the Arduino framework and environment, there is no official list, but here is a relatively long one:https://github.com/per1234/ino-hardware-package-list/blob/master/ino-hardware-package-list.tsv

author: PCB.Wiz
author_rank: Super Contributor
timestamp: December 02, 2021, 10:39:55 pm
content: Quote from: Watth on December 02, 2021, 06:14:16 pmYou do not need a 'programmer', just a low cost eval board to get a feel for this MCU level design and PCB layouts.Those eval boards are low cost, tend to be minimal, and include reference schematics.The least-jump from 8-bit Arduino, will be to another, newer AVR core. If you thinkbetter speed and memory performancesare really important, then look at 32 bit MCUsStart from the data sheets and work back to what resource you think you need.Some modern 8-bit AVR boards, all sub $20AVR128DB48 CURIOSITY NANO BRDAVR128DA48 CURIOSITY NANO EVALUAATMEGA4809 CURIOSITY NANO BRDATTINY3217 CURIOSITY NANO BRDATTINY1607 CURIOSITY NANO EVALUAATTINY1627 CURIOSITY NANO

author: Watth
author_rank: Frequent Contributor
timestamp: December 07, 2021, 04:55:59 pm
content: Well I am in a project that would need a standalone MCU. Also, the shortage of MCU is making things complicated, so I adjust my design to the available MCU, rather than the opposite.I think I found a few sources on what series of 32-bits Microchip and STmicro would work 32 bits. (Arduino IDE cores). To be continued...