LPC2129 A/D FIFO and accumulator

Started by Adam Wilkinson February 7, 2005
Hi Folks,

Anyone know if there is a FIFO facility available for
the A/D? Reference is made to it on p240 of the
LPC2119/2129/2194/2292/2294 User Manual, bit 30 of
ADDR: In non-FIFO operation, this bit is cleared by
reading this register.

Is there an accumulator? Reference on the same page,
bits 23:16 These bits always read as zeroes. They
allow accumulation ...

Cheers,

Adam ___________________________________________________________
ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com



An Engineer's Guide to the LPC2100 Series


--- In , Adam Wilkinson <lpc2129@y...> wrote:

> Anyone know if there is a FIFO facility available for
> the A/D? Reference is made to it on p240 of the
> LPC2119/2129/2194/2292/2294 User Manual, bit 30 of
> ADDR: In non-FIFO operation, this bit is cleared by
> reading this register.

There is no FIFO. Conversions can be started either manually by
writing to ADCR, by various MATx.x edges, or continuously in a
sequence (burst mode). You must read the result after each
conversion.

> Is there an accumulator? Reference on the same page,
> bits 23:16 These bits always read as zeroes. They
> allow accumulation ...

There is no automatic accumulation. When bits 32:16 are zero, you
don't need to mask them away when adding up to 256 conversion
results. You can then do this:

int acc = 0;
for (...)
{
...
acc += ADCR;
}
acc &= 0x00FFFFC0;

instead of this:

int acc = 0;
for (...)
{
...
acc += (ADCR & 0x0000FFC0);
}

It is a small feature with a small benefit.

Regards,
Karl Olsen