The GP8XXX Python module offers an intuitive interface for controlling DAC (Digital to Analog Converter) devices via the I2C protocol. With support for various DAC models.
Project description
GP8XXX-IIC
The GP8XXX-IIC module provides an interface for controlling DAC (Digital to Analog Converter) devices over the I2C protocol. This module supports various DAC models with different resolutions and output voltage ranges.
Features
- I2C Communication: Utilizes the smbus2 library for communicating with DAC devices over the I2C bus.
- Output Ranges: Supports different output voltage ranges including 0-5V, 0-10V.
- Support Multiple DAC Models:
- GP8503: 12-bit DAC Dual Channel I2C to 0-2.5V/0-VCC
- GP8211S: 15-bit DAC I2C to 0-5V/0-10V
- GP8512: 15-bit DAC I2C to 0-2.5V/0-VCC
- GP8413: 15-bit DAC Dual Channel I2C to 0-10V
- GP8403: 12-bit DAC Dual Channel I2C to 0-5V/0-10V
- GP8302: 12-bit DAC Dual Channel I2C to 0-5V/0-10V
Installation
You can install the GP8XXX module from PyPI using pip:
pip install GP8XXX-IIC
Example
import time
from GP8XXX_IIC import GP8403
GP8403 = GP8403(i2c_addr=0x5F, auto_range=True)
while GP8403.begin():
print("init error")
time.sleep(1)
# Optional because GP8403 support auto_range
# GP8403.set_dac_outrange(GP8403.OUTPUT_RANGE_10V)
# Chanel 1: 6.721V ≙ 6721
GP8403.set_dac_out_voltage(voltage=6721, channel=0)
time.sleep(3)
# Chanel 2: 2.774V ≙ 2774
GP8403.set_dac_out_voltage(voltage=2774, channel=1)
time.sleep(3)
# Chanel 1 & 2: 1.253V ≙ 1253
GP8403.set_dac_out_voltage(voltage=1253, channel=2)
Tested devices
| DAC Module | Tested |
|---|---|
| GP8503 | ❌ |
| GP8211S | ❌ |
| GP8512 | ❌ |
| GP8512 | ❌ |
| GP8413 | ❌ |
| GP8403 | ✅ |
| GP8302 | ❌ |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file GP8XXX_IIC-0.0.1.tar.gz.
File metadata
- Download URL: GP8XXX_IIC-0.0.1.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10dd4a4ed4e636dee4cbfa576514dcf14c6406149f2092a7345f1fc061e3965b
|
|
| MD5 |
9498a8fe573f61867b1740eeddd3a529
|
|
| BLAKE2b-256 |
1beccc83d056fe49aa8c141e99d07eb9b898e5e80f55db7189f31c736b647b26
|
File details
Details for the file GP8XXX_IIC-0.0.1-py3-none-any.whl.
File metadata
- Download URL: GP8XXX_IIC-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2bdd0c89e520d445c5710d5823445906205fcf74fc2ad3f9b28926dcfd2b71ce
|
|
| MD5 |
749bf451e0a5809064452fec52a7f1fd
|
|
| BLAKE2b-256 |
3d0dcd8cff899223a2bf3ca4442120117b935ceab7d8b2aa0df1a011745d47a8
|