Hi Leon, > apart from glitches - spurs on the waveforms. I think I had the ~ in the > wrong place. > > I didn't get those glitches with the AVR, using the same DAC. I've got some > LEDs on some of the lines to the DAC, so I'll try disconnecting them - they I figured it had to do something with the IOCLR write of complemented values. I think you'll find that the glitches represent the time it takes between the IOSET and the IOCLR operation to update the I/O (ie. there are a few instructions involved). The only way probably will be to use a latch, unless your DAC has a strobe. Tip : Try declaring a long* for IOCLR and one for IOSET, and write to the port that way. Register move instructions are then generated instead of the LDR, which takes less cycles/time. If you find the glitches get "narrower", then it's definitely the update time between IOSET, and writing the complement to IOCLR. -- Kris www.microbit.com.au
Message
Re: [lpc2100] DDS working
2003-12-03 by microbit
Attachments
- No local attachments were found for this message.