I was wondering why the SD Card and DAC have to be on separate SPI buses on the wave shield? Why can't they both be on the same bus with their own /SS pins? This could save 3 I/O and the processing burden of a soft SPI implementation. The DAC datasheet claims to work up to a 20MHz SPI clock, so it should be fine at 8MHz.
What am I missing?
Any thoughts?
Wave Shield - SD and DAC SPI bus
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
Re: Wave Shield - SD and DAC SPI bus
some SD cards didnt respond kindly to sharing the bus
-
- Posts: 2
- Joined: Tue Dec 20, 2011 3:53 pm
Re: Wave Shield - SD and DAC SPI bus
I was afraid of that. It is too bad there is so much variability in SD card performance.
Thanks for the reply.
Thanks for the reply.
- fat16lib
- Posts: 595
- Joined: Wed Dec 24, 2008 1:54 pm
Re: Wave Shield - SD and DAC SPI bus
It is not the variability in SD card performance.
The DAC is accessed in an interrupt routine and and the data must be sent to the DAC within a few microseconds.
The SD is read in non-interrupt code and does large block transfers so the SPI bus is tied up for longer times than the period between sound samples.
Mixing ISR and non-interrupt access to the SPI bus is not practical for the Wave Shield.
The DAC is accessed in an interrupt routine and and the data must be sent to the DAC within a few microseconds.
The SD is read in non-interrupt code and does large block transfers so the SPI bus is tied up for longer times than the period between sound samples.
Mixing ISR and non-interrupt access to the SPI bus is not practical for the Wave Shield.
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
Re: Wave Shield - SD and DAC SPI bus
oops thats right, its been a while since we wrote the code - couldnt recall what it was
Please be positive and constructive with your questions and comments.