electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
go to the radio page Live at electro-music.com radio 1 Please visit the chat
poster
 Forum index » DIY Hardware and Software » Microcontrollers and Programmable Logic
dsPICs, let's talk about them
Post new topic   Reply to topic Moderators: State Machine
Page 3 of 3 [52 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Goto page: Previous 1, 2, 3
Author Message
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Sat Jan 12, 2013 5:57 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hmm. Wel I think I understand the question...

First, I've not used the DAC in DMA mode yet.

Second, my first and main experiences with DSP was in an FPGA. In that environment, the way the DAC is fed, it always gets fed new data at the designed sample rate. This is the way I would also approach a DSP problem using a CPU. Making the next sample available to the DAC when or before it needs it is the most important factor in the system.

If there is a chance that data can be late (that is, take too long to produce or there isn't enough headroom in the sample rate) then the target sample rate might be too high.

The dsPIC DACs operate from a 4 sample FIFO. There is also an emergency value register that is used when no data is available via the FIFO. This emergency register value is usually set to zero, but that's still going to insert a zero value that doesn't belong there and the result will probably not be "pretty music".

If you have a system that has variability, you want to set your sample rate to deal with the slowest it will ever be. If the rate could vary from say 50 khz to 70 khz, I'd set the sample rate at 50 khz or slower.

If the actual rate stays constant, then the output will be true to the number stream. This is always a good thing. It's better to have to deal with a slow, but constant sample rate than to consider that sometimes samples might not be there in time. Remember too about the nyquist limit. If you update slower than the sample rate then your nyquist limit goes down too and you have the opportunity for alias image artifacts.

_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
yogi



Joined: Jun 26, 2008
Posts: 29
Location: Maryland

PostPosted: Sat Jan 12, 2013 8:37 pm    Post subject: Reply with quote  Mark this post and the followings unread

Very insightful. The few threads I read, had differing reports on the noise floor for the DAC, some were experiencing high levels while others found no problems. I can see that noise can easily be introduce by bad design rather then a hardware defect. For synth apps there is more control, but dealing with slow memories, Audio over USB and such for playback could pose blocking problems.
From my (beginning) studies, using DMA seems an extremely powerful approach. In effect, expanding the DAC's FIFO. As long as the system can keep up with servicing the DPRAM, the DAC shouldn't 'run dry'.
Thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: State Machine
Page 3 of 3 [52 Posts]
View unread posts
View new posts in the last week
Goto page: Previous 1, 2, 3
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Microcontrollers and Programmable Logic
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use