MQS output from SD card

Status
Not open for further replies.
I'm trying play WAV file from SD card. I connect SD to SPI2 (CS pin 36). There are 2 dinamics on 10 and 12 pins (left and right channels). But working left channel only.
 

Attachments

  • WavFilePlayer.ino
    3.6 KB · Views: 65
I guess you confused left and right?
10 is the right channel.
12 does not work, because it is MISO from SPI

As far I know there is no way to fix that - other than just not to use SPI. The T4 has a by far better port, where you connected CS. Connect the sd-socket there (with all pins)
 
Please post the connections in more detail - are you using a Teensy 4.0 ? Or 4.1? To which pins is the SD Slot connected? Post all connected pins.
Also, which Teensyduino-version?
 
Teensy 4.0
Teensyduino v1.54

CS - pin 36
MISO - pin 34
MOSI - pin 35
SCK - pin 37
These pins connected to SD card.

I using audio amplifier "arduino module amplifier PAM8403 mini 5V 2x3W". It connected to 10 and 12 pins.
There is sound from pin 12. Pin 10 don't work, no sound.
 
Sorry, I have no Idea how can hear any sound anywhere, and I don't know how the SD libary automagically uses SPI2. Perhaps I'm not up to date regarding the new SD Library. From my understanding nothing should work.
For SDIO you need _all_pins on the backside (4-bit parallel transfer), but you don't use it anyway, because you use CS=36.

So, I hope some else can answer your question.

You have pinMode(10,OUTPUT); (!<-- remove that!) , too - this stops any mqs on pin 10 - but it does not matter, because the program should stop before that...and print the error message. So, it's over my head.

@Others: Does the SD Library automatically use SPI2 ??
 
Okay.. seems the new lib is smart ..:)

But I don't know why MQSR does not work after removing pinMode. It should.
 
Yup... but i could not find the exact problem so far.. :) Please post that in the current 1.55 beta thread. It really seems to be a bug, that needs to be fixed.
 
Status
Not open for further replies.
Back
Top