At 05:20 PM 12/3/03 +0000, you wrote:
>if you wanted to get better IOSET/IOCLR then you could do
>
> while (1)
> {
> unsigned int val, vali;
>
> acc = acc + adder; //update phase accumulator
> ptr = (acc &= 0xFF); //pointer into table
> val = swatooth[ptr] << 8; // get our value
> vali = ~val;
>
> // set our value onto the output lines..
> IOSET = val;
> IOCLR = vali;
> }
>
>which should pre-compute the inverse of val and then do the
>set of the two registers. You could possibly get a little more
>perfomance to go to assembly.
Even with assembly I would expect to see a significant glitch. Even at max
speed I was seeing several hundred nS to perform both operations. (see
earlier thread of discussion "Simple test program - is now instruction")
Robert
" 'Freedom' has no meaning of itself. There are always restrictions,
be they legal, genetic, or physical. If you don't believe me, try to
chew a radio signal. "
Kelvin Throop, IIIMessage
Re: [lpc2100] DDS working
2003-12-03 by Robert Adsett
Attachments
- No local attachments were found for this message.