Monitoring I2

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Hello people,

I am currently working on a school project where I have to design and build a Peak Program Meter.
I have made most of the hardware but am stuck with the processing unit.
I am using an Cirus CS5351 A/D and a Cirus CS8416 bitrate converter to create the I2S bus. My problem is that I would like to monitor this serial data bus with my Atmega 32.
A lot of people are saying that this is not possible, but nobody can give me a clear explanation why this is not possible.
Who could possibly help me?

Daryl
 
Hi Daryl

Maybe people think it can't be done because the SCK signal of I2S is nearly 3 MHz, and it looks a bit fast to handle in a microcontroller. However, have you considered feeding the I2S into the SPI interface on your ATmega32? Use slave mode, and for starters let LRCK drive the SS pin. The mega needs more than 2 of its clock periods for sampling each half of SCK, but if you're running at 16MHz then no problem. Except you're only sampling the left channel this way... Sounds like a fun project, and worth a try. Look very closely at the I2S timing diagrams though.

OTOH, the mega32 has an A to D converter in it anyway. It's only 10 bit, but it can sample at 15KHz, and you can feed up to eight signals into it through Port A as a multiplexer, which would be more than good enough for a PPM.
 
Before attempting to read I2S over SPI, you might want to consider post #9 of this thread and that for the AT91x40 family of ARM devices, Atmel recommend converting I2S data from serial to parallel and moving the data that way. ARM devices are somewhat more powerful than AVR's.
You might also want to consider a device with built-in I2S support if a change of device is possible
 
Hi Daryl

Sorry, I don't have a code example, it was only a suggestion, and made only because you are building a peak program meter so I assumed - perhaps wrongly - that you would be using a low sample rate, and would not read every sample.

Using a 24 bit A/D with I2S out is making a lot of work for your processor, and I don't understand where the CS8416 fits in. If you haven't physically built it yet, and if your project involves using the ATmega, then do consider its A/D inputs. You could build a simple analog front end that does all the PPM functions - rectification, attack and decay times etc - and leave yourself plenty of processing time to do the maths and the displays.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.