D1 Mini & VS1053b

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
SIGTERM
Posts: 2
Joined: Sun Mar 22, 2020 9:23 pm

D1 Mini & VS1053b

Post by SIGTERM » Sun Mar 22, 2020 9:31 pm

Hi folks,

my name is Chris and i try to get some sound out of an esp8266 with vs1053b.
I wired it as i think is correct ......so my code runs, but when i read from SPI, i always get FFFFFFFF. As well as it doesn't play a tone.
I tried to port the vs1053 adafruit circuitpy module (https://github.com/adafruit/Adafruit_Ci ... hon_VS1053).

What am i doing wrong?

init is:
self._xcs = Pin(xcs, Pin.OUT)
self._xdcs = Pin(xdcs, Pin.OUT)
self._dreq = Pin(dreq, Pin.IN)
self._spi = SPI(1, baudrate=_COMMAND_BAUDRATE, polarity=0, phase=0 )

reading :
self._SCI_SPI_BUFFER[0] = _VS1053_SCI_READ
self._SCI_SPI_BUFFER[1] = address & 0xFF
self._spi.init(baudrate=_COMMAND_BAUDRATE)
self._spi.write(self._SCI_SPI_BUFFER)
self._spi.readinto(self._SCI_SPI_BUFFER)

Regards,
Chris

User avatar
jimmo
Posts: 1381
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: D1 Mini & VS1053b

Post by jimmo » Mon Mar 23, 2020 12:30 am

Hi,

I don't see anywhere in your code where you're using the self._xcs pin (which I assume is your chip select). I'd expect to see it being set low before the operation, then high afterwards. (Chip select is generally active low).

(Similarly with _xdcs (not sure what that is? is it a Data/Command pin?)

SIGTERM
Posts: 2
Joined: Sun Mar 22, 2020 9:23 pm

Re: D1 Mini & VS1053b

Post by SIGTERM » Mon Mar 23, 2020 5:08 pm

Ok...you're right....i left out that part:
self._xdcs(0)
self._xcs(0)

i tried that in all variants.......just before and after operations.

oh...according to https://cdn.sparkfun.com/datasheets/Dev ... S1053B.pdf xdcs is "Data chip select / byte sync" .
Or in the SDI description it's "data interface chip select"....

Post Reply