Hello, I am trying to communicate with DAC8004 using SPI and thonny micropython.
from the manufacturer manual the periphery is pins 12-15.
However when i try to run the following code of the manual, I get an error shown below that says thatI have a problem in the SPI command.
Where did i go wrong implementing this command?
Thanks.
ERROR:
Traceback (most recent call last):
File "<stdin>", line 10, in <module>
ValueError:
>>>
https://docs.micropython.org/en/latest/esp8266/quickref.html#hardware-spi-bus
https://www.espressif.com/sites/default/files/documentation/0a-esp8266ex_datasheet_en.pdf


from the manufacturer manual the periphery is pins 12-15.
However when i try to run the following code of the manual, I get an error shown below that says thatI have a problem in the SPI command.
Where did i go wrong implementing this command?
Thanks.
Code:
import machine
from machine import SPI, Pin
from machine import Pin
from time import sleep
cs=machine.Pin(15,machine.Pin.OUT)
spi=machine.SPI(0,baudrate=1000000,polarity=0,phase=0,bits=8,firstbit=machine.SPI.MSB,
sck=machine.Pin(14),
mosi=machine.Pin(13),
miso=machine.Pin(12))
Traceback (most recent call last):
File "<stdin>", line 10, in <module>
ValueError:
>>>
https://docs.micropython.org/en/latest/esp8266/quickref.html#hardware-spi-bus
https://www.espressif.com/sites/default/files/documentation/0a-esp8266ex_datasheet_en.pdf


