digital audio output on picaxe

professor_jonny

New Member
I it possible to output digital audio on a picaxe?

if i use a low sampling rate say 14khz and for spdif clock singal is 64 times the sampling it would be dooable with a picaxe running at 16mhz?

I just want to be able to make a beep to indicate something is happening.

has any one attempted this before ?
 

JimPerry

Senior Member
Probably too fast for a Picaxe (because of code overhead in time) - but playing MP3 files from an external module is certainly doable :confused:
 

hippy

Ex-Staff (retired)
My understanding of SPDIF is that it is an enhanced form of outputting a serial bit stream into a 575 shift register and into a DAC.

It has no fixed data rate as such so a square wave output could be achieved by repeatedly sending one frame of all-ones DAC level and another of all-zeroes. As each frame is 64 half-bits the max output frequency would be however long it took to send 128 half-bits. If each half-bit took 20us that's two frames in around 2.5ms. That's a max output tone frequency of about 400Hz.

There's more to the protocol than just data frames but it might be possible to bit-bang SPDIF from a PICAXE though only for low frequencies. It would be better to build an entire 'audio block' in some external memory then blat that out at high speed.
 

professor_jonny

New Member
My understanding of SPDIF is that it is an enhanced form of outputting a serial bit stream into a 575 shift register and into a DAC.

It has no fixed data rate as such so a square wave output could be achieved by repeatedly sending one frame of all-ones DAC level and another of all-zeroes. As each frame is 64 half-bits the max output frequency would be however long it took to send 128 half-bits. If each half-bit took 20us that's two frames in around 2.5ms. That's a max output tone frequency of about 400Hz.

There's more to the protocol than just data frames but it might be possible to bit-bang SPDIF from a PICAXE though only for low frequencies. It would be better to build an entire 'audio block' in some external memory then blat that out at high speed.
the clock signal is imposed on the data line so only every 2nd frame would need to change state I think that could work, i will have a play.
 
Top