ref to question #41- looking into using the SAMD21 XIAO with arduino audio-tools #1439
-
Based on what I have seen it looks like the chart shows that SAMD21 will work for I2s in and out (but nothing else?) OR could I not just use the callback stream and then send the output of that into the AnalogWrite (dacPin)? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
THIS looks promising Editing the Variant.h file seems to be the simplest solution. from https://forum.seeedstudio.com/t/can-a-xiao-be-configured-for-i2s/253248/19 |
Beta Was this translation helpful? Give feedback.
-
ok i can get i2s working BUT that does not allow me to route into the built in DAC. it seems to use SPI so I am thinking the best method may be to use a CALLBACK stream. within the callback stream send the output to AnalogWrite(pin of dac) i am trying to understand how to do this and i found this callback example
so could i replace the code inside of invert-- with analogWrite(dacpin)=data16[i] obviously using a counter to step through the data |
Beta Was this translation helpful? Give feedback.
-
If you want to use the internal DAC, things get a little bit more complicated because you need to output the data at the correct rate. I guess the easiest way forward would be if you extend my library and provide an timer implementation for SAMD. You can try to port the one provided by your mentioned library. This would allow you to use my default arduino implementation provided by AnalogAudioArduino.h |
Beta Was this translation helpful? Give feedback.
If you want to use the internal DAC, things get a little bit more complicated because you need to output the data at the correct rate. I guess the easiest way forward would be if you extend my library and provide an timer implementation for SAMD. You can try to port the one provided by your mentioned library.
This would allow you to use my default arduino implementation provided by AnalogAudioArduino.h