• Welcome to Andy's Workshop Forums. Please login or sign up.
 
September 19, 2020, 05:06:57 pm

News:

SMF - Just Installed!


Getting started & capacitive touch

Started by sixtyfive, August 03, 2020, 05:29:02 am

Previous topic - Next topic

sixtyfive

Hi all, hi Andy,

for my current project I'm finally taking the plunge and trying to move from the comfortable garden that is the Arduino/PlatformIO world to try and learn to "properly" program a microcontroller with a less bloated setup. I've always liked your hardware projects, and so now, since the ┬ÁC in question is an STM32F042(K6), I'm wondering if the same will be true for your software, projects, too, and if stm32plus would be a good trail to start wandering down.

So far I've only spent time reading various of your blog articles and browsing the forums to get an idea how to set up a toolchain in Linux. The one thing that truly scares me, though, is: how will I get what ST call "touch sensing control" to work (the project requires 4 simple buttons - a binary "touched" or "not touched" is enough, though)? There's AN5105, which has pretty scary-looking code in it, and then there's an Arduino library called ADCTouchSensor which has quite readable code but looks as if it's specifically not using the hardware's built-in touch controller.

Looking at the stm32plus sources I'm wondering if there's no direct support for capacitive touch sensing but perhaps it could be made to work by learning about the registers involved and doing it half-manually?

Cheers
Jonathan