cdc 2.1.0.0
|
CDC Click is a compact add-on board that allows your application do a conversion of capacitance to a digital format. This board features the PCAP04, a capacitance-to-digital converter (CDC) from ScioSense. It also includes an integrated digital signal processor (DSP) for on-chip data post-processing. The converter has high flexibility and allows you to convert grounded capacitors and floating capacitors to a digital format. It has up to 50KHz sampling rate in up to 20-bit resolution.
We provide a library for the CDC Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
This library contains API for CDC Click driver.
cdc_cfg_setup
Config Object Initialization function. cdc_init
Initialization function. cdc_default_cfg
Click Default Configuration function. cdc_write_config
This function writes configuration data starting from the selected config address. cdc_send_opcode
This function sends a desired opcode command byte. cdc_read_results
This function reads all results and status registers. This example demonstrates the use of CDC click board by reading capacitance
measurements from C3/C2 and C5/C4 ports calculated from pure capacitance ratio between those ports and port C1/C0 which is used as external C reference.
The demo application is composed of two sections :
Initializes the driver and performs the click default configuration.
Starts measurement and reads the results. The results data is displayed on the USB UART.
For better accuracy and higher measurement range, add 200pF external
capacitor between C1/C0 ports and set it below as CDC_EXT_CAP_C1_C0_PF macro before running the application. This way you will be able to measure capacitance in range from 1 to 2000pF.
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. UART terminal is available in all MikroElektronika compilers.