I'm fairly experienced with microcontrollers and electronics. I've built a digital synth in the past using AVR's, ESP's and STM's, using both DAC's and I²S codecs. I decided to buy a teensy for it's a microcontroller in the arduino environment and it has the peripherals I need (GPIO's and I²S). My basic setup only uses a µCtrlr and a PCM5102, that only has 3 pins: Bit clock, word select and data in. I've spent my entire afternoon trying to understand how to start and I'm baffled I'm just as confused as before (maybe because I only use C in my projects?):
1) I first just tried to use the I²S library but it doesn't work. I don't understand why but it's not an option, even though Teensy is an arduino compatible board (?).
2) I tried then google and documentation, but it is all very confusing. I cannot find a library to get access to I²S that would substitute I²S. How can you access the peripheral as it is and run my old synth codes? There is audio, audiostream, audiocontrol and output_i2s. Where do I get the access to the I²S ports? There is no example showing that, no tutorial. Everything includes the shields, which I don't want to use and I didn't know they were necessary. Should I buy one?
3) Tried downloading example codes, and connecting the correct pins. Not a single one worked. flat line on the PCM output.
How can I communicate with the I²S codec? I just want to pipe some data to it. Could be using some abstraction that used DMA or just direct access, I don't mind, I just want to be able to send some bytes to the codec without declaring a lot of stuff that has nothing to do with the codec, just to find nothing addressing the I²S itself and nothing coming out of the output.
What am I missing here? Sorry for my writing, english is not my first language and I'm very tired after all the debugging.
1) I first just tried to use the I²S library but it doesn't work. I don't understand why but it's not an option, even though Teensy is an arduino compatible board (?).
2) I tried then google and documentation, but it is all very confusing. I cannot find a library to get access to I²S that would substitute I²S. How can you access the peripheral as it is and run my old synth codes? There is audio, audiostream, audiocontrol and output_i2s. Where do I get the access to the I²S ports? There is no example showing that, no tutorial. Everything includes the shields, which I don't want to use and I didn't know they were necessary. Should I buy one?
3) Tried downloading example codes, and connecting the correct pins. Not a single one worked. flat line on the PCM output.
How can I communicate with the I²S codec? I just want to pipe some data to it. Could be using some abstraction that used DMA or just direct access, I don't mind, I just want to be able to send some bytes to the codec without declaring a lot of stuff that has nothing to do with the codec, just to find nothing addressing the I²S itself and nothing coming out of the output.
What am I missing here? Sorry for my writing, english is not my first language and I'm very tired after all the debugging.