Skip to main content

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
# GP8403.set_dac_outrange(GP8403.OUTPUT_RANGE_10V)

# Chanel 1: 6.721V
GP8403.set_dac_out_voltage(voltage=6.821, channel=0)

time.sleep(3)

# Chanel 2: 2.774V
GP8403.set_dac_out_voltage(voltage=2.774, channel=1)

time.sleep(3)

# Chanel 1 & 2: 0.253V
GP8403.set_dac_out_voltage(voltage=0.253, 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

GP8XXX_IIC-0.0.4.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

GP8XXX_IIC-0.0.4-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file GP8XXX_IIC-0.0.4.tar.gz.

File metadata

  • Download URL: GP8XXX_IIC-0.0.4.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.17

File hashes

Hashes for GP8XXX_IIC-0.0.4.tar.gz
Algorithm Hash digest
SHA256 7d84bedaa1303565b91f91a3e852c63ffa2bb59167e3531bfa35a98d738b52a2
MD5 d8d86c63365775682209dd3275cf5a15
BLAKE2b-256 5dc269c4376f70e8523a54fc2f6d6588fd23587a24b3f6eba7ec00332731c22e

See more details on using hashes here.

File details

Details for the file GP8XXX_IIC-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: GP8XXX_IIC-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.17

File hashes

Hashes for GP8XXX_IIC-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 228dfb0342f26edf091866763c1223a645f00509137f79e8e75f0a5b2f7e427a
MD5 bc33ebe31f5f5aeeee00a39d7b42e86c
BLAKE2b-256 e2448d1eb063096ef60facabc330fdec18f2aed4203e9e885de17e3e01fbbe79

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page