Skip to content

STM32 Access Multiple Buttons Through One Pin Uisng ADC and DMA With Software Debounce algorithm

Notifications You must be signed in to change notification settings

UsefulElectronics/stm32-soft-debounce-adc-buttons-read

Repository files navigation

Build Status

Sponsor

PCBWay

Tutorial Series Sponsor PCBWay Website. You can get extra free coupons using the link below:

Techniques of Programming STM32 with least pin-count possible



STM32 Access Multiple Buttons Through One Pin With Software Debounce

A micro-controller can read the status of several buttons using only one pin using ADC with the help of a simple voltage divider circuit. The most effective way of doing digital read is to perform it using DMA, which will let the CPU not get busy while sampling the read voltage level continuously. This piece of code shows uses one of the algorithms used to debouce buttons by the software while trying to read them.

Circuit Diagram


Electronic Piano

The project has been developed to include more buttons and a buzzer that can play musical notes by pressing the buttons. Circuit Diagram


Menu Button

STM32 micro controller is used to implement the algorithm used to trigger several different events, which are single press, double press and held pressed, form one single push button is explained with the necessary measurements that the code is based on. Circuit Diagram


PCF8574 Pin Expander

STM32 MCU is used to interface PCF8574 Pin Expander over I2C to control 8 LED sound level indicator using only 2 pins. Both hardware and software are explained in details. All tutorial materials are shared in the GitHub Repository. Circuit Diagram


About

STM32 Access Multiple Buttons Through One Pin Uisng ADC and DMA With Software Debounce algorithm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published