https://github.com/nopnop2002/esp-idf-x9c103
Three-Wire Digitally Controlled Potentiometer driver for ESP-IDF
https://github.com/nopnop2002/esp-idf-x9c103
digital-potentiometer dpot esp-idf esp32 x9c103 x9c104 x9c503 x9x102
Last synced: 3 months ago
JSON representation
Three-Wire Digitally Controlled Potentiometer driver for ESP-IDF
- Host: GitHub
- URL: https://github.com/nopnop2002/esp-idf-x9c103
- Owner: nopnop2002
- License: mit
- Created: 2022-01-12T00:54:30.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-09T02:06:00.000Z (5 months ago)
- Last Synced: 2025-02-28T19:53:13.889Z (3 months ago)
- Topics: digital-potentiometer, dpot, esp-idf, esp32, x9c103, x9c104, x9c503, x9x102
- Language: C
- Homepage:
- Size: 15.6 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# esp-idf-x9c103
Three-Wire Digitally Controlled Potentiometer driver for ESP-IDF.ESP32 has two 8-bit DAC (digital to analog converter) channels, connected to GPIO25 (Channel 1) and GPIO26 (Channel 2).
ESP32S2 has two 8-bit DAC (digital to analog converter) channels, connected to GPIO17 (Channel 1) and GPIO18 (Channel 2).
However, the maximum voltage is up to VDD.
If you control a voltage up to 5V, you can use this.And ESP32S3/ESP32Cx core does not have a DAC function.
- X9C102 = 1kOhms
- X9C103 = 10kOhms
- X9C503 = 50kOhms
- X9C104 = 100kOhmsI ported from [here](https://github.com/lucyamy/LapX9C10X).
# Installation
```Shell
git clone https://github.com/nopnop2002/esp-idf-x9c103
cd esp-idf-x9c103
idf.py menuconfig
idf.py flash
```# Configuration


# Wirering
|Circuit|X9C||ESP32|ESP32-S2/S3|ESP32-C2/C3/C6/H2|
|:-:|:-:|:-:|:-:|:-:|:-:|
||INC|--|GPIO33|GPIO38|GPIO3|
||U/D|--|GPIO32|GPIO33|GPIO4|
|High terminals|Vh/Rh|--||||
||Vss|--|GND|GND|GND|
|Wiper terminals|Vw/Rw|--||||
|Low terminals|Vl/Rl|--||||
||CS|--|GPIO5|GPIO34|GPIO5|
||Vcc|--|5V|5V|5V|__You can change it to any pin using menuconfig.__
If you connect to Low terminals = Gnd and High terminals = 5V, 0 to 5V is output to Wiper terminals in 99 steps.
# Typical circuit

# API
See [here](https://github.com/lucyamy/LapX9C10X).# Reference
https://github.com/nopnop2002/esp-idf-mcp41010