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.

How to interface DAC with PIC?

Status
Not open for further replies.

jenniferkpj

New Member
Hi everyone! I am new to PIC and was wondering how one can output audio from DAC using a PIC. I am working on a project to save a .WAV from PC to an SD card through the PIC, and the DAC will output the audio file. Could anyone suggest some websites that have sample codes for interfacing PIC and DAC (in C) I'd appreciate it.

Thanks! :)
 
It's completely depends on the DAC you get. It's usually pretty simple, you simply output the data to be written on the DAC's data lines and toggle a strobe line to set the DAC's output. Some DAC's have buffers and can even be used to read the current output state, but again it's totally dependent on the exact DAC chip you pick. You can get passable audio from a PWM DAC too, which is simply running a PWM output as fast as you can (over say 40khz) and modulated the duty cycle to match your audio data, then you use a low pass filter (resistor and capacitor) to smooth the output a little. You should be able to find plenty of sample code using Google to search for PIC audio projects, PIC's are extremely well documented on the net.
 
Thanks for the help. In fact, I have been googling for the past few days for DAC PIC tutorials...projects...I still couldn't find anything useful. Could anyone suggest some links that could help me with my project? All I want is just a picture of how to send audio to DAC and some sample codes that show how to sample the audio...The DAC I am using is PWM 1770. Thank you so much! :)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top