Closed swaldtmann closed 3 years ago
Sorry for late response.
First of all, ad9850.py (line: 70) was modified. Please git pull again.
For AD9850, please upload following files to ESP32:
ad98xx.py
ad9850.py
interfaces.py
register.py
peripherals.py
shift_register.py
Those files are in this repository and here.
Four pins will be needed: 15, 14, 13, 4, as stated in following code example.
Then try following:
import ad9850
import peripherals
from shift_register import ShiftRegister
_ss = peripherals.Pin.get_uPy_pin(15, output = True)
_clk = peripherals.Pin.get_uPy_pin(14, output = True)
_data = peripherals.Pin.get_uPy_pin(13, output = True)
_spi = ShiftRegister(stb_pin = _ss, clk_pin = _clk, data_pin = _data, lsbfirst = True, polarity = 1)
bus = peripherals.SPI(_spi, _ss)
_reset = peripherals.Pin.get_uPy_pin(4, output = True)
ad = ad9850.AD9850(bus = bus, pin_reset = _reset)
ad.reset()
ad.set_frequency(10.2e6)
Regards !
Greetings!
Thank you for your response. Delay is not a problem at all. I appreciate your effort to help me with my hobby :-)
I struggled with line 70 in ad9850.py and found the same fix ;-)
Thank you for the pin assignment! Works great!
Best regards!
Greetings! I am trying to rebuild your setup with a ESP32 board and a HC-SR08 (ad9850).
Having a hard time to find out the correct pins and the according micropython settings.
Actually I would like to have correct pins and code for this section:
for a ad9850 on a esp32
Any help is very much appreciated!
Best Regards!