Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

What is a DCI vs SPI?

Status
Not open for further replies.

dknguyen

Well-Known Member
Most Helpful Member
Hi. I'm not exactly sure what a so called "data converter interface" on the dsPIC chips is. It seems just like another SPI port to me. Am I missing something? Like if I had some high-res ADCs and I connected them to the DCI instead of SPI, it would behave exactly the same wouldn't it?

THanks.
 
If you look at the example clock frequencies that they specify in the datasheet, it's pretty obvious that it's meant for audio ADC/DACs - that along with all the I2S notes. But otherwise it looks like a SPI port with some pretty nice buffering and a framesync generator/detector.
 
I have done extensive work with the Framed SPI and DCI ports with the Si3000 codec.

IIRC Framed SPI only has a clock divider, whereas DCI has a period register which makes clock master mode more flexible. Not all codec setups require the controller to be in master mode, in fact IMHO master mode is generally undesirable. I seem to recall the other difference is the DCI can support multiple-word frames whereas Framed SPI is limited to a single 16-bit word.

The DCI can buffer up to 4 TX/RX words between interrupts, whereas SPI can only double-buffer. Since audio data is frequent transfers, this is helpful. However, the dsPIC 33F series then included a powerful DMA controller which makes the amount of buffering in the module irrelevant.

Not many people realized the Si3000 can be hooked up through a SPI port. I wrote a very well-coded, reusable driver to hook up as many as 3 Si3000 codecs to a single dsPIC33F by using the 2 SPI ports and the DCI port. The flow is all handled by the DMA controller (not present on the 30F series).

Always good to see someone else looking into dsPICs. It seems like some people have been turned off by the "dsPIC" name, assuming it is a special-purpose processor. In fact all its core (first off being a 16-bit core!) and peripheral features are really useful for general-purpose tasks. It's a remarkably powerful (while still cheap) series really.

33F has a lot of benefits over the 30F series too. DMA controller for one, another is 33F's faster and actually uses less power over the entire MIPs range. 30F will actually dissipate enough power to bake itself if you max it out and draw a lot from the pins without heatsinking. Downsides, 33F's only 3.3v (though hit has some 5v I/O compatability features) and has pretty low pin output drive current.
 
Last edited:
I see. I wasn't sure exactly how an audio ADC is different than a normal ADC, but my applications pretty much involve integrating readings from a gyroscope or accelerometer or something like that. So guess for something with frequency transfers the DCI is better than the regular SPI?

Hmmm, I didn't know the 30F could fry themselves. I try to just use them whenever I'm interfacing something directly with power transistors.
 
The voice codec provides the following benefits over the on-board ADC:
1. 10bit/12bit ADC is generally low quality for audio. 16 bits is pretty much maxing out the quality for linear coding. Si3000 is 15 or 16 bits.
2. The incoming audio must be band-limited to ensure no significant components exist past the Nyquist rate. This generally requires at least a 2nd-order filter.
3. Si3000 has programmable-gain amps to both amplify a low amplitude mike signal and can adjust the signal level so it can be software-tweaked to a large enough amplitude to get the best resolution (codes per dB) you can without saturating at the loudest peaks.

The Si3000, being a codec, also provides 16-bit audio out and there's no need to build an additional filter to get rid of the PWM frequency like you would using the PIC's PWM module.

Well, the 30F at 5v @ 30MIPs (30F is not rated for 3.3v above I think 20MIPs) and I tell you it gets really hot- especially if you have the smaller 10mmx10mm pkg. People have said if you turn on a lot of the peripherals and use a lot of the pins it can cook itself especially if used in a hot enclosure. Look at how much less power the 33F takes at 3.3v @ 40MIPs.

Also the Idle mode is pretty slick. The Idle works particularly well with DMA because the DMA can send and received many DCI frames without waking the core from the low current Idle.
 
People listening tend to get pretty annoyed if their stereo/48KHz/16bit (= 2* 48K * 16 = 1.5MBit/sec) data stream gets jittery - it doesn't take much to make static.

Audio ADC's are tuned for 20Hz-20KHz input bandwidths - and lots of times they are sigma-delta types with larger latencies. I'd be hesitant to use something built for audio without combing through the data sheets.
 
dknguyen said:
Hmmm, I didn't know the 30F could fry themselves. I try to just use them whenever I'm interfacing something directly with power transistors.

They do get nice an toasty when running at the full 30MIPS. Couple that with sourcing or sinking a lot of current at the I/O pins and using a number of the internal peripherals and you have yourself a little space heater!

If you venture into dsPIC30F overclocking you get some very high temperatures. I've run a few 30F device at 50MIPS before and it would latch up unless you attached a heat sink. You can get quite a bit done with 50MIPS!

The 33F parts are much cooler and have a few features like DMA which improves their efficiency. Their downside, like Oznog stated, is the low drive current from the pins compared to the 30F parts. Their EPROM and FLASH longevity is also substantially shorter than the 30Fs.

I like to use both the 30F and 33F depending on the application. For battery powered equipment that needs a lot of processing power, the 33F is the way to go. For power designs or anything that requires high speed external transistor switching, I like the 30F parts.

Also, the smallest 33F part is packaged in a 64-TQFP where the 30F can be found in an 18-PDIP.
 
Yeah there's a serious issue that the 33F's pins are only spec'ed to source/sink 4mA, and have a Vdd of only 3.3v.

The DMA is easy to love. It's a really powerful feature.

I'm diggin it because even if you run off of 12v, there's a big difference in how beefy of a reg you need (and likely the heatsinking) due to the current draw.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top