PIC Sound Card

Thread Starter

CVMichael

Joined Aug 3, 2007
419
I want to make my own sound card using a PIC

From what I know the PIC ADC is limmited in speed, let's say a PIC16F877, can it process at a sample rate of 44100 Hz ?

If not, I will need an external ADC that will be connect to the PIC16F877, I looked on the web for ADC converters, but I have no idea what are better than others.

For now I'm just concerned to bring the sound into the PIC, I will see about sending the sound to the computer later...

PS, I don't mind that the ADC of the PIC is only 10 bits, I'm doing this for fun, and I don't need precision
 
Last edited:

beenthere

Joined Apr 20, 2004
15,819
You can see how well the PIC will do by looking at a program loop that reads in each conversion and stores it in memory. The time it takes to execute that loop is the absolutely maximum rate you can convert sound into a file. Adding switching right/left sources will slow the process. You don't have the horsepower to do any compression, so it's a straight sound file (equivalent to a .wav).

How many megs of memory can you put on the system? .wav files are huge.
 

Thread Starter

CVMichael

Joined Aug 3, 2007
419
I wrote a short program that reads from analog, and counts the total number of reads per second, and sends the result through the USART at baud rate 9600.

I got ~6337 ADC reads per second.

So how can I do this faster ?

Better microchip ? or external ADC reader ?
 

Hamilton

Joined Jun 20, 2008
10
At 200ns per instruction and no more that 25 instructions per loop 200KHz is doable. Adding loop counters and accessing the USART will add to the 25 considerably. If you have a scope toggle a GPIO bit every 255 loops and measure the time between triggers. 50 instructions should easy which is 100KHz. Once again this is without any USART functions
 
Top