DAC, project 85 of Rod Elliott

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

One idea that I considered a while ago was using a microcontroller to do the decoding - I had the PIC16F84 in mind.

The problem with this is that the S/PDIF data rate is 3mbit/s, and the PIC's clock rate is 10MHz - and it executes one instruction every four clock cycles. But with an external UART or shift register, it would be possible to only need the PIC once every data word (subblock? I don't remember what they called it in the spec), and that would be well within the speed restriction. Simple external logic for the signalling (again, I don't remember the term, whatever it's called where two zero transitions is a 1, and one transition is a 0) could simplify the code a bit and reduce the load, but then, the spec isn't very complex anyway - it'd be easily doable with a PLD or discrete logic.

The 16F84 only has 14 I/O pins anyway, so there'd have to be external logic to handle the switching. The actual digital data would probably never pass through it.

The hard part, I think, is detecting the clock rate, but if you know what you'll be using, you can just lock it in hardware with a crystal or jumpers (and watch for jitter). There's a few bits in each word that could be used, and probably something in the headers, too.

The uC could also do interpolation, if it has any capacity left. PIC's are supposed to be pretty overclockable, though.

Just a thought. And PIC's are generally a hell of a lot easier (and cheaper) to get than the proper chips (not to mention not needing SMT soldering - unless you want to).
 
While it isn't exactly impossible to brew your own S/PDIF decoder, I doubt it is worth the effort. You need to take a biphase-mark-encoded stream and convert it to 2s-complement, extracting master, bit and wordclocks, strip out control data, and do a parity check on the stream. The parity check is critical because passing erroneous data to the DAC could toast your tweeters (and your ears!)

The data rate is also more like 6MHz for 96kHz.

This means you almost have to use a pld, and when you can get a 48kHz part for $8 or a 96kHz part for $5 (DIR1703, no rs422 reciever/CS8414 $10) it hardly seems worth it.

A "real" reciever also gives you access to fun stuffs like emphasis, track marks, audio bit, etc.

Oh, and the old Crystal recievers are DIPs, if you don't want to deal with the SMT parts. Nuhorizons still has some.
 
Yeah, but - it'll be fun :)

I haven't actually tried to hunt down any of the IC's you mention yet, but I'm not excited about my chances, unless Farnell has them (and wants to sell me singles). I *have* the PIC sitting here, I *have* tons of logic chips, and once I finish my amp, I'll have plenty of spare time (until my girlfriend gets back from Europe and I go back to uni).

Given the choice, I'd definitely go with the proper chip too, I just doubt that I'll be able to get one economically.

(Oh yeah, and I can probably get quick PLD's without too much effort if I ask around. I'd prefer the PIC, though, because you can get them almost anywhere).
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.