Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/owainm713/AD9833-MicroPython-Module
Micropython module to use the AD9833 programable waveform generator
https://github.com/owainm713/AD9833-MicroPython-Module
ad9833 micropython raspberry-pi-pico
Last synced: 3 months ago
JSON representation
Micropython module to use the AD9833 programable waveform generator
- Host: GitHub
- URL: https://github.com/owainm713/AD9833-MicroPython-Module
- Owner: owainm713
- License: gpl-3.0
- Created: 2023-06-17T17:41:50.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-06-17T17:49:12.000Z (over 1 year ago)
- Last Synced: 2024-04-30T06:32:12.324Z (6 months ago)
- Topics: ad9833, micropython, raspberry-pi-pico
- Language: Python
- Homepage:
- Size: 17.6 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-micropython - AD9833-MicroPython-Module - MicroPython module to use the AD9833 programable waveform generator. (Libraries / IO)
README
# AD9833-MicroPython/Python-Module
MicroPython/Python module to use with the AD9833 programable waveform generator. Testing done with a AD9833 breakout
board off of Amazon and a Raspberry Pi Pico microcontroller for MicroPython and a Raspberry Pi3 for Python.SPI requires py-spidev and python-dev modules for Python version.
SPI connections to the AD9833 board from the Pi Pico are as follows:
- Pico 3.3V to AD9833 Vin
- Pico Gnd to AD9833 DGND
- Pico IO2 SCLK to AD9833 SCLK
- Pico IO3 to AD9833 SDATA
- Pico IO1 to AD9833 FSynchSPI connections to the AD9833 board from the Pi 3 are as follows:
- Pi 3.3V to AD9833 Vin
- Pi Gnd to AD9833 DGND
- Pi SCLK to AD9833 SCLK
- Pi MOSI to AD9833 SDATA
- Pi CE0 or CE1 to AD9833 FSynchCurrent functions include:
- set_frequency(fout, freqSelect) - function to set output frequencies (fout). Range 0 to 12.5MHz. Sets either the FREQ0 or FREQ1 registers - freqSelect 0 or 1.
- set_phase(pout, phaseSelect, rads = True) - function to set output phase (pout) in either degrees or radians. Sets either the PHASE0 or PHASE1 registers - phaseSelect 0 or 1.
- set_mode(mode = 'SIN') - function to output waveform shape. Valid values are; 'RESET','OFF','SIN','TRIANGLE','SQUARE','SQUARE/2
- set_write_mode(writeMode = 'BOTH') - function to set how data is written to the frequency registers. Values values are; 'BOTH','MSB' and 'LSB'
- select_freq_phase(FS, PS) - function to set which frequency and phase register values are used to set the output. FS & PS both can be either 0 or 1
- set_control_reg(B28 = 1, HLB = 0, FS = 0, PS = 0, RESET = 0, SLP1 = 0, SLP12 = 0, OP= 0, DIV2 = 0, MODE = 0) - function to set the individual bits of the control register.See example file for sample usage.
Created Jun 12, 2023
Modified Jun 12, 2023