I2S implementation in 8-bit MCU

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

I2S implementation in 8-bit MCU

ソリューションへジャンプ
1,308件の閲覧回数
PW_CTL
Contributor III

Is there any implementation of the I2S protocol? It seems similar to SPI, but with the left/right sync signal (which would be implemented easily probably). I2S is half-duplex and SPI is full-duplex.

 

Thanks.

ラベル(1)
0 件の賞賛
1 解決策
449件の閲覧回数
rocco
Senior Contributor II

It would be rather difficult to implement I2S with the SPI, unless you intend to run it at slower than audio speeds. Although you could probably get the I2S SCLK and SDATA to behave using the SPI, you also need a synchronous LRCLK, and many codecs also need MCLK. The problem would be generating these other signals synchronized with the SPI signals. Timing for LRCLK is pretty critical.

 

Another issue would be making sure the SPI transmit continuously, as a rock-steady SCLK / MCLK is necessary for the conversions inside the codec.

 

And then there is the issue of the clock-rate. You would need to run your processor at a clock-rate that could give you a valid SCLK frequency for the audio format you select, like 1,411.2 kHz. for CD audio.

 

It could more easily be done with an external state-machine.

元の投稿で解決策を見る

0 件の賞賛
2 返答(返信)
450件の閲覧回数
rocco
Senior Contributor II

It would be rather difficult to implement I2S with the SPI, unless you intend to run it at slower than audio speeds. Although you could probably get the I2S SCLK and SDATA to behave using the SPI, you also need a synchronous LRCLK, and many codecs also need MCLK. The problem would be generating these other signals synchronized with the SPI signals. Timing for LRCLK is pretty critical.

 

Another issue would be making sure the SPI transmit continuously, as a rock-steady SCLK / MCLK is necessary for the conversions inside the codec.

 

And then there is the issue of the clock-rate. You would need to run your processor at a clock-rate that could give you a valid SCLK frequency for the audio format you select, like 1,411.2 kHz. for CD audio.

 

It could more easily be done with an external state-machine.

0 件の賞賛
449件の閲覧回数
PW_CTL
Contributor III

Ok, It seems more difficult than I thought. Even with a codec without MCLK, and getting the LRCLK signal from the PWM module, I wonder how to keep the SPI transmiting continuisly...   

 

Probably it is a good chance to try one of the new Kinetis with I2S. 

 

Thanks for your reply.

0 件の賞賛