Author Topic: [arduino] what µCU can a newbie program with/through Arduino?  (Read 2519 times)

0 Members and 1 Guest are viewing this topic.

Offline WatthTopic starter

  • Regular Contributor
  • *
  • Posts: 241
  • Country: fr
[arduino] what µCU can a newbie program with/through Arduino?
« on: November 29, 2021, 05:49:39 pm »
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 count
  • some can have better performances (brain speed, RAM and prog storage, etc.)
  • is less expensive

But I 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?
Because "Matth" was already taken.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12851
Re: [arduino] what µCU can a newbie program with/through Arduino?
« Reply #1 on: November 29, 2021, 06:19:37 pm »
There are very few Arduino boards with a SoC - if it isn't capable of running a full OS, the processor is an ordinary MCU not 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.
« Last Edit: November 30, 2021, 03:17:06 pm by Ian.M »
 
The following users thanked this post: Watth

Offline lucazader

  • Regular Contributor
  • *
  • Posts: 221
  • Country: au
Re: [arduino] what µCU can a newbie program with/through Arduino?
« Reply #2 on: November 29, 2021, 07:22:11 pm »
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/device

Another 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!
« Last Edit: November 29, 2021, 07:24:28 pm by lucazader »
 
The following users thanked this post: Watth, WattsThat

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1530
  • Country: au
Re: [arduino] what µCU can a newbie program with/through Arduino?
« Reply #3 on: November 29, 2021, 09:37:28 pm »

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 count
  • some can have better performances (brain speed, RAM and prog storage, etc.)
  • is less expensive
I 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.html
https://www.pjrc.com/teensy/teensyduino.html
 
The following users thanked this post: Watth

Offline WatthTopic starter

  • Regular Contributor
  • *
  • Posts: 241
  • Country: fr
Re: [arduino] what µCU can a newbie program with/through Arduino?
« Reply #4 on: November 29, 2021, 10:37:45 pm »
@Ian.M @PCB.Wiz
Thanks 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 few very obvious 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)
Because "Matth" was already taken.
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1530
  • Country: au
Re: [arduino] what µCU can a newbie program with/through Arduino?
« Reply #5 on: November 29, 2021, 10:59:34 pm »
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?
Broadly, yes. I think Arduino use a ceramic resonator for sysCLK.


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?
It is open source, so some have migrated it if you look at the links above.


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)
Yes. 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()
 
The following users thanked this post: Watth

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12851
Re: [arduino] what µCU can a newbie program with/through Arduino?
« Reply #6 on: November 30, 2021, 03:26:45 pm »
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. 
 
The following users thanked this post: Watth

Online westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: [arduino] what µCU can a newbie program with/through Arduino?
« Reply #7 on: December 01, 2021, 10:57:06 am »
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.


 
The following users thanked this post: Watth

Offline WatthTopic starter

  • Regular Contributor
  • *
  • Posts: 241
  • Country: fr
Re: [arduino] what µCU can a newbie program with/through Arduino?
« Reply #8 on: December 02, 2021, 06:14:16 pm »
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.
Because "Matth" was already taken.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14434
  • Country: fr
Re: [arduino] what µCU can a newbie program with/through Arduino?
« Reply #9 on: December 02, 2021, 06:41:54 pm »
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
 
The following users thanked this post: Watth

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1530
  • Country: au
Re: [arduino] what µCU can a newbie program with/through Arduino?
« Reply #10 on: December 02, 2021, 10:39:55 pm »
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.

You 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 think better speed and memory performances are really important, then look at 32 bit MCUs
Start from the data sheets and work back to what resource you think you need.

Some modern 8-bit AVR boards, all sub $20
AVR128DB48 CURIOSITY NANO BRD
AVR128DA48 CURIOSITY NANO EVALUA
ATMEGA4809 CURIOSITY NANO BRD
ATTINY3217 CURIOSITY NANO BRD
ATTINY1607 CURIOSITY NANO EVALUA
ATTINY1627 CURIOSITY NANO

 
The following users thanked this post: Watth

Offline WatthTopic starter

  • Regular Contributor
  • *
  • Posts: 241
  • Country: fr
Re: [arduino] what µCU can a newbie program with/through Arduino?
« Reply #11 on: December 07, 2021, 04:55:59 pm »
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...
Because "Matth" was already taken.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf