A/D with Multiplexing capabilities? Anyone help?

cancel
Showing results for 
Search instead for 
Did you mean: 

A/D with Multiplexing capabilities? Anyone help?

1,975 Views
Sterling11
Contributor I
I am starting my first programming project at home and would like to know if anyone has used the HC08 to do the following:
Receive upto 8 channels of analog audio
A/D convert them all
Place them all in an output bitstream
(ie digital multiplex of 8 analog inputs)
I figure that the A/D part is quite simple, when I actually start coding, but dont know if the multiplexing is even possible for this chip.
I am using assembly at the moment, I dont know any other languages yet!
The reason I want to do this is to receive 8 audio channels and send them to 8 other units to de multiplex audio that is relevant to that unit.
i.e. send 8 radio talk shows to 8 friends but only sending the show that i want that friend to hear.
As they are talk shows maybe I could only use a 4 bit A/D?
Any who has ideas or sample code for any part of this so that I can amend according to my requirements would be very welcome.
Thanks
Labels (1)
0 Kudos
4 Replies

55 Views
bigmac
Specialist III
Hello Cameron,
 
In addition to a minimum sampling rate of 8 kHz,  because of the dynamic range associated with speech, you will require more than the 8 bits of resolution available with the GP32, for reasonable intelligibility.  Resolution of 12 bits would be optimum.  Special codec devices, as used within the telephone system, effectively provide a logarithmic compression of the signal down to 8 bits per sample, and provide for expansion when the sample is decoded back to analog.
 
I suspect you would need to use an external codec device for each of the eight channels, but this is probably outside the scope of your current project.
 
Regards,
Mac
 
0 Kudos

55 Views
UcTechnoGeek
Contributor II
The ADC on the HC08s use multiplexed inputs.  That's how they have multiple ADC channels with only one (sometimes 2) hardware ADCs.  You cannot however, sample channels simultaneously with a single hardware ADC.
 
How?
You set up the ADC, set the input channel, read the data, then move to the next channel.
 
I wouldn't go below 8Khz sampling rate for voice, so make sure you can get a sample from each channel fast enough.
 
Why ASM? CW 5.1 has a free c compiler and using the processor expert tool, it can set up and write the ADC sampling code for you.
 
This can be done on an 8-bit uC, however your application sounds like a perfect fit for a DSP.  ADC sampling, muxing an output stream and demuxing an input stream can be done in hardware. That's a perfect app for them. 
 
I'm sure if you check out Freescale's 56F8xx family, you can even find code samples similar to what you want to do.
 
uCTechnoGeek
0 Kudos

55 Views
Sterling11
Contributor I
I only have access to GP32's at school. Can you use C with them?
Cameron
Sterling11_1994
0 Kudos

55 Views
UcTechnoGeek
Contributor II
You can use C with any of the HC(S)08 family, but the Codewarrior special edition free tools are limited to 16K of flash and 32 files.
 
If you look through the HC08 app notes, you can find info on building an HC08 programmer/debugger that uses the monitor mode of the HC08 family.
 
uCTechnoGeek
 
0 Kudos