Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: LPC2129 A/D FIFO and accumulator

2005-02-07 by Karl Olsen

--- In lpc2000@yahoogroups.com, 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

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.