Introduction
CircuitPython library for control of LTC1665 8-bit and LTC1660 10-bit 8 channel DACs from Linear Technologies.
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:
Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle or individual libraries can be installed using circup.
Installing from PyPI
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:
pip3 install creativecontrol-circuitpython-ltc166x
To install system-wide (this may be required in some cases):
sudo pip3 install creativecontrol-circuitpython-ltc166x
To install in a virtual environment in your current project:
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:
pip3 install circup
With circup installed and your CircuitPython device connected use the following command to install:
circup install creativecontrol_circuitpython_ltc166x
Or the following command to update an existing version:
circup update
Usage Example
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.
For information on building library documentation, please check out this guide.
Tutorial
A tutorial on controlling daisy-chained LTC166X DACs can be found on my website creativecontrol.
Contributing
Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.
Metadata
Release files for creativecontrol-circuitpython-ltc166x 1.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| creativecontrol-circuitpython-ltc166x-1.2.3.tar.gz | 28.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| creativecontrol_circuitpython_ltc166x-1.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.2 kB
Release files / creativecontrol-circuitpython-ltc166x-1.2.3.tar.gz
| Download URL | creativecontrol-circuitpython-ltc166x-1.2.3.tar.gz |
|---|---|
| Size | 28.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b2f24864b190d8acb30d86a174061e281dae07db9b582254a6874be81a1f83ee
|
|
BLAKE2b-256 checksum How to use checksums |
b41c758b88d27e81b78477a39d53af9de4d6e5940a40544dd3c0bde03c26005e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / creativecontrol_circuitpython_ltc166x-1.2.3-py3-none-any.whl
| Download URL | creativecontrol_circuitpython_ltc166x-1.2.3-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a936508663fe2948c850a3551ad88c5ae432e181d503e572f9aab5f44de07e79
|
|
BLAKE2b-256 checksum How to use checksums |
2c1cae9715a9fbe8d7290e1b028e9ec8fa469c69f72310b906aac8802f7db9a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for creativecontrol-circuitpython-ltc166x 1.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.