Yahoo Groups archive

Lpc2000

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

Message

Re: LPC2129 ADC

2004-11-23 by firegenie1980

--- In lpc2000@yahoogroups.com, Robert Adsett <subscriptions@a...> 
wrote:
> At 04:43 PM 11/22/04 -0500, you wrote:
> > >Two, when I take the value from ADDR I place it into an int. 
However
> > >I am saving these values into an 8-bit value array so I have to
> > >shift right twice (due to the ADC being 10-bit). Or so I 
thought.
> > >The values I get from this array seem to be about right, but the
> > >resolution is in steps of 8 or 16 not the expected 1. This is no
> > >good for my application. I have also tried dividing by 4, but 
this
> > >produces even stranger results!
> >
> >Have you compared before and after values?  If the division is 
not tracking
> >the input values it's probably just a simple arithmetic error.
> 
> Also note that the A/D result register contains more than the 
result. The 
> top 16 bits are various status fields and the low 6 bits are zero 
(allowing 
> compatible expansion to 16 bits of resolution).
> 
> 
> " '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, III

Thanks for that. I actually noticed that as I was reading through 
the user manual for inspiration, I then found an example with a 6 
times right shift and an arithmetical and worked on to the output of 
the ADC. I always thought that was to extract the information for 
that particular users' program!

Stll adding that in and a few other slight modifications and my 
project is working fine.

Thanks,

FG

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.