News for hackers. Stuff that matters.
Re:What? More 8-Bit Microcontrollers? by nousermane on Friday July 01, 2022 @10:19AM (#31946752)
Each job requires a tool that does it best, within some limits.

To set a bit in GPIO:

- on AVR, one assembly instruction, 2 bytes machine code, 1 CPU cycle (unless interrupts are enabled);

- on microcontroller-style ARM (Pi-pico), 2-4 assembly instructions, 8-20 bytes machine code (depending on compiler options), 4-12 CPU cycles. All numbers deterministic within the same build (unless code cache is cold, then 50+ cycles, and don't forget interrupts);

- on ARM+linux, hardcore mode: same as above + small, deterministic number of extra cycles since GPIO runs at slower clock than CPU. That assumes you go out of your way to reserve CPU core, set rt_prio for your task, etc...;

- on linux, via sysfs: who knows. 1000 CPU cycles is probably the lower bound, but each run is going to take different amount of time. On a busy system, some - as long as a few seconds.

Re:What? More 8-Bit Microcontrollers? by monocasa on Friday July 01, 2022 @11:35AM (#31947898)
The pi-pico does have that cute PIO state machine though to baby sit GPIO and get single cycle granularity out of it.
Re:What? More 8-Bit Microcontrollers? by jjoonathan on Friday July 01, 2022 @04:27PM (#31952358)
Yep, I suspect that will be the path forward. Same high level strategy, but integrated into a single package. It will be interesting to see if the babysitters remain state machines or if they grow into tiny little microcontrollers.
Re:What? More 8-Bit Microcontrollers? by monocasa on Friday July 01, 2022 @08:58PM (#31954955)
Or tiny little FPGAs connected to the GPIO lines would be neat too.
Re:What? More 8-Bit Microcontrollers? by wheelin on Saturday July 02, 2022 @04:23AM (#31957238)
Many automotive MCUs have complexe timer coprocessors integrated for hard real time I/O purpose. Examples are GTM, eTPU and N2HET that I know about. Does the PIO work in the same way?