AVR-microcontrollers zijn populair, eenvoudig in het gebruik en bijzonder veelzijdig. In het elektronicatijdschrift 'Elektor' is dan ook al een groot aantal speciale toepassingen en printen met een ATmega- of een ATtiny-controller gepubliceerd. Meestal ging het daarbij om afgeronde projecten. In dit boek staat echter de programmering van deze controllers centraal. BASCOM is hiervoor een ideaal gereedschap. Na een minimale voorbereiding kunt u al beginnen uw eigen ideeën te realiseren.
BASCOM en AVR-controllers, een onverslaanbaar team! Wat u ook wilt ontwikkelen, in de meeste gevallen heeft een ATmega alles aan boord wat u nodig hebt. Poorten, timers, A/D-omzetters, PWM-uitgangen en seriële interfaces, RAM, flash-ROM en EEPROM: alles is ruimschoots voorhanden. En met BASCOM is het gebruik daarvan kinderspel. Ook ingewikkelder periferie als LCD, RC5 en I²C kan met slechts een handjevol instructies worden gebruikt. Er is een brede hardware-basis beschikbaar. Of u nu de STK500 van Atmel gebruikt, de ATM18 of een eigen print, u kunt de voorbeelden uit dit boek meteen in praktijk brengen. Voor heel kleine taken worden controllers uit de ATtiny-reeks gebruikt. Op die manier kunt u uw eigen projecten snel en met weinig kosten realiseren.
Downloads
Software
With Examples for Arduino UNO, Raspberry Pi Pico and ESP32
Programming small electronic systems has never been more accessible. Tasks that once demanded expensive tools, specialized hardware, and deep electrical engineering expertise can now be tackled with low-cost development boards and approachable software. At the centre of this shift is the Arduino environment, which provides a unified and familiar way to program a wide range of microcontroller platforms—from classic AVR boards like the Arduino UNO to modern ARM-based boards such as the Raspberry Pi Pico, and powerful Wi-Fi-enabled devices like the ESP32.
This book introduces embedded programming through the core idea that defines all microcontrollers: reading inputs, processing information, and controlling outputs in a predictable loop. The Arduino environment abstracts much of the hardware complexity, allowing you to focus on behaviour rather than implementation details. With just a few lines of code, you can blink LEDs, read sensors, control motors, and communicate with other devices.
While the Arduino UNO, Raspberry Pi Pico, and ESP32 boards differ greatly in performance and features, they share the same fundamental building blocks: digital and analog I/O, timers, serial communication, PWM, interrupts, and power management. Learning these concepts within the Arduino framework builds skills that transfer easily across platforms and scale toward more advanced applications.
By exploring multiple boards while maintaining a consistent programming approach, this book helps you progress from simple experiments to confidently produce well-structured designs—showing that embedded development can be both practical and enjoyable.
Dieses Buch behandelt Softwaretechniken, die es gestatten, auch anspruchsvollere Programme für AVR-Mikrocontroller zu entwickeln. Speziell wird im ersten Teil, welcher den Datenstrukturen gewidmet ist, besonders auf die Harvard-Architektur der Controller und die daraus resultierenden Programmiertechniken eingegangen. Die kleinen Arbeitsspeicher der meisten AVR-Controller erfordern immer wieder angepasste Implementierungsmethoden, davon werden einige im Buch vorgestellt, beispielsweise die verdichtete Speicherung und das Sortieren kurzer Zahlenfolgen mit Sortiernetzwerken. Die Implementierung der Buddy-Methode zur Arbeitsspeicherverwaltung zeigt, dass bei der Programmierung von AVR-Controllern nicht nur simple Algorithmen verwendet werden können.
Im zweiten Teil des Buches wird die Arithmetik der Controller analysiert. Diese Analyse ist aber kein Selbstzweck, denn sie führt auf Programmiertechniken, die ohne sie nur schwer zu erlangen oder zu erklären wären. Ferner wird eine Fixkommaarithmetik entwickelt, die der Rechenleistung der Controller in vielen Fällen besser angepasst ist als eine rechenleistungsintensive Fließkommaarithmetik. An zwei Beispielen wird gezeigt, wie auf dieser Basis auch höhere Funktionen implementiert werden können.
Für die Programme wird durchweg der AVR-Assembler eingesetzt, der kostenlos zur Verfügung steht. Der Simulator, welcher Teil der Programmierumgebung ist, der auch der Assembler angehört, gestattet es, die Programme des Buches nachzuvollziehen oder mit ihnen zu experimentieren, ohne einen echten Controller einzusetzen.
Hands-on in more than 50 projects
STM32 Nucleo family of processors are manufactured by STMicroelectronics. These are low-cost ARM microcontroller development boards. This book is about developing projects using the popular STM32CubeIDE software with the Nucleo-L476RG development board. In the early Chapters of the book the architecture of the Nucleo family is briefly described.
The book covers many projects using most features of the Nucleo-L476RG development board where the full software listings for the STM32CubeIDE are given for each project together with extensive descriptions. The projects range from simple flashing LEDs to more complex projects using modules, devices, and libraries such as GPIO, ADC, DAC, I²C, SPI, LCD, DMA, analogue inputs, power management, X-CUBE-MEMS1 library, DEBUGGING, and others. In addition, several projects are given using the popular Nucleo Expansion Boards. These Expansion Boards plug on top of the Nucleo development boards and provide sensors, relays, accelerometers, gyroscopes, Wi-Fi, and many others. Using an expansion board together with the X-CUBE-MEMS1 library simplifies the task of project development considerably.
All the projects in the book have been tested and are working. The following sub-headings are given for each project: Project Title, Description, Aim, Block Diagram, Circuit Diagram, and Program Listing for the STM32CubeIDE.
In this book you will learn about
STM32 microcontroller architecture;
the Nucleo-L476RG development board in projects using the STM32CubeIDE integrated software development tool;
external and internal interrupts and DMA;
DEBUG, a program developed using the STM32CubeIDE;
the MCU in Sleep, Stop, and in Standby modes;
Nucleo Expansion Boards with the Nucleo development boards.
What you need
a PC with Internet connection and a USB port;
STM32CubeIDE software (available at STMicroelectronics website free of charge)
the project source files, available from the book’s webpage hosted by Elektor;
Nucleo-L476RG development board;
simple electronic devices such as LEDs, temperature sensor, I²C and SPI chips, and a few more;
Nucleo Expansion Boards (optional).
Apprenez à utiliser et programmer le microcontrôleur ESP32 en MicroPython dans vos futurs projets !
Ce livre (en anglais) de projets par Dogan Ibrahim, auteur populaire de livres Elektor contient de nombreux projets logiciels et matériels spécialement développés pour le kit de développement ESP32 de MakePython. Le kit est livré avec plusieurs LED, capteurs et actionneurs. Le kit vous aidera à acquérir les connaissances de base pour créer des projets IdO.
Les projets testés dans le livre sont basés sur les composants fournis. Chaque projet est décrit par un schéma fonctionnel, un schéma de circuit, un listage complet ainsi qu’une description détaillée du programme.
Contenu du kit
1x Carte de développement MakePython ESP32 avec LCD
1x Module de mesure à ultrasons
1x Capteur de température et d'humidité
1x Module buzzer
1x Module DS18B20
1x Module infrarouge
1x Potentiomètre
1x Module WS2812
1x Capteur de son
1x Capteur de vibrations
1x Module de résistance photosensible
1x Capteur de pouls
1x Servomoteur
1x Câble USB
2x Bouton
2x Plaque d'essai
45x Fils de connexion
10x résistances 330R
10x LED (Rouges)
10x LED (Verts)
1x Livre de projets (en anglais, 206 pages)
46 projets dans le livres
Projets à LED
LED clignotante
SOS clignotant
LED clignotante – utilisation d'un timer
LED clignotantes en alternance
Contrôle des boutons
Modification de la fréquence de clignotement des LED à l'aide d'interruptions de boutons-poussoirs
LED de poursuite
Compteur binaire à LED
Lumières de Noël (8 LEDs clignotant de façon aléatoire)
Dés électronique
Jour de chance de la semaine
Projets de modulation de la largeur d'impulsion (PWM)
Génération d'une forme d'onde PWM de 1000 Hz avec un rapport cyclique de 50%
Contrôle de la luminosité des LED
Mesures de la fréquence et du rapport cyclique d'une forme d'onde PWM
Compositeur de mélodies
Orgue électronique simple
Servo motor control
Thermomètre DS18B20 à servomoteur
Projets de convertisseur analogique-numérique (CAN)
Voltmètre
Traçage de la tension d'entrée analogique
Capteur de température interne de l'ESP32
Ohmmètre
Module de résistance photosensible
Projets de convertisseur numérique-analogique (CNA)
Génération de tensions fixes
Génération d'un signal en dents de scie
Génération d'un signal à onde triangulaire
Forme d'onde périodique arbitraire
Génération d'un signal sinusoïdal
Génération d'un signal sinusoïdal précis au moyen d'interruptions du timer
Utilisation de l'afficheur OLED
Compteur de secondes
Compteur d'événements
Thermomètre numérique à base d'OLED DS18B20
Contrôleur de température ON-OFF
Mesure de la température et de l'humidité
Mesure de la distance par ultrasons
Taille d'une personne (stadiomètre)
Mesure de la fréquence cardiaque (pouls)
Autres capteurs fournis dans le kit
Alarme antivol
Lumière activée par le son
Détection d'obstacles par infrarouge avec buzzer
Anneau de LED RVB WS2812
Horodatage des données de température et d'humidité
Programmation réseau
Scanner Wi-Fi
Contrôle à distance depuis le navigateur Internet (à l'aide d'un smartphone ou d'un PC) – Serveur Web
Stockage des données de température et d'humidité dans le cloud
Fonctionnement à faible puissance
Utilisation d'un timer pour activer le processeur
With Examples for Arduino UNO, Raspberry Pi Pico and ESP32
Programming small electronic systems has never been more accessible. Tasks that once demanded expensive tools, specialized hardware, and deep electrical engineering expertise can now be tackled with low-cost development boards and approachable software. At the centre of this shift is the Arduino environment, which provides a unified and familiar way to program a wide range of microcontroller platforms—from classic AVR boards like the Arduino UNO to modern ARM-based boards such as the Raspberry Pi Pico, and powerful Wi-Fi-enabled devices like the ESP32.
This book introduces embedded programming through the core idea that defines all microcontrollers: reading inputs, processing information, and controlling outputs in a predictable loop. The Arduino environment abstracts much of the hardware complexity, allowing you to focus on behaviour rather than implementation details. With just a few lines of code, you can blink LEDs, read sensors, control motors, and communicate with other devices.
While the Arduino UNO, Raspberry Pi Pico, and ESP32 boards differ greatly in performance and features, they share the same fundamental building blocks: digital and analog I/O, timers, serial communication, PWM, interrupts, and power management. Learning these concepts within the Arduino framework builds skills that transfer easily across platforms and scale toward more advanced applications.
By exploring multiple boards while maintaining a consistent programming approach, this book helps you progress from simple experiments to confidently produce well-structured designs—showing that embedded development can be both practical and enjoyable.
Kick off with the MAX1000 and VHDPlus
Ready to Master FPGA Programming? In this guide, we’re diving into the world of Field Programmable Gate Arrays (FPGAs) – a configurable integrated circuit that can be programmed after manufacturing. Imagine bringing your ideas to life, from simple projects to complete microcontroller systems!
Meet the MAX1000: a compact and budget-friendly FPGA development board packed with features like memory, user LEDs, push-buttons, and flexible I/O ports. It’s the ideal starting point for anyone wanting to learn about FPGAs and Hardware Description Languages (HDLs).
In this book, you’ll get hands-on with the VHDPlus programming language – a simpler version of VHDL. We’ll work on practical projects using the MAX1000, helping you gain the skills and confidence to unleash your creativity.
Get ready for an exciting journey! You’ll explore a variety of projects that highlight the true power of FPGAs. Let’s turn your ideas into reality and embark on your FPGA adventure – your journey starts now!
Exciting Projects You’ll Find in This Book
Arduino-Driven BCD to 7-Segment Display Decoder
Use an Arduino Uno R4 to supply BCD data to the decoder, counting from 0 to 9 with a one-second delay
Multiplexed 4-Digit Event Counter
Create an event counter that displays the total count on a 4-digit display, incrementing with each button press
PWM Waveform with Fixed Duty Cycle
Generate a PWM waveform at 1 kHz with a fixed duty cycle of 50%
Ultrasonic Distance Measurement
Measure distances using an ultrasonic sensor, displaying the results on a 4-digit 7-segment LED
Electronic Lock
Build a simple electronic lock using combinational logic gates with push buttons and an LED output
Temperature Sensor
Monitor ambient temperature with a TMP36 sensor and display the readings on a 7-segment LED
Téléchargements
Software
Mikrocontroller haben sich in den letzten Jahren in praktisch allen Bereichen der modernen Technik etabliert. In zunehmendem Maße dringen sie auch in die Gebiete der Künstlichen Intelligenz und der Robotertechnik vor. Das vorliegende Buch gibt eine umfassende Einführung in die Welt der Controller-Technik mit all ihren Facetten, von der einfachen Steuerung über die Sensor-Technik bis hin zur Datenübertragung in das Internet.
Als Basis dafür dient das von Elektor entwickelte AVR-Playground-Board. Das Board kann mit Controllern der ATmega-Familie bestückt werden und ist mit dem bekannten Arduino-System kompatibel, so dass auch die verschiedenen Arduino-Hardware-Erweiterungen verwendet werden können.
Für die Programmierung kommt die Sprache „C“ zum Einsatz. Auch hier wird im Buch auf das Arduino-System zurückgegriffen. Die frei verfügbare Arduino-Entwicklungsumgebung erlaubt den leichten Einstieg, ohne dass später Einschränkungen in Kauf genommen werden müssen. Die Hardware-nahe Programmierung steht dabei besonders im Fokus. Nach der Erläuterung von grundlegenden Anwendungen wird auf die anspruchsvolleren Themen wie Interrupts, Timer und Counter, Pulsweitenmodulation und Analog-Digital-Wandlung eingegangen.
Praktische Anwendungen können sowohl mit einem Arduino als auch mit dem AVR-Playground-Board durchgeführt werden. Da das AVR-Playground-Board bereits über eine Vielzahl von Peripherie-Einheiten verfügt, sind nur noch wenige externe Bauteile erforderlich. Das Board kann im Elektor-Shop hier bezogen werden.
Programmierung in Assembler und C am Beispiel der ATtiny-Familie
Dieses Buch bietet einen eingehenden Blick auf die 8-Bit-AVR-Architektur in ATtiny- und ATmega-Mikrocontrollern, hauptsächlich aus der Sicht der Software und der Programmierung. Erforschen Sie die AVR-Architektur unter Verwendung von C und Assembler in Microchip Studio (früher Atmel Studio) mit ATtiny-Mikrocontrollern.
Lernen Sie die Details der internen Funktionsweise von AVR-Mikrocontrollern kennen, einschließlich der internen Register und des Speicherplans von ATtiny-Bausteinen.
Programmieren Sie ATtiny-Mikrocontroller mit einem Atmel-ICE-Programmiergerät/Debugger oder verwenden Sie ein preiswertes Hobby-Programmiergerät oder sogar einen Arduino Uno als Programmiergerät.
Die meisten Code-Beispiele können mit dem Microchip Studio AVR-Simulator ausgeführt werden.
Lernen Sie, Programme für ATtiny-Mikrocontroller in Assembler zu schreiben.
Erfahren Sie, wie Assemblersprache in Maschinencodebefehle umgewandelt wird.
Finden Sie heraus, wie Programme, die in der Programmiersprache C geschrieben wurden, in Assemblersprache und schließlich in Maschinencode umgewandelt werden.
Verwenden Sie den Microchip Studio Debugger in Kombination mit einem Hardware-USB-Programmierer/Debugger, um Assembler- und C-Programme zu testen oder verwenden Sie den Microchip Studio AVR-Simulator.
ATtiny-Mikrocontroller im DIP-Gehäuse werden verwendet, um eine einfache Nutzung auf Breadboards zu ermöglichen.
Erfahren Sie mehr über Timing und Taktimpuls in AVR-Mikrocontrollern mit ATtiny-Bausteinen.
Werden Sie zu einem AVR-Experten mit fortgeschrittenen Debugging- und Programmierfähigkeiten.
Modular and Scalable Control Systems Using Structured Text
This book offers a structured and practical approach to modern PLC development using object-oriented principles. It is a guide for engineers, programmers, and students seeking to harness the power of object-oriented programming (OOP) in the context of industrial automation with PLCs.
The content focuses on the CODESYS development environment and Structured Text (ST), both of which support modern programming techniques while maintaining compatibility with real-time automation requirements. Through step-by-step demos and instructional examples, it demonstrates how modular, reusable code can enhance development efficiency, simplify ongoing maintenance, and enable scalable and flexible control system architectures.
Key topics include:
Structured Text fundamentals: conditions, loops, arrays, and functions
Object-oriented concepts: classes, methods, and inheritance
Advanced techniques: polymorphism, interfaces, and access control
Modular design with reusable components and structured program flow
Implementation of finite state machines and scalable application design
Built around instructional demos and clear explanations, this book helps readers develop maintainable and modern control software in the CODESYS environment using proven programming techniques.
Modular and Scalable Control Systems Using Structured Text
This book offers a structured and practical approach to modern PLC development using object-oriented principles. It is a guide for engineers, programmers, and students seeking to harness the power of object-oriented programming (OOP) in the context of industrial automation with PLCs.
The content focuses on the CODESYS development environment and Structured Text (ST), both of which support modern programming techniques while maintaining compatibility with real-time automation requirements. Through step-by-step demos and instructional examples, it demonstrates how modular, reusable code can enhance development efficiency, simplify ongoing maintenance, and enable scalable and flexible control system architectures.
Key topics include:
Structured Text fundamentals: conditions, loops, arrays, and functions
Object-oriented concepts: classes, methods, and inheritance
Advanced techniques: polymorphism, interfaces, and access control
Modular design with reusable components and structured program flow
Implementation of finite state machines and scalable application design
Built around instructional demos and clear explanations, this book helps readers develop maintainable and modern control software in the CODESYS environment using proven programming techniques.
Practical Introduction to 3D Modeling from Enclosure to Front Panel
Embedding a vintage component, creating a professional looking home for a circuit board, or even designing a complex apparatus complete with a chassis – these and many other challenges turn into a stimulating pleasure with FreeCAD. Once you have internalized the basic processes, there are virtually no limits to your imagination.
Starting to use a new software is never straightforward – especially with a tool as versatile as FreeCAD. Manageable, but at the same time easily usable individual components provide the starting point in this book. Putting these components together later results in assemblies.
In the FreeCAD universe, a workable trajectory is demonstrated. The described procedure is illustrative so the examples are easily applied to custom tasks. The devices were made by the author and illustrated with photos.
Creating a 3D design is requiring some effort but the initial investment pays off soon. Besides the impressive spatial representation of the projects, the extracted drawings yield a solid base for documentation and production. Extended FreeCAD capabilities like the unfolding of sheet metal parts enormously add to efficiency and pushes models forward into practical assembly.
Soon you will definitely not want to do without FreeCAD!