#AVR

Moritz Strohm (tech account)mstrohm_tech@social.tchncs.de
2025-05-16

A few years ago, I started wondering if there is a way to program an AVR microcontroller without the Arduino IDE which is slow on older computers that I have. This was the starting point for the projects ucmf and yauclib:

While ucmf is a framework for compiling microcontroller projects similar to CMake, yauclib is for hardware abstraction similar to the Arduino software library. Both are in development and only support a few AVR microcontrollers so far (and Arduinos based on them).

I consider ucmf to be ready to use. yauclib still needs a lot of work, especially drivers and hardware-independent interrupt handling mechanisms.

The code for both projects is on Codeberg:

codeberg.org/ncc1988/ucmf

codeberg.org/ncc1988/yauclib

#ucmf #yauclib #Arduino #AVR #Microcontroller #Software #Programming

2025-05-13

Anteris Technologies ( #AVR ) has released " Quarterly Results Announcement and SEC Form 10-Q " on Wed 14 May at 08:37 AEST #tax #government #trading #UnitedStates #ClinicalTrials
grafa.com/asset/anteris-techno

2025-05-09

Измерение собственного напряжения питания микроконтроллера

Началось все с того, что при проектировании своего устройства на микроконтроллере ATtiny 85 , которое должно было работать от встроенного li‑ion аккумулятора, я изначально не задавался целью измерения заряда АКБ, поскольку в этом не было необходимости. Однако, собрав все устройство на печатной плате, я подумал над тем, почему бы не добавить такую возможность. Прочитав в Интернете, как это можно было реализовать, стало ясно, что сделать это вряд ли удастся, поскольку все порты PB[0:5] уже были заняты и, следовательно, не было возможности применения АЦП с аналогового пина (при чем порт PB0 я не мог настроить на вход опорного напряжения AREF - он должен был использоваться как управляющий выход). Долгое изучение состояния регистров АЦП в datasheet на ATTiny 85 привело меня к следующей идее: в качестве опорного напряжения может быть выбрано само напряжение питания VCC (биты REFS [0:2] регистра ADMUX установлены в 0), а в качестве измеряемого ‑ напряжение VBG с внутреннего стабилизатора в 1.1В (биты MUX [3:0] регистра ADMUX установлены соответственно в 1100). То есть, для измерения напряжения питания не нужно ничего, кроме, собственно, самого питания VCC!

habr.com/ru/articles/907954/

#программирование #микроконтроллеры #c++ #программирование_микроконтроллеров #avr #attiny85 #attiny #ацп

2025-05-08

Измерение собственного напряжения питания микроконтроллера

Началось все с того, что при проектировании своего устройства на микроконтроллере ATtiny 85 , которое должно было работать от встроенного li‑ion аккумулятора, я изначально не задавался целью измерения заряда АКБ, поскольку в этом не было необходимости. Однако, собрав все устройство на печатной плате, я подумал над тем, почему бы не добавить такую возможность. Прочитав в Интернете, как это можно было реализовать, стало ясно, что сделать это вряд ли удастся, поскольку все порты PB[0:5] уже были заняты и, следовательно, не было возможности применения АЦП с аналогового пина (при чем порт PB0 я не мог настроить на вход опорного напряжения AREF - он должен был использоваться как управляющий выход). Долгое изучение состояния регистров АЦП в datasheet на ATTiny 85 привело меня к следующей идее: в качестве опорного напряжения может быть выбрано само напряжение питания VCC (биты REFS [0:2] регистра ADMUX установлены в 0), а в качестве измеряемого ‑ напряжение VBG с внутреннего стабилизатора в 1.1В (биты MUX [3:0] регистра ADMUX установлены соответственно в 1100). То есть, для измерения напряжения питания не нужно ничего, кроме, собственно, самого питания VCC!

habr.com/ru/articles/907954/

#программирование #микроконтроллеры #c++ #программирование_микроконтроллеров #avr #attiny85 #attiny #ацп

Simon Formancarapace
2025-05-07

Gloomy day so rather than gardening I'm inside playing with electronics. I got a Z80 a while ago but I never used it. I'm going to stick it on a breadboard. I don't have any RAM or ROM chips but I do have some ATmega328 chips (the arduino ones) so I can program one of those to act like a memory. Maybe load new programs through the serial port, eh?

2025-05-04

New version of the Freestanding implementation for #GCC 15.1.0 available

The code has been branched off and a docker container for #AVR is released.

Want to try out some of the proposals for #Freestanding C++?
Want to mess around with modules?
For the AVR processor (probably the one in your #Arduino board)?

#CPP #Embedded #CppModules

Docker image at hub.docker.com/repository/dock

Source code based on official GCC 15.1.0 with further Freestanding proposals baked in:

gitlab.com/avr-libstdcxx/gcc/-

Q: So, anything new? What'd you do today?

A: Oh, dug through menus in a new AV receiver to find its MAC addresses, configured my network DHCP server to give it a static address, and then wrote some iptables rules to keep that address from being able to reach outside the LAN. Pretty standard stuff.

Looking for a "DO NOT CONNECT THIS MACHINE TO THE INTERNET NO MATTER HOW MUCH IT NAGS" warning sign to print out.

#dystopia #spying #telemetry #connected #SmartDevice #AV #AVR #receiver #HomeTheatre #firewall

2025-04-20

Made a set of scripts and stuff to build the AVR compiler and avrdude. You can use them to build and install directly in your system, create a ubuntu package for it, or make a docker image. It's at a working state, which may be as far as I take it. At some point I may create releases and publish the images, but for now if you want to use it you gotta do it yourself. PRs welcome.

gitlab.com/strange-crew/images

There's also an example program build using cmake.

++

Random #AVR microcontroller thoughts:

In previous AVRs (like the M328) interrupts would just disable the I-bit in the status register, and the return instruction (reti) would enable it.
So nothing that magical about RETI, it was just SEI+RET. And I might've been even so naughty in some code that I've size golfed a word by using reti instead of sei+ret.

Anyways, with the modern xmega-derived cores (AVRxt), entering an interrupt does not disable the I-bit, instead the interrupt controller disables that priority level of interrupts internally until the CPU core signals the execution of a RETI instruction.

This just has made making a super-low-priority interrupt (one that can be interrupted by every other interrupt) a bit trickier. Previously you'd just disable that particular interrupt source and enable the I bit (SEI) and you'd be set.

Now ... I have not tested this yet (i might real soon tho) but i think now the most succint way to "release" the interrupt controller (without actually exiting the interrupt) is to rcall a reti instruction. This is 2+4 = 6 cycles (instead of 1 cycle for SEI previously).

And ofc after that it's proper to just "ret" from the interrupt so that the interrupt controller is not super confused.

(You might think that the fact that you have an interrupt controller that allows some priority levels for interrupts would avoid the need for this, but atleast on the Tiny3217, the interrupt controller has no concept for a "lower than default" priority. It allows one high priority interrupt and the rest are normal priority.)

Arduino LibrariesarduinoLibs@fosstodon.org
2025-04-02

STM32duino ST25DV (2.2.0) for stm32/avr/samd/arc32 by STMicroelectronics

➡️ github.com/stm32duino/ST25DV

Allows controlling the NFC ST25DV

#Arduino #ArduinoLibs #stm32 #avr #samd #arc32

Arduino LibrariesarduinoLibs@fosstodon.org
2025-04-01

QuickStats (1.2.5) for avr by David Dubins

➡️ github.com/dndubins/QuickStats

Descriptive Statistics for Arduino

#Arduino #ArduinoLibs #avr

Arduino LibrariesarduinoLibs@fosstodon.org
2025-03-31

BMC (2.3.3) for avr/esp32 by BadassMIDI.com

➡️ github.com/neroroxxx/BMC

Fully featured MIDI Controller Library with a Companion Editor App for 32-bit Teensy boards, Requires Teensyduino.

#Arduino #ArduinoLibs #avr #esp32

Arduino LibrariesarduinoLibs@fosstodon.org
2025-03-30

kari (1.0.0) for avr/megaavr/esp32/esp8266 by Vincent Muriithi Karimi

➡️ github.com/vincentmuriithi/kar

Arduino library for asynchronous tasks and task scheduling.Available as static library for faster compilation.

#Arduino #ArduinoLibs #avr #megaavr #esp32 #esp8266

Arduino LibrariesarduinoLibs@fosstodon.org
2025-03-30

ADS1256 (1.4.0) for avr/stm32/esp32/renesas_uno/rp2040 by Curious Scientist

➡️ github.com/CuriousScientist0/A

An Arduino-compatible library for the 24-bit ADS1256 analog-to-digital converter.

#Arduino #ArduinoLibs #avr #stm32 #esp32 #renesas_uno #rp2040

Arduino LibrariesarduinoLibs@fosstodon.org
2025-03-29

SmartSystem (1.0.4) for avr by Meryck Franklin-Ryan

➡️ bitbucket.org/mgf_ryan/smartsy

A library that simplifies exposing modular Arduino functionality over Wire I2C / RF24 radio

#Arduino #ArduinoLibs #avr

Arduino LibrariesarduinoLibs@fosstodon.org
2025-03-28

KY040 (1.0.3) for avr/esp32 by codingABI

➡️ github.com/codingABI/KY040

Library for KY-040 rotary encoders with debouncing, polling and interrupt mode

#Arduino #ArduinoLibs #avr #esp32

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst