Introduction
============
.. image:: https://img.shields.io/discord/327254708534116352.svg
:target: https://adafru.it/discord
:alt: Discord
.. image:: https://github.com/creativecontrol/creativecontrol_CircuitPython_LTC166X/actions/workflows/build.yml/badge.svg
:target: https://github.com/creativecontrol/creativecontrol_CircuitPython_LTC166X/actions/workflows/build.yml
:alt: Build Status
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
:alt: Code Style: Black
=================================
CircuitPython library for control of LTC1665 8-bit and LTC1660 10-bit 8 channel DACs from Linear Technologies.
`LTC166X datasheet <https://www.analog.com/media/en/technical-documentation/data-sheets/166560fa.pdf>`_
Multiple LTC1665/LTC1660’s can be controlled from a single 3-wire serial port (i.e., SCK, DIN and CS/LD) by
using the included “daisy-chain” facility. A series of *n* chips is configured by connecting each DOUT (except the
last) to DIN of the next chip, forming a single 16n-bit shift register. The SCK and CS/LD signals are common
to all chips in the chain. In use, CS/LD is held low while *n* 16-bit words are clocked to DIN of the first chip; CS/LD
is then pulled high, updating all of them simultaneously.
Dependencies
=============
This driver depends on:
* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_
* `Bus Device <https://github.com/adafruit/Adafruit_CircuitPython_BusDevice>`_
Please ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloading
`the Adafruit library and driver bundle <https://circuitpython.org/libraries>`_
or individual libraries can be installed using
`circup <https://github.com/adafruit/circup>`_.
Installing from PyPI
=====================
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
PyPI <https://pypi.org/project/creativecontrol-circuitpython-ltc166x/>`_.
To install for current user:
.. code-block:: shell
pip3 install creativecontrol-circuitpython-ltc166x
To install system-wide (this may be required in some cases):
.. code-block:: shell
sudo pip3 install creativecontrol-circuitpython-ltc166x
To install in a virtual environment in your current project:
.. code-block:: shell
mkdir project-name && cd project-name
python3 -m venv .venv
source .env/bin/activate
pip3 install creativecontrol-circuitpython-ltc166x
Installing to a Connected CircuitPython Device with Circup
==========================================================
Make sure that you have ``circup`` installed in your Python environment.
Install it with the following command if necessary:
.. code-block:: shell
pip3 install circup
With ``circup`` installed and your CircuitPython device connected use the
following command to install:
.. code-block:: shell
circup install creativecontrol_circuitpython_ltc166x
Or the following command to update an existing version:
.. code-block:: shell
circup update
Usage Example
=============
.. code-block:: shell
import time
import board
import creativecontrol_circuitpython_ltc166x
ltc1665 = creativecontrol_circuitpython_ltc166x.LTC1665(csel=board.GP1, sck=board.GP2, mosi=board.GP3, debug=True)
dac_values = [1, 3, 7, 15, 31, 63, 127, 255]
while True:
print('writing dac values ', time.monotonic())
ltc1665.write_dac_values(dac_values)
time.sleep(4)
print('off')
ltc1665.write_dac_values([0]*8)
time.sleep(4)
Documentation
=============
API documentation for this library can be found on `Read the Docs <https://creativecontrol-circuitpython-ltc166x.readthedocs.io/>`_.
For information on building library documentation, please check out
`this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.
Tutorial
=============
A tutorial on controlling daisy-chained LTC166X DACs can be found on my website `creativecontrol <https://www.creativecontrol.cc/blog/2023/7/7/circuitpython-ltc166x-dac-control-of-daisy-chained-dacs>`_.
Contributing
============
Contributions are welcome! Please read our `Code of Conduct
<https://github.com/creativecontrol/CircuitPython_creativecontrol_CircuitPython_LTC166X/blob/HEAD/CODE_OF_CONDUCT.md>`_
before contributing to help this project stay welcoming.
Raw data
{
"_id": null,
"home_page": "",
"name": "creativecontrol-circuitpython-ltc166x",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "adafruit,blinka,circuitpython,micropython,creativecontrol_circuitpython_ltc166x,LTC1660,LTC1665,DAC",
"author": "",
"author_email": "creativecontrol <t@creativecontrol.cc>",
"download_url": "https://files.pythonhosted.org/packages/b4/1c/758b88d27e81b78477a39d53af9de4d6e5940a40544dd3c0bde03c26005e/creativecontrol-circuitpython-ltc166x-1.2.3.tar.gz",
"platform": null,
"description": "Introduction\n============\n\n\n\n\n.. image:: https://img.shields.io/discord/327254708534116352.svg\n :target: https://adafru.it/discord\n :alt: Discord\n\n\n.. image:: https://github.com/creativecontrol/creativecontrol_CircuitPython_LTC166X/actions/workflows/build.yml/badge.svg\n :target: https://github.com/creativecontrol/creativecontrol_CircuitPython_LTC166X/actions/workflows/build.yml\n :alt: Build Status\n\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/psf/black\n :alt: Code Style: Black\n\n=================================\n\nCircuitPython library for control of LTC1665 8-bit and LTC1660 10-bit 8 channel DACs from Linear Technologies.\n\n`LTC166X datasheet <https://www.analog.com/media/en/technical-documentation/data-sheets/166560fa.pdf>`_\n\nMultiple LTC1665/LTC1660\u2019s can be controlled from a single 3-wire serial port (i.e., SCK, DIN and CS/LD) by\nusing the included \u201cdaisy-chain\u201d facility. A series of *n* chips is configured by connecting each DOUT (except the\nlast) to DIN of the next chip, forming a single 16n-bit shift register. The SCK and CS/LD signals are common\nto all chips in the chain. In use, CS/LD is held low while *n* 16-bit words are clocked to DIN of the first chip; CS/LD\nis then pulled high, updating all of them simultaneously.\n\nDependencies\n=============\nThis driver depends on:\n\n* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_\n* `Bus Device <https://github.com/adafruit/Adafruit_CircuitPython_BusDevice>`_\n\nPlease ensure all dependencies are available on the CircuitPython filesystem.\nThis is easily achieved by downloading\n`the Adafruit library and driver bundle <https://circuitpython.org/libraries>`_\nor individual libraries can be installed using\n`circup <https://github.com/adafruit/circup>`_.\n\nInstalling from PyPI\n=====================\n\nOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from\nPyPI <https://pypi.org/project/creativecontrol-circuitpython-ltc166x/>`_.\nTo install for current user:\n\n.. code-block:: shell\n\n pip3 install creativecontrol-circuitpython-ltc166x\n\nTo install system-wide (this may be required in some cases):\n\n.. code-block:: shell\n\n sudo pip3 install creativecontrol-circuitpython-ltc166x\n\nTo install in a virtual environment in your current project:\n\n.. code-block:: shell\n\n mkdir project-name && cd project-name\n python3 -m venv .venv\n source .env/bin/activate\n pip3 install creativecontrol-circuitpython-ltc166x\n\nInstalling to a Connected CircuitPython Device with Circup\n==========================================================\n\nMake sure that you have ``circup`` installed in your Python environment.\nInstall it with the following command if necessary:\n\n.. code-block:: shell\n\n pip3 install circup\n\nWith ``circup`` installed and your CircuitPython device connected use the\nfollowing command to install:\n\n.. code-block:: shell\n\n circup install creativecontrol_circuitpython_ltc166x\n\nOr the following command to update an existing version:\n\n.. code-block:: shell\n\n circup update\n\nUsage Example\n=============\n\n.. code-block:: shell\n\n import time\n import board\n import creativecontrol_circuitpython_ltc166x\n\n ltc1665 = creativecontrol_circuitpython_ltc166x.LTC1665(csel=board.GP1, sck=board.GP2, mosi=board.GP3, debug=True)\n\n dac_values = [1, 3, 7, 15, 31, 63, 127, 255]\n\n while True:\n print('writing dac values ', time.monotonic())\n ltc1665.write_dac_values(dac_values)\n time.sleep(4)\n print('off')\n ltc1665.write_dac_values([0]*8)\n time.sleep(4)\n\nDocumentation\n=============\n\nAPI documentation for this library can be found on `Read the Docs <https://creativecontrol-circuitpython-ltc166x.readthedocs.io/>`_.\n\nFor information on building library documentation, please check out\n`this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.\n\nTutorial\n=============\n\nA tutorial on controlling daisy-chained LTC166X DACs can be found on my website `creativecontrol <https://www.creativecontrol.cc/blog/2023/7/7/circuitpython-ltc166x-dac-control-of-daisy-chained-dacs>`_.\n\nContributing\n============\n\nContributions are welcome! Please read our `Code of Conduct\n<https://github.com/creativecontrol/CircuitPython_creativecontrol_CircuitPython_LTC166X/blob/HEAD/CODE_OF_CONDUCT.md>`_\nbefore contributing to help this project stay welcoming.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "CircuitPython library for control of LTC166X 8-bit and 10-bit DACs.",
"version": "1.2.3",
"project_urls": {
"Homepage": "https://github.com/creativecontrol/creativecontrol_CircuitPython_LTC166X"
},
"split_keywords": [
"adafruit",
"blinka",
"circuitpython",
"micropython",
"creativecontrol_circuitpython_ltc166x",
"ltc1660",
"ltc1665",
"dac"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2c1cae9715a9fbe8d7290e1b028e9ec8fa469c69f72310b906aac8802f7db9a5",
"md5": "3f02af61d89e7229e893f90162fe8897",
"sha256": "a936508663fe2948c850a3551ad88c5ae432e181d503e572f9aab5f44de07e79"
},
"downloads": -1,
"filename": "creativecontrol_circuitpython_ltc166x-1.2.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3f02af61d89e7229e893f90162fe8897",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6741,
"upload_time": "2023-07-09T18:30:17",
"upload_time_iso_8601": "2023-07-09T18:30:17.424459Z",
"url": "https://files.pythonhosted.org/packages/2c/1c/ae9715a9fbe8d7290e1b028e9ec8fa469c69f72310b906aac8802f7db9a5/creativecontrol_circuitpython_ltc166x-1.2.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b41c758b88d27e81b78477a39d53af9de4d6e5940a40544dd3c0bde03c26005e",
"md5": "1f89ed440e1ab614dedb3269dba8ae98",
"sha256": "b2f24864b190d8acb30d86a174061e281dae07db9b582254a6874be81a1f83ee"
},
"downloads": -1,
"filename": "creativecontrol-circuitpython-ltc166x-1.2.3.tar.gz",
"has_sig": false,
"md5_digest": "1f89ed440e1ab614dedb3269dba8ae98",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 28449,
"upload_time": "2023-07-09T18:30:18",
"upload_time_iso_8601": "2023-07-09T18:30:18.947501Z",
"url": "https://files.pythonhosted.org/packages/b4/1c/758b88d27e81b78477a39d53af9de4d6e5940a40544dd3c0bde03c26005e/creativecontrol-circuitpython-ltc166x-1.2.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-09 18:30:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "creativecontrol",
"github_project": "creativecontrol_CircuitPython_LTC166X",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "Adafruit-Blinka",
"specs": []
},
{
"name": "adafruit-circuitpython-busdevice",
"specs": []
}
],
"lcname": "creativecontrol-circuitpython-ltc166x"
}