error401
1000+ Head-Fier
- Joined
- Oct 11, 2006
- Posts
- 1,244
- Likes
- 11
Quote:
In that case I'm not really sure what else to suggest. Verify that the pin is being asserted low, but I don't see why it wouldn't be if the rest of the code is working. Are you using any interrupts at all? You might be right that it's just the DAC, but that seems kind of odd to me...
Your new code looks much nicer
. Also, delay.h requires optimization or it doesn't work properly, I think you're a little mixed up there
.
Originally Posted by Jambo /img/forum/go_quote.gif Error401 - thank you for your helpful response once again. You're quite correct - my coding style leaves a lot to be desired. I have tried using the UNLOCK flag available as GPO1 to mute the DACs while the WM8805 is upset. Unfortunately however the noise still occurs sometimes - I guess that means it must be coming from the DAC....? Using fixed delays, it usually works fine and the output is silent for an appreciable amount of time. But when the noise occurs the delay/mute just doesn't happen - the music starts straight away with the fuzz over the top. I have tried to use delay.h already, but I found that (since it turns the optimiser off) the code then ended up far too big for the ATTiny2313. I'm sure it'll be something simple once I eventually find it! |
In that case I'm not really sure what else to suggest. Verify that the pin is being asserted low, but I don't see why it wouldn't be if the rest of the code is working. Are you using any interrupts at all? You might be right that it's just the DAC, but that seems kind of odd to me...
Your new code looks much nicer