Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: Right-justified I2S?

  1. #1
    Junior Member
    Join Date
    Oct 2014

    Right-justified I2S?


    I'm for all intents and purposes new to Teensy, even though I registered a few years ago. Also pretty new to Arduino, though I've used other IDEs for PIC32/ARM/AVR over the years.

    I just got a 3.6 and played around with the audio shield, works great! I also want to attempt to interface to an AK4552 (not 4558) board I made. Right now I just have a sine outputting to I2S, and I'm looking at the clocks/serial on my scope. The data stream output from the Teensy is left-justified, and I was wondering if there was a register I could set, or a couple lines I could add to make the audio library I2S right-justified? The 4552 is a simple chip (no I2C feature) so anything I do has to be on the Teensy.

    If someone could point me in the right direction, I would be grateful. I don't know my way around Arduino/Teensy well enough to know where to start looking.

    Maybe it's something in the audio library source I can comment out and replace with something else for right-justified I2S? Some header file?


    The AK4552 expects 24bit audio, though I know the audio library currently only supports 16bit. I noticed that with the data stream justified to the left, only the 8 least significant bits were being read by the codec, and that if I set the sine amplitude really low I started seeing an 8bit sine on the codec output, rather than a lot of noise.

  2. #2
    Senior Member
    Join Date
    Feb 2017
    The processor chips used on the Teensy family allow a great amount of flexibility in how the peripherals can be configured. I've only programmed the I2S interface on the Teensy 3.2. But the one on the T3.6 has similar (if not more) capabilities. Check out the Datasheet. For the T3.6 processor, the I2S interface information is in Section 61.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts