The program I posted is a reduced version of my actual code, so I'm considering it to be a test program that isolates the problem. Once this code works, then I can incorporate it into my overall program. That's probably why it doesn't make sense as an application by itself.
I have taken the sleep out, and it still doesn't give me the result I want (DAC output is 0V until a few seconds later, after many iterations create that delay). I tried a delay of 1.5 seconds, and it didn't work. As for the line if (sample < 1024) // toss out spurious readings, I know it doesn't seem necessary and I'm not sure why it was in the sample code I got from a company.
Thanks for the suggestions, I was just wondering if anyone had any similar issue or had insight into this particular problem. I'll just stare at this a little more
whatever9:
I have taken the sleep out, and it still doesn't give me the result I want
Try and keep us up to date. Post the latest version of your code. I am not going to edit a previous version you posted in case I do it differently from the way you have done it.