There is also RTIC https://rtic.rs which is a concurrency framework for real-time systems using interrupts. IIRC the car industry is interested in it.
Introducing multitasking to Arduino
71–80 of 88 posts
Re: Introducing multitasking to Arduino
#72Earlier quoted context omitted.
I think AVR is a good architecture to learn on, because the devices are far simpler than ARM or other more modern chips. The main concept to master as an embedded developer is operating a device by its registers. The common arduino device, ATMEGA328, has a total of 84 registers across all peripherals. A simple program to blink the LED is less than 10 lines total. The datasheet is tiny compared to most ARM devices, bu…
That was true when one had to write assembly code. Now we don't really have to any more, thanx to Arduino mainly (which bilds upon avrgcc and avrdude). It's easier to learn on the new platforms because you can use higher level programming languages like MicroPython, especially for easy stuff. I can do a blinky by writing three lines in the uPy REPL.
Re: Introducing multitasking to Arduino
#73Re: Introducing multitasking to Arduino
#74Seriously, there are SO MANY mature, well-understood RTOS implementations for MCUs out there already, they really, really should just use one.
Re: Introducing multitasking to Arduino
#75Earlier quoted context omitted.
That was true when one had to write assembly code. Now we don't really have to any more, thanx to Arduino mainly (which bilds upon avrgcc and avrdude). It's easier to learn on the new platforms because you can use higher level programming languages like MicroPython, especially for easy stuff. I can do a blinky by writing three lines in the uPy REPL.
If the registers are abstracted away, you're left relying on other people's code. I suppose learning microcontrollers can mean different things to different people, but as for becoming a professional embedded developer, micropython and Arduino are dead ends. There is no transition to truly understanding the hardware.
Micropython and Arduino are not dead ends but hobby grade tools.
Re: Introducing multitasking to Arduino
#76In Rust there is https://embassy.dev which is an async Rust framework for embedded. It has been shipping in products for years. Can be made real-time (for some definitions of it). There is also RTIC https://rtic.rs which is a concurrency framework for real-time systems using interrupts. IIRC the car industry is interested in it.
Looking at the documentation and Github pages it's not very clear if ATmel, the microcontroller family for Arduino, is supported at all or not.
Do you have a link where this is validated?
Re: Introducing multitasking to Arduino
#77Re: Introducing multitasking to Arduino
#78In Rust there is https://embassy.dev which is an async Rust framework for embedded. It has been shipping in products for years. Can be made real-time (for some definitions of it). There is also RTIC https://rtic.rs which is a concurrency framework for real-time systems using interrupts. IIRC the car industry is interested in it.
Very interesting projects. Looking at the documentation and Github pages it's not very clear if ATmel, the microcontroller family for Arduino, is supported at all or not. Do you have a link where this is validated?
The classic (and oldest) are the AVR microcontrollers (ATmega), which are not supported by embassy nor rtic at the moment AFAIK. They are supported by Rust, though. see: https://github.com/rahix/avr-hal.
However, there are several other Arduino microcontrollers that are supported. For example the Arduino Nano RP2040, Arduino Nano 33 BLE (nRF), the Arduino MKR ones as well as the STM32duino (STM32F103, the one in the hugely popular $2 blue-pill boards) are all based on the ARM cortex-m architecture, which is supported by both embassy as well as rtic.
For espressif chips (like the esp32), support is being worked on by the manufacturer itself: https://github.com/embassy-rs/embassy/issues/745
Here an overview of microcontrollers in the (official) Arduino family: https://www.makeuseof.com/exploring-different-types-of-ardui...
Re: Introducing multitasking to Arduino
#79Earlier quoted context omitted.
where? where can i get one?
Well, there's a "hardware" link at the top of the linked article for starters. Or google "esp-32" to find store selling a very popular one. Or check out what's available on sparkfun or adafruit.
Re: Introducing multitasking to Arduino
#80Earlier quoted context omitted.
That was true when one had to write assembly code. Now we don't really have to any more, thanx to Arduino mainly (which bilds upon avrgcc and avrdude). It's easier to learn on the new platforms because you can use higher level programming languages like MicroPython, especially for easy stuff. I can do a blinky by writing three lines in the uPy REPL.
If the registers are abstracted away, you're left relying on other people's code. I suppose learning microcontrollers can mean different things to different people, but as for becoming a professional embedded developer, micropython and Arduino are dead ends. There is no transition to truly understanding the hardware.
However, if you do know the hardware, if you are familiar with what's going on under the hood, then MicroPython allows you to write the majority of your system significantly faster.