# 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:
```bash
pip install GP8XXX-IIC
```
## Example
```python
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 | ❌ |
Raw data
{
"_id": null,
"home_page": "https://github.com/joe2824/GP8XXX_IIC/",
"name": "GP8XXX-IIC",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3",
"maintainer_email": null,
"keywords": "Raspberry Pi, Raspi, GP8403, GP8503, GP8211S, GP8512, GP8413, GP8302, DAC",
"author": "Joel Klein",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/5d/c2/69c4376f70e8523a54fc2f6d6588fd23587a24b3f6eba7ec00332731c22e/GP8XXX_IIC-0.0.4.tar.gz",
"platform": null,
"description": "# GP8XXX-IIC\n\nThe 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.\n\n## Features\n\n- **I2C Communication**: Utilizes the smbus2 library for communicating with DAC devices over the I2C bus.\n- **Output Ranges**: Supports different output voltage ranges including 0-5V, 0-10V.\n- **Support Multiple DAC Models**:\n - GP8503: 12-bit DAC Dual Channel I2C to 0-2.5V/0-VCC\n - GP8211S: 15-bit DAC I2C to 0-5V/0-10V\n - GP8512: 15-bit DAC I2C to 0-2.5V/0-VCC\n - GP8413: 15-bit DAC Dual Channel I2C to 0-10V\n - GP8403: 12-bit DAC Dual Channel I2C to 0-5V/0-10V\n - GP8302: 12-bit DAC Dual Channel I2C to 0-5V/0-10V\n\n## Installation\nYou can install the GP8XXX module from PyPI using pip:\n\n```bash\npip install GP8XXX-IIC\n```\n\n## Example\n```python\nimport time\nfrom GP8XXX_IIC import GP8403\n\nGP8403 = GP8403(i2c_addr=0x5F, auto_range=True)\n\nwhile GP8403.begin():\n print(\"init error\")\n time.sleep(1)\n\n# Optional\n# GP8403.set_dac_outrange(GP8403.OUTPUT_RANGE_10V)\n\n# Chanel 1: 6.721V\nGP8403.set_dac_out_voltage(voltage=6.821, channel=0)\n\ntime.sleep(3)\n\n# Chanel 2: 2.774V\nGP8403.set_dac_out_voltage(voltage=2.774, channel=1)\n\ntime.sleep(3)\n\n# Chanel 1 & 2: 0.253V\nGP8403.set_dac_out_voltage(voltage=0.253, channel=2)\n```\n\n## Tested devices\n\n| DAC Module | Tested |\n|------------|--------|\n|GP8503 | \u274c |\n|GP8211S | \u274c |\n|GP8512 | \u274c |\n|GP8512 | \u274c |\n|GP8413 | \u274c |\n|GP8403 | \u2705 |\n|GP8302 | \u274c |\n\n",
"bugtrack_url": null,
"license": null,
"summary": "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.",
"version": "0.0.4",
"project_urls": {
"Bug Tracker": "https://github.com/joe2824/GP8XXX_IIC/issues",
"Github": "https://github.com/joe2824/GP8XXX_IIC/",
"Homepage": "https://github.com/joe2824/GP8XXX_IIC/"
},
"split_keywords": [
"raspberry pi",
" raspi",
" gp8403",
" gp8503",
" gp8211s",
" gp8512",
" gp8413",
" gp8302",
" dac"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e2448d1eb063096ef60facabc330fdec18f2aed4203e9e885de17e3e01fbbe79",
"md5": "bc33ebe31f5f5aeeee00a39d7b42e86c",
"sha256": "228dfb0342f26edf091866763c1223a645f00509137f79e8e75f0a5b2f7e427a"
},
"downloads": -1,
"filename": "GP8XXX_IIC-0.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bc33ebe31f5f5aeeee00a39d7b42e86c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3",
"size": 4937,
"upload_time": "2024-04-14T19:47:03",
"upload_time_iso_8601": "2024-04-14T19:47:03.410760Z",
"url": "https://files.pythonhosted.org/packages/e2/44/8d1eb063096ef60facabc330fdec18f2aed4203e9e885de17e3e01fbbe79/GP8XXX_IIC-0.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5dc269c4376f70e8523a54fc2f6d6588fd23587a24b3f6eba7ec00332731c22e",
"md5": "d8d86c63365775682209dd3275cf5a15",
"sha256": "7d84bedaa1303565b91f91a3e852c63ffa2bb59167e3531bfa35a98d738b52a2"
},
"downloads": -1,
"filename": "GP8XXX_IIC-0.0.4.tar.gz",
"has_sig": false,
"md5_digest": "d8d86c63365775682209dd3275cf5a15",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3",
"size": 3966,
"upload_time": "2024-04-14T19:47:04",
"upload_time_iso_8601": "2024-04-14T19:47:04.978718Z",
"url": "https://files.pythonhosted.org/packages/5d/c2/69c4376f70e8523a54fc2f6d6588fd23587a24b3f6eba7ec00332731c22e/GP8XXX_IIC-0.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-14 19:47:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "joe2824",
"github_project": "GP8XXX_IIC",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "gp8xxx-iic"
}