I2S implementation in 8-bit MCU

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

I2S implementation in 8-bit MCU

跳至解决方案
2,076 次查看
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 解答
1,217 次查看
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 回复数
1,218 次查看
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 项奖励
回复
1,217 次查看
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 项奖励
回复