sciosense / pcap04-sample-code

Sample code for PCap04, a capacitance-to-digital converter (CDC).
MIT License
4 stars 1 forks source link

ScioSense PCap04 STM32L476RG Library

STM32L476RG library for the PCap04 Capacitance to Digital Converter.

PCap04 is a capacitance-to-digital converter (CDC) with integrated digital signal processor (DSP) for on-chip data post-processing. Its front end is based on the PICOCAP principle. The PCap04 converter produced by ScioSense. It comes in the smallest size QFN24 package with digital I2C and SPI interfaces. This enables new use cases in Position sensors, Pressure sensors , Force sensors, Proximity sensors, Acceleration sensors, Inclination sensors, Humidity sensors, Dewpoint sensors, Tilt sensors, Angle sensors, Wireless applications.

Links

Prerequisites

It is assumed that

You might need to add your board to the STM32CubeIDE. This library was tested with the STM32 Nucleo-64 development board with STM32L476RG MCU. For the installation of the STM32L476RG in the STM32CubeIDE, see STM32L476RG Installation

Installation

Manual installation

Wiring

General

Please make sure that you use the correct supply voltage:

Example with STM32L476RG (I2C)

This example shows how to wire a NUCLEO-L476RG with the PCap04 breakout board for I2C communication.

PCap04 breakout board STM32L476RG
VDD 3V3
GND GND
IIC_EN 3V3
I2C1_SDA PB7
I2C1_SCL PB8
INTN PA9

Example with STM32L476RG (SPI)

This example shows how to wire a NUCLEO-L476RG with the PCap04 breakout board for SPI communication.

PCap04 breakout board STM32L476RG
VDD 3V3
GND GND
IIC_EN GND
SPI1_SCK PA5
SPI1_MISO PA6
SPI1_MOSI PA7
SPI1_SSN PB6
INTN PA9

Interrupt functionality

To use the PCap04's interrupt functionality connect the interrupt pin of the PCap04 to a GPIO pin of your STM32L476RG. The interrupt pin uses VDD.

Build an example

To build a sample code

Contributing

Contributions in the form of issue opening or creating pull requests are very welcome!