Reply by Dale August 15, 20132013-08-15
The first page of the ADC chapter in the UM is clear about how this is done.

ADC0_0 is tied to ADC1_0, ADC0_1 is tied to ADC1_1, ... ADC0_7 is tied to ADC1_7.

By 'tied' I mean internally bonded together.

--- In l..., "ntchien2013" wrote:
>
> Hi all,
>
> i check the LPC18xx user manual and see that it has 16 pins for ADC but only 8 channels in reading value. How these pins are connected to the channels?
>
> Best regards,
> Chien
>

An Engineer's Guide to the LPC2100 Series

Reply by Phil Young August 11, 20132013-08-11
That's true, they share the same peripherals and pinout, basically they
share the same source code for the peripheral subsystem and much of the rest
of the chip as many of the bugs are common to both.

From: l... [mailto:l...] On Behalf Of
Howard Hansen
Sent: 11 August 2013 19:58
To: l...
Subject: Re: [lpc2000] Re: Why LPC18xx has 16 pins for ADC but only 8
channels?

Hello Phil,

Your conclusion on why each analog input is connected to both ADCs is
plausible. Although we call it a bug NXP might say it a feature.

I looked at UM10503 for the LPC43xx series and it says "All ADC input
channels are shared between ADC0 and ADC1.". It looks like both the
LPC18xx and LPC43xx series have this feature.

Howard

On 8/10/2013 7:26 PM, Phil Young wrote:
>
> Hi Howard,
>
> I went back to the original datasheet for the LPC4350, Rev1.01, 21 June
> 2011. The LPC1800 and LPC4300 share the same peripherals.
>
> In that data sheet the ADC 0 and ADC 1 inputs are separate
>
> P4_1 A1 x - x 3 [6] I; PU I/O GPIO2[1] - General purpose digital
> input/output pin.
>
> O CTOUT_1 - SCT output 1. Match output 1 of timer 0.
>
> O LCD_VD0 - LCD data.
>
> - R - Function reserved.
>
> - R - Function reserved.
>
> O LCD_VD19 - LCD data.
>
> O U3_TXD - Transmitter output for USART3.
>
> I ENET_COL - Ethernet Collision detect (MII interface).
>
> I ADC0_1 - ADC0, input channel 1.
>
> PC_0 D4 x - x - [6] I; PU - R - Function reserved.
>
> I USB1_ULPI_CLK - ULPI link CLK signal. 60 MHz clock
>
> generated by the PHY.
>
> - R - Function reserved.
>
> I/O ENET_RX_CLK - Ethernet Receive Clock (MII interface).
>
> O LCD_DCLK - LCD panel clock.
>
> - R - Function reserved.
>
> - R - Function reserved.
>
> I/O SD_CLK - SD/MMC card clock.
>
> I ADC1_1 - ADC1, input channel 1.
>
> So I guess this confirms that it was a design bug.
>
> From: l...

> [mailto:l...
] On
> Behalf Of
> Howard Hansen
> Sent: 10 August 2013 02:43
> To: l...

> Subject: Re: [lpc2000] Re: Why LPC18xx has 16 pins for ADC but only 8
> channels?
>
> Hello Phil,
>
> You make a good case for a MCU to have dedicated analog pins. But based
> on your definition the LPC1800 series of MCUs do not have dedicated
> analog pins.
>
> Howard
>
> On 8/9/2013 7:56 PM, Phil Young wrote:
> >
> > Hi Howard,
> >
> > ADC inputs can be fed from multiplexed digital / analog pins and
> dedicated
> > analog pins.
> >
> > The multiplexed pins have digital inputs which can be switched off, but
> > there is still the capacitance associated with this switch connected
> > to the
> > input, and routing of the signals means increased likelihood of noise
> > making 10 bit precision difficult to achieve due to noise.
> >
> > There are also generally the input protection diodes on these pins
> > which can
> > couple noise from the digital supply, these cannot be isolated from the
> > pads.
> >
> > The dedicated input pins are dedicated analog pins, i.e. they have no
> > switch
> > associated with them and no protection diodes, hence they are cleaner
> > inputs
> > and should be used where possible to get the best ADC performance.
> >
> > They are also likely to be located on the padring of the device in a
> > dedicated "clean" area and not coupled to the digital supplies in
> any way,
> > usually adjacent to the ADC block for best performance.
> >
> > Whenever possible always try to use these pins in preference to
> > multiplexed
> > digital / analog pins for sensitive analog signals, but remember
> that they
> > are unprotected so more susceptible to ESD damage.
> >
> > As a systems architect and silicon chip designer for many years this is
> > standard practice and is how I would do it anyway.
> >
> > Personally I can't see any sense in Rolf's explanation, not that I'm
> > saying
> > he's wrong, but if he's correct it's because the architects for the
> > LPC18xx
> > screwed up badly.
> >
> > Regards
> >
> > Phil.
> >
> > From: l...

>
>
> > [mailto:l...

>
> ] On
> > Behalf Of
> > Howard Hansen
> > Sent: 10 August 2013 01:01
> > To: l...

>
>
> > Subject: Re: [lpc2000] Re: Why LPC18xx has 16 pins for ADC but only 8
> > channels?
> >
> > Hello Phil,
> >
> > What do you mean by 8 dedicated ADC inputs? The closest thing to a
> > dedicated ADC input I could find was this statement : "Remark: Some pins
> > support pin muxing of digital and analog functions. All analog I/Os for
> > the ADC and DAC are also pinned out on analog-only pads without pin
> > muxing." This is taken from section 14.3 of UM10430
> >
> > Then this document :
> >
> > says:
> >
> > "Up to eight analog channels total. Each analog input is connected to
> > both ADCs"
> >
> > Hence conceptually it looks like there are two 8 input 1 output analog
> > multiplexers with the output of both multiplexers connected to the input
> > of bf both ADCs.
> >
> > I vote for Rolf's explanation.
> >
> > Howard
> >
> > On 8/9/2013 3:02 PM, Phil Young wrote:
> > >
> > > Hi Rolf,
> > >
> > > Is there an Errata for this then, because I can't find that in the
> > > errata on
> > > LPCWare.
> > >
> > > According to the UM there are 8 dedicated ADC inputs, 7 if you use the
> > > DAC,
> > > but additionally you can re-use some of the digital IO pins as ADC
> > inputs.
> > >
> > > This is controlled using the ENAIO0/1 registers.
> > >
> > > The NXP manuals are often ambiguous as I have found many times,
> > > particularly
> > > with the LPC43xx parts which share the same peripherals but
> interpreting
> > > them in the only way that makes sense the ENAIO0/1 register bits
> should
> > > multiplex the actual ADC inputs between the dedicated ADC input pins
> > > and the
> > > shared IO pins.
> > >
> > > If the corresponding but is set in this register I would expect
> the ADC
> > > input to be routed from the shared digital pin instead of the
> dedicated
> > > analog input.
> > >
> > > Do you have some other information?.
> > >
> > > Regards
> > >
> > > Phil.
> > >
> > > From: l...

>
>
> >
> >
> > > [mailto:l...

>
>
> >
> > ] On
> > > Behalf Of
> > > Rolf Meeser
> > > Sent: 09 August 2013 20:12
> > > To: l...

>
>
> >
> >
> > > Subject: Re: [lpc2000] Re: Why LPC18xx has 16 pins for ADC but only 8
> > > channels?
> > >
> > > Hi Phil,
> > >
> > > On 09.08.2013 11:56, Phil Young wrote:
> > > >
> > > >
> > > > I think the answer is really quite different to what has been
> > > discussed so
> > > > far.
> > > >
> > > Unfortunately, it is exactly like what has been discussed so
> far... :-(
> > >
> > > Only eight ADC channels can be used at a time, seven if you also
> use the
> > > DAC.
> > > The choice left is to select your favorite ADC to do the conversion.
> > >
> > > Channel 0 of ADC is *physically wired* to channel 0 of ADC1, and so
> > > forth for all eight channels.
> > >
> > > Regards,
> > > Rolf
> > >
> > > [Non-text portions of this message have been removed]
> > >
> > > [Non-text portions of this message have been removed]
> > >
> > >
> >
> > [Non-text portions of this message have been removed]
> >
> > [Non-text portions of this message have been removed]
> >
> > [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

Reply by Howard Hansen August 11, 20132013-08-11
Hello Phil,

Your conclusion on why each analog input is connected to both ADCs is
plausible. Although we call it a bug NXP might say it a feature.

I looked at UM10503 for the LPC43xx series and it says "All ADC input
channels are shared between ADC0 and ADC1.". It looks like both the
LPC18xx and LPC43xx series have this feature.

Howard

On 8/10/2013 7:26 PM, Phil Young wrote:
>
> Hi Howard,
>
> I went back to the original datasheet for the LPC4350, Rev1.01, 21 June
> 2011. The LPC1800 and LPC4300 share the same peripherals.
>
> In that data sheet the ADC 0 and ADC 1 inputs are separate
>
> P4_1 A1 x - x 3 [6] I; PU I/O GPIO2[1] - General purpose digital
> input/output pin.
>
> O CTOUT_1 - SCT output 1. Match output 1 of timer 0.
>
> O LCD_VD0 - LCD data.
>
> - R - Function reserved.
>
> - R - Function reserved.
>
> O LCD_VD19 - LCD data.
>
> O U3_TXD - Transmitter output for USART3.
>
> I ENET_COL - Ethernet Collision detect (MII interface).
>
> I ADC0_1 - ADC0, input channel 1.
>
> PC_0 D4 x - x - [6] I; PU - R - Function reserved.
>
> I USB1_ULPI_CLK - ULPI link CLK signal. 60 MHz clock
>
> generated by the PHY.
>
> - R - Function reserved.
>
> I/O ENET_RX_CLK - Ethernet Receive Clock (MII interface).
>
> O LCD_DCLK - LCD panel clock.
>
> - R - Function reserved.
>
> - R - Function reserved.
>
> I/O SD_CLK - SD/MMC card clock.
>
> I ADC1_1 - ADC1, input channel 1.
>
> So I guess this confirms that it was a design bug.
>
> From: l...
> [mailto:l... ] On
> Behalf Of
> Howard Hansen
> Sent: 10 August 2013 02:43
> To: l...
> Subject: Re: [lpc2000] Re: Why LPC18xx has 16 pins for ADC but only 8
> channels?
>
> Hello Phil,
>
> You make a good case for a MCU to have dedicated analog pins. But based
> on your definition the LPC1800 series of MCUs do not have dedicated
> analog pins.
>
> Howard
>
> On 8/9/2013 7:56 PM, Phil Young wrote:
> >
> > Hi Howard,
> >
> > ADC inputs can be fed from multiplexed digital / analog pins and
> dedicated
> > analog pins.
> >
> > The multiplexed pins have digital inputs which can be switched off, but
> > there is still the capacitance associated with this switch connected
> > to the
> > input, and routing of the signals means increased likelihood of noise
> > making 10 bit precision difficult to achieve due to noise.
> >
> > There are also generally the input protection diodes on these pins
> > which can
> > couple noise from the digital supply, these cannot be isolated from the
> > pads.
> >
> > The dedicated input pins are dedicated analog pins, i.e. they have no
> > switch
> > associated with them and no protection diodes, hence they are cleaner
> > inputs
> > and should be used where possible to get the best ADC performance.
> >
> > They are also likely to be located on the padring of the device in a
> > dedicated "clean" area and not coupled to the digital supplies in
> any way,
> > usually adjacent to the ADC block for best performance.
> >
> > Whenever possible always try to use these pins in preference to
> > multiplexed
> > digital / analog pins for sensitive analog signals, but remember
> that they
> > are unprotected so more susceptible to ESD damage.
> >
> > As a systems architect and silicon chip designer for many years this is
> > standard practice and is how I would do it anyway.
> >
> > Personally I can't see any sense in Rolf's explanation, not that I'm
> > saying
> > he's wrong, but if he's correct it's because the architects for the
> > LPC18xx
> > screwed up badly.
> >
> > Regards
> >
> > Phil.
> >
> > From: l...
>
>
> > [mailto:l...
>
> ] On
> > Behalf Of
> > Howard Hansen
> > Sent: 10 August 2013 01:01
> > To: l...
>
>
> > Subject: Re: [lpc2000] Re: Why LPC18xx has 16 pins for ADC but only 8
> > channels?
> >
> > Hello Phil,
> >
> > What do you mean by 8 dedicated ADC inputs? The closest thing to a
> > dedicated ADC input I could find was this statement : "Remark: Some pins
> > support pin muxing of digital and analog functions. All analog I/Os for
> > the ADC and DAC are also pinned out on analog-only pads without pin
> > muxing." This is taken from section 14.3 of UM10430
> >
> > Then this document :
> >
> >
> > says:
> >
> > "Up to eight analog channels total. Each analog input is connected to
> > both ADCs"
> >
> > Hence conceptually it looks like there are two 8 input 1 output analog
> > multiplexers with the output of both multiplexers connected to the input
> > of bf both ADCs.
> >
> > I vote for Rolf's explanation.
> >
> > Howard
> >
> > On 8/9/2013 3:02 PM, Phil Young wrote:
> > >
> > > Hi Rolf,
> > >
> > > Is there an Errata for this then, because I can't find that in the
> > > errata on
> > > LPCWare.
> > >
> > > According to the UM there are 8 dedicated ADC inputs, 7 if you use the
> > > DAC,
> > > but additionally you can re-use some of the digital IO pins as ADC
> > inputs.
> > >
> > > This is controlled using the ENAIO0/1 registers.
> > >
> > > The NXP manuals are often ambiguous as I have found many times,
> > > particularly
> > > with the LPC43xx parts which share the same peripherals but
> interpreting
> > > them in the only way that makes sense the ENAIO0/1 register bits
> should
> > > multiplex the actual ADC inputs between the dedicated ADC input pins
> > > and the
> > > shared IO pins.
> > >
> > > If the corresponding but is set in this register I would expect
> the ADC
> > > input to be routed from the shared digital pin instead of the
> dedicated
> > > analog input.
> > >
> > > Do you have some other information?.
> > >
> > > Regards
> > >
> > > Phil.
> > >
> > > From: l...
>
>
> >
> >
> > > [mailto:l...
>
>
> >
> > ] On
> > > Behalf Of
> > > Rolf Meeser
> > > Sent: 09 August 2013 20:12
> > > To: l...
>
>
> >
> >
> > > Subject: Re: [lpc2000] Re: Why LPC18xx has 16 pins for ADC but only 8
> > > channels?
> > >
> > > Hi Phil,
> > >
> > > On 09.08.2013 11:56, Phil Young wrote:
> > > >
> > > >
> > > > I think the answer is really quite different to what has been
> > > discussed so
> > > > far.
> > > >
> > > Unfortunately, it is exactly like what has been discussed so
> far... :-(
> > >
> > > Only eight ADC channels can be used at a time, seven if you also
> use the
> > > DAC.
> > > The choice left is to select your favorite ADC to do the conversion.
> > >
> > > Channel 0 of ADC is *physically wired* to channel 0 of ADC1, and so
> > > forth for all eight channels.
> > >
> > > Regards,
> > > Rolf
> > >
> > > [Non-text portions of this message have been removed]
> > >
> > > [Non-text portions of this message have been removed]
> > >
> > >
> >
> > [Non-text portions of this message have been removed]
> >
> > [Non-text portions of this message have been removed]
> >
> > [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

Reply by Phil Young August 10, 20132013-08-10
Hi Howard,

I went back to the original datasheet for the LPC4350, Rev1.01, 21 June
2011. The LPC1800 and LPC4300 share the same peripherals.

In that data sheet the ADC 0 and ADC 1 inputs are separate

P4_1 A1 x - x 3 [6] I; PU I/O GPIO2[1] - General purpose digital
input/output pin.

O CTOUT_1 - SCT output 1. Match output 1 of timer 0.

O LCD_VD0 - LCD data.

- R - Function reserved.

- R - Function reserved.

O LCD_VD19 - LCD data.

O U3_TXD - Transmitter output for USART3.

I ENET_COL - Ethernet Collision detect (MII interface).

I ADC0_1 - ADC0, input channel 1.

PC_0 D4 x - x - [6] I; PU - R - Function reserved.

I USB1_ULPI_CLK - ULPI link CLK signal. 60 MHz clock

generated by the PHY.

- R - Function reserved.

I/O ENET_RX_CLK - Ethernet Receive Clock (MII interface).

O LCD_DCLK - LCD panel clock.

- R - Function reserved.

- R - Function reserved.

I/O SD_CLK - SD/MMC card clock.

I ADC1_1 - ADC1, input channel 1.

So I guess this confirms that it was a design bug.

From: l... [mailto:l...] On Behalf Of
Howard Hansen
Sent: 10 August 2013 02:43
To: l...
Subject: Re: [lpc2000] Re: Why LPC18xx has 16 pins for ADC but only 8
channels?

Hello Phil,

You make a good case for a MCU to have dedicated analog pins. But based
on your definition the LPC1800 series of MCUs do not have dedicated
analog pins.

Howard

On 8/9/2013 7:56 PM, Phil Young wrote:
>
> Hi Howard,
>
> ADC inputs can be fed from multiplexed digital / analog pins and dedicated
> analog pins.
>
> The multiplexed pins have digital inputs which can be switched off, but
> there is still the capacitance associated with this switch connected
> to the
> input, and routing of the signals means increased likelihood of noise
> making 10 bit precision difficult to achieve due to noise.
>
> There are also generally the input protection diodes on these pins
> which can
> couple noise from the digital supply, these cannot be isolated from the
> pads.
>
> The dedicated input pins are dedicated analog pins, i.e. they have no
> switch
> associated with them and no protection diodes, hence they are cleaner
> inputs
> and should be used where possible to get the best ADC performance.
>
> They are also likely to be located on the padring of the device in a
> dedicated "clean" area and not coupled to the digital supplies in any way,
> usually adjacent to the ADC block for best performance.
>
> Whenever possible always try to use these pins in preference to
> multiplexed
> digital / analog pins for sensitive analog signals, but remember that they
> are unprotected so more susceptible to ESD damage.
>
> As a systems architect and silicon chip designer for many years this is
> standard practice and is how I would do it anyway.
>
> Personally I can't see any sense in Rolf's explanation, not that I'm
> saying
> he's wrong, but if he's correct it's because the architects for the
> LPC18xx
> screwed up badly.
>
> Regards
>
> Phil.
>
> From: l...

> [mailto:l...
] On
> Behalf Of
> Howard Hansen
> Sent: 10 August 2013 01:01
> To: l...

> Subject: Re: [lpc2000] Re: Why LPC18xx has 16 pins for ADC but only 8
> channels?
>
> Hello Phil,
>
> What do you mean by 8 dedicated ADC inputs? The closest thing to a
> dedicated ADC input I could find was this statement : "Remark: Some pins
> support pin muxing of digital and analog functions. All analog I/Os for
> the ADC and DAC are also pinned out on analog-only pads without pin
> muxing." This is taken from section 14.3 of UM10430
>
> Then this document :
>
says:
>
> "Up to eight analog channels total. Each analog input is connected to
> both ADCs"
>
> Hence conceptually it looks like there are two 8 input 1 output analog
> multiplexers with the output of both multiplexers connected to the input
> of bf both ADCs.
>
> I vote for Rolf's explanation.
>
> Howard
>
> On 8/9/2013 3:02 PM, Phil Young wrote:
> >
> > Hi Rolf,
> >
> > Is there an Errata for this then, because I can't find that in the
> > errata on
> > LPCWare.
> >
> > According to the UM there are 8 dedicated ADC inputs, 7 if you use the
> > DAC,
> > but additionally you can re-use some of the digital IO pins as ADC
> inputs.
> >
> > This is controlled using the ENAIO0/1 registers.
> >
> > The NXP manuals are often ambiguous as I have found many times,
> > particularly
> > with the LPC43xx parts which share the same peripherals but interpreting
> > them in the only way that makes sense the ENAIO0/1 register bits should
> > multiplex the actual ADC inputs between the dedicated ADC input pins
> > and the
> > shared IO pins.
> >
> > If the corresponding but is set in this register I would expect the ADC
> > input to be routed from the shared digital pin instead of the dedicated
> > analog input.
> >
> > Do you have some other information?.
> >
> > Regards
> >
> > Phil.
> >
> > From: l...

>
>
> > [mailto:l...

>
> ] On
> > Behalf Of
> > Rolf Meeser
> > Sent: 09 August 2013 20:12
> > To: l...

>
>
> > Subject: Re: [lpc2000] Re: Why LPC18xx has 16 pins for ADC but only 8
> > channels?
> >
> > Hi Phil,
> >
> > On 09.08.2013 11:56, Phil Young wrote:
> > >
> > >
> > > I think the answer is really quite different to what has been
> > discussed so
> > > far.
> > >
> > Unfortunately, it is exactly like what has been discussed so far... :-(
> >
> > Only eight ADC channels can be used at a time, seven if you also use the
> > DAC.
> > The choice left is to select your favorite ADC to do the conversion.
> >
> > Channel 0 of ADC is *physically wired* to channel 0 of ADC1, and so
> > forth for all eight channels.
> >
> > Regards,
> > Rolf
> >
> > [Non-text portions of this message have been removed]
> >
> > [Non-text portions of this message have been removed]
> >
> > [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

Reply by Phil Young August 10, 20132013-08-10
Hi Howard,

The point is to remove digital noise so having analog pins shared between 2
ADC's is fine and exactly meets these goals.

There is a clue in the pin naming selected that at some point it was
intended to have separate inputs for the 2 ADC's but this is not what was
implemented, since in the pin naming for the digital IO pins there are
separate pads for ADC0_x and ADC1_x.

Unless there was an intention to keep them separate there was no point in
having the naming convention ADC0_x and ADC1_x on the separate pins, it is a
legacy from a specification change.

In revision 2.1 of the user manual there is a change note to say that they
changed the specification so that both ADC inputs were connected together,
at that time they did not rename the multiplexed pins however but added a
note to say they were connected to both ADC's.

Whether this was a change made for implementation reasons or just a mistake
is not clear, sadly I've been working with the LPC43xx parts since the first
engineering samples and am becoming very used to these issues, I've spent
many weeks discovering the issues and workarounds so I suspect the latter .

Regards

Phil.

From: l... [mailto:l...] On Behalf Of
Howard Hansen
Sent: 10 August 2013 02:43
To: l...
Subject: Re: [lpc2000] Re: Why LPC18xx has 16 pins for ADC but only 8
channels?

Hello Phil,

You make a good case for a MCU to have dedicated analog pins. But based
on your definition the LPC1800 series of MCUs do not have dedicated
analog pins.

Howard

On 8/9/2013 7:56 PM, Phil Young wrote:
>
> Hi Howard,
>
> ADC inputs can be fed from multiplexed digital / analog pins and dedicated
> analog pins.
>
> The multiplexed pins have digital inputs which can be switched off, but
> there is still the capacitance associated with this switch connected
> to the
> input, and routing of the signals means increased likelihood of noise
> making 10 bit precision difficult to achieve due to noise.
>
> There are also generally the input protection diodes on these pins
> which can
> couple noise from the digital supply, these cannot be isolated from the
> pads.
>
> The dedicated input pins are dedicated analog pins, i.e. they have no
> switch
> associated with them and no protection diodes, hence they are cleaner
> inputs
> and should be used where possible to get the best ADC performance.
>
> They are also likely to be located on the padring of the device in a
> dedicated "clean" area and not coupled to the digital supplies in any way,
> usually adjacent to the ADC block for best performance.
>
> Whenever possible always try to use these pins in preference to
> multiplexed
> digital / analog pins for sensitive analog signals, but remember that they
> are unprotected so more susceptible to ESD damage.
>
> As a systems architect and silicon chip designer for many years this is
> standard practice and is how I would do it anyway.
>
> Personally I can't see any sense in Rolf's explanation, not that I'm
> saying
> he's wrong, but if he's correct it's because the architects for the
> LPC18xx
> screwed up badly.
>
> Regards
>
> Phil.
>
> From: l...

> [mailto:l...
] On
> Behalf Of
> Howard Hansen
> Sent: 10 August 2013 01:01
> To: l...

> Subject: Re: [lpc2000] Re: Why LPC18xx has 16 pins for ADC but only 8
> channels?
>
> Hello Phil,
>
> What do you mean by 8 dedicated ADC inputs? The closest thing to a
> dedicated ADC input I could find was this statement : "Remark: Some pins
> support pin muxing of digital and analog functions. All analog I/Os for
> the ADC and DAC are also pinned out on analog-only pads without pin
> muxing." This is taken from section 14.3 of UM10430
>
> Then this document :
>
says:
>
> "Up to eight analog channels total. Each analog input is connected to
> both ADCs"
>
> Hence conceptually it looks like there are two 8 input 1 output analog
> multiplexers with the output of both multiplexers connected to the input
> of bf both ADCs.
>
> I vote for Rolf's explanation.
>
> Howard
>
> On 8/9/2013 3:02 PM, Phil Young wrote:
> >
> > Hi Rolf,
> >
> > Is there an Errata for this then, because I can't find that in the
> > errata on
> > LPCWare.
> >
> > According to the UM there are 8 dedicated ADC inputs, 7 if you use the
> > DAC,
> > but additionally you can re-use some of the digital IO pins as ADC
> inputs.
> >
> > This is controlled using the ENAIO0/1 registers.
> >
> > The NXP manuals are often ambiguous as I have found many times,
> > particularly
> > with the LPC43xx parts which share the same peripherals but interpreting
> > them in the only way that makes sense the ENAIO0/1 register bits should
> > multiplex the actual ADC inputs between the dedicated ADC input pins
> > and the
> > shared IO pins.
> >
> > If the corresponding but is set in this register I would expect the ADC
> > input to be routed from the shared digital pin instead of the dedicated
> > analog input.
> >
> > Do you have some other information?.
> >
> > Regards
> >
> > Phil.
> >
> > From: l...

>
>
> > [mailto:l...

>
> ] On
> > Behalf Of
> > Rolf Meeser
> > Sent: 09 August 2013 20:12
> > To: l...

>
>
> > Subject: Re: [lpc2000] Re: Why LPC18xx has 16 pins for ADC but only 8
> > channels?
> >
> > Hi Phil,
> >
> > On 09.08.2013 11:56, Phil Young wrote:
> > >
> > >
> > > I think the answer is really quite different to what has been
> > discussed so
> > > far.
> > >
> > Unfortunately, it is exactly like what has been discussed so far... :-(
> >
> > Only eight ADC channels can be used at a time, seven if you also use the
> > DAC.
> > The choice left is to select your favorite ADC to do the conversion.
> >
> > Channel 0 of ADC is *physically wired* to channel 0 of ADC1, and so
> > forth for all eight channels.
> >
> > Regards,
> > Rolf
> >
> > [Non-text portions of this message have been removed]
> >
> > [Non-text portions of this message have been removed]
> >
> > [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

Reply by Howard Hansen August 9, 20132013-08-09
Hello Phil,

You make a good case for a MCU to have dedicated analog pins. But based
on your definition the LPC1800 series of MCUs do not have dedicated
analog pins.

Howard

On 8/9/2013 7:56 PM, Phil Young wrote:
>
> Hi Howard,
>
> ADC inputs can be fed from multiplexed digital / analog pins and dedicated
> analog pins.
>
> The multiplexed pins have digital inputs which can be switched off, but
> there is still the capacitance associated with this switch connected
> to the
> input, and routing of the signals means increased likelihood of noise
> making 10 bit precision difficult to achieve due to noise.
>
> There are also generally the input protection diodes on these pins
> which can
> couple noise from the digital supply, these cannot be isolated from the
> pads.
>
> The dedicated input pins are dedicated analog pins, i.e. they have no
> switch
> associated with them and no protection diodes, hence they are cleaner
> inputs
> and should be used where possible to get the best ADC performance.
>
> They are also likely to be located on the padring of the device in a
> dedicated "clean" area and not coupled to the digital supplies in any way,
> usually adjacent to the ADC block for best performance.
>
> Whenever possible always try to use these pins in preference to
> multiplexed
> digital / analog pins for sensitive analog signals, but remember that they
> are unprotected so more susceptible to ESD damage.
>
> As a systems architect and silicon chip designer for many years this is
> standard practice and is how I would do it anyway.
>
> Personally I can't see any sense in Rolf's explanation, not that I'm
> saying
> he's wrong, but if he's correct it's because the architects for the
> LPC18xx
> screwed up badly.
>
> Regards
>
> Phil.
>
> From: l...
> [mailto:l... ] On
> Behalf Of
> Howard Hansen
> Sent: 10 August 2013 01:01
> To: l...
> Subject: Re: [lpc2000] Re: Why LPC18xx has 16 pins for ADC but only 8
> channels?
>
> Hello Phil,
>
> What do you mean by 8 dedicated ADC inputs? The closest thing to a
> dedicated ADC input I could find was this statement : "Remark: Some pins
> support pin muxing of digital and analog functions. All analog I/Os for
> the ADC and DAC are also pinned out on analog-only pads without pin
> muxing." This is taken from section 14.3 of UM10430
>
> Then this document :
> says:
>
> "Up to eight analog channels total. Each analog input is connected to
> both ADCs"
>
> Hence conceptually it looks like there are two 8 input 1 output analog
> multiplexers with the output of both multiplexers connected to the input
> of bf both ADCs.
>
> I vote for Rolf's explanation.
>
> Howard
>
> On 8/9/2013 3:02 PM, Phil Young wrote:
> >
> > Hi Rolf,
> >
> > Is there an Errata for this then, because I can't find that in the
> > errata on
> > LPCWare.
> >
> > According to the UM there are 8 dedicated ADC inputs, 7 if you use the
> > DAC,
> > but additionally you can re-use some of the digital IO pins as ADC
> inputs.
> >
> > This is controlled using the ENAIO0/1 registers.
> >
> > The NXP manuals are often ambiguous as I have found many times,
> > particularly
> > with the LPC43xx parts which share the same peripherals but interpreting
> > them in the only way that makes sense the ENAIO0/1 register bits should
> > multiplex the actual ADC inputs between the dedicated ADC input pins
> > and the
> > shared IO pins.
> >
> > If the corresponding but is set in this register I would expect the ADC
> > input to be routed from the shared digital pin instead of the dedicated
> > analog input.
> >
> > Do you have some other information?.
> >
> > Regards
> >
> > Phil.
> >
> > From: l...
>
>
> > [mailto:l...
>
> ] On
> > Behalf Of
> > Rolf Meeser
> > Sent: 09 August 2013 20:12
> > To: l...
>
>
> > Subject: Re: [lpc2000] Re: Why LPC18xx has 16 pins for ADC but only 8
> > channels?
> >
> > Hi Phil,
> >
> > On 09.08.2013 11:56, Phil Young wrote:
> > >
> > >
> > > I think the answer is really quite different to what has been
> > discussed so
> > > far.
> > >
> > Unfortunately, it is exactly like what has been discussed so far... :-(
> >
> > Only eight ADC channels can be used at a time, seven if you also use the
> > DAC.
> > The choice left is to select your favorite ADC to do the conversion.
> >
> > Channel 0 of ADC is *physically wired* to channel 0 of ADC1, and so
> > forth for all eight channels.
> >
> > Regards,
> > Rolf
> >
> > [Non-text portions of this message have been removed]
> >
> > [Non-text portions of this message have been removed]
> >
> > [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

Reply by Phil Young August 9, 20132013-08-09
Hi Howard,

ADC inputs can be fed from multiplexed digital / analog pins and dedicated
analog pins.

The multiplexed pins have digital inputs which can be switched off, but
there is still the capacitance associated with this switch connected to the
input, and routing of the signals means increased likelihood of noise
making 10 bit precision difficult to achieve due to noise.

There are also generally the input protection diodes on these pins which can
couple noise from the digital supply, these cannot be isolated from the
pads.

The dedicated input pins are dedicated analog pins, i.e. they have no switch
associated with them and no protection diodes, hence they are cleaner inputs
and should be used where possible to get the best ADC performance.

They are also likely to be located on the padring of the device in a
dedicated "clean" area and not coupled to the digital supplies in any way,
usually adjacent to the ADC block for best performance.

Whenever possible always try to use these pins in preference to multiplexed
digital / analog pins for sensitive analog signals, but remember that they
are unprotected so more susceptible to ESD damage.

As a systems architect and silicon chip designer for many years this is
standard practice and is how I would do it anyway.

Personally I can't see any sense in Rolf's explanation, not that I'm saying
he's wrong, but if he's correct it's because the architects for the LPC18xx
screwed up badly.

Regards

Phil.

From: l... [mailto:l...] On Behalf Of
Howard Hansen
Sent: 10 August 2013 01:01
To: l...
Subject: Re: [lpc2000] Re: Why LPC18xx has 16 pins for ADC but only 8
channels?

Hello Phil,

What do you mean by 8 dedicated ADC inputs? The closest thing to a
dedicated ADC input I could find was this statement : "Remark: Some pins
support pin muxing of digital and analog functions. All analog I/Os for
the ADC and DAC are also pinned out on analog-only pads without pin
muxing." This is taken from section 14.3 of UM10430

Then this document :

says:

"Up to eight analog channels total. Each analog input is connected to
both ADCs"

Hence conceptually it looks like there are two 8 input 1 output analog
multiplexers with the output of both multiplexers connected to the input
of bf both ADCs.

I vote for Rolf's explanation.

Howard

On 8/9/2013 3:02 PM, Phil Young wrote:
>
> Hi Rolf,
>
> Is there an Errata for this then, because I can't find that in the
> errata on
> LPCWare.
>
> According to the UM there are 8 dedicated ADC inputs, 7 if you use the
> DAC,
> but additionally you can re-use some of the digital IO pins as ADC inputs.
>
> This is controlled using the ENAIO0/1 registers.
>
> The NXP manuals are often ambiguous as I have found many times,
> particularly
> with the LPC43xx parts which share the same peripherals but interpreting
> them in the only way that makes sense the ENAIO0/1 register bits should
> multiplex the actual ADC inputs between the dedicated ADC input pins
> and the
> shared IO pins.
>
> If the corresponding but is set in this register I would expect the ADC
> input to be routed from the shared digital pin instead of the dedicated
> analog input.
>
> Do you have some other information?.
>
> Regards
>
> Phil.
>
> From: l...

> [mailto:l...
] On
> Behalf Of
> Rolf Meeser
> Sent: 09 August 2013 20:12
> To: l...

> Subject: Re: [lpc2000] Re: Why LPC18xx has 16 pins for ADC but only 8
> channels?
>
> Hi Phil,
>
> On 09.08.2013 11:56, Phil Young wrote:
> >
> >
> > I think the answer is really quite different to what has been
> discussed so
> > far.
> >
> Unfortunately, it is exactly like what has been discussed so far... :-(
>
> Only eight ADC channels can be used at a time, seven if you also use the
> DAC.
> The choice left is to select your favorite ADC to do the conversion.
>
> Channel 0 of ADC is *physically wired* to channel 0 of ADC1, and so
> forth for all eight channels.
>
> Regards,
> Rolf
>
> [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

Reply by Howard Hansen August 9, 20132013-08-09
Hello Phil,

What do you mean by 8 dedicated ADC inputs? The closest thing to a
dedicated ADC input I could find was this statement : "Remark: Some pins
support pin muxing of digital and analog functions. All analog I/Os for
the ADC and DAC are also pinned out on analog-only pads without pin
muxing." This is taken from section 14.3 of UM10430

Then this document :

says:

"Up to eight analog channels total. Each analog input is connected to
both ADCs"

Hence conceptually it looks like there are two 8 input 1 output analog
multiplexers with the output of both multiplexers connected to the input
of bf both ADCs.

I vote for Rolf's explanation.

Howard
On 8/9/2013 3:02 PM, Phil Young wrote:
>
> Hi Rolf,
>
> Is there an Errata for this then, because I can't find that in the
> errata on
> LPCWare.
>
> According to the UM there are 8 dedicated ADC inputs, 7 if you use the
> DAC,
> but additionally you can re-use some of the digital IO pins as ADC inputs.
>
> This is controlled using the ENAIO0/1 registers.
>
> The NXP manuals are often ambiguous as I have found many times,
> particularly
> with the LPC43xx parts which share the same peripherals but interpreting
> them in the only way that makes sense the ENAIO0/1 register bits should
> multiplex the actual ADC inputs between the dedicated ADC input pins
> and the
> shared IO pins.
>
> If the corresponding but is set in this register I would expect the ADC
> input to be routed from the shared digital pin instead of the dedicated
> analog input.
>
> Do you have some other information?.
>
> Regards
>
> Phil.
>
> From: l...
> [mailto:l... ] On
> Behalf Of
> Rolf Meeser
> Sent: 09 August 2013 20:12
> To: l...
> Subject: Re: [lpc2000] Re: Why LPC18xx has 16 pins for ADC but only 8
> channels?
>
> Hi Phil,
>
> On 09.08.2013 11:56, Phil Young wrote:
> >
> >
> > I think the answer is really quite different to what has been
> discussed so
> > far.
> >
> Unfortunately, it is exactly like what has been discussed so far... :-(
>
> Only eight ADC channels can be used at a time, seven if you also use the
> DAC.
> The choice left is to select your favorite ADC to do the conversion.
>
> Channel 0 of ADC is *physically wired* to channel 0 of ADC1, and so
> forth for all eight channels.
>
> Regards,
> Rolf
>
> [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

Reply by Rolf Meeser August 9, 20132013-08-09
Hi Phil,

On 09.08.2013 22:02, Phil Young wrote:
>
> ... but interpreting
> them in the only way that makes sense the ENAIO0/1 register bits should
> multiplex the actual ADC inputs between the dedicated ADC input pins
> and the
> shared IO pins.
>
> If the corresponding but is set in this register I would expect the ADC
> input to be routed from the shared digital pin instead of the dedicated
> analog input.
>
No, the ENAIO0/1 registers control the multiplexed pins only, and they
determine whether these pins work as digital I/O (controlled through
SFPSx registers), or as analog pin. The dedicated pins, however, are
always connected to the ADCs.

Assume you want to use P4_1 as ADC0_1, so you set bit 1 of ENAIO0. You
can apply the input signal now to either P4_1 or to ADC0_1/ADC1_1, as
they become connected. So anything you feed into P4_1 will also appear
at the dedicated pin!

If now you decide to use PC_0 as ADC1_1, you must set bit 1 of ENAIO1.
In the same way as for ADC0, this will connect PC_0 and ADC0_1/ADC1_1,
effectively shorting channel 1 of both ADCs.

ADC0 and ADC1 both have their corresponding channels bonded to the same
dedicated analog pin. That's why they can't be used independently.

Regards,
Rolf

[Non-text portions of this message have been removed]

Reply by Phil Young August 9, 20132013-08-09
Hi Rolf,

Is there an Errata for this then, because I can't find that in the errata on
LPCWare.

According to the UM there are 8 dedicated ADC inputs, 7 if you use the DAC,
but additionally you can re-use some of the digital IO pins as ADC inputs.

This is controlled using the ENAIO0/1 registers.

The NXP manuals are often ambiguous as I have found many times, particularly
with the LPC43xx parts which share the same peripherals but interpreting
them in the only way that makes sense the ENAIO0/1 register bits should
multiplex the actual ADC inputs between the dedicated ADC input pins and the
shared IO pins.

If the corresponding but is set in this register I would expect the ADC
input to be routed from the shared digital pin instead of the dedicated
analog input.

Do you have some other information?.

Regards

Phil.

From: l... [mailto:l...] On Behalf Of
Rolf Meeser
Sent: 09 August 2013 20:12
To: l...
Subject: Re: [lpc2000] Re: Why LPC18xx has 16 pins for ADC but only 8
channels?

Hi Phil,

On 09.08.2013 11:56, Phil Young wrote:
> I think the answer is really quite different to what has been discussed so
> far.
>
Unfortunately, it is exactly like what has been discussed so far... :-(

Only eight ADC channels can be used at a time, seven if you also use the
DAC.
The choice left is to select your favorite ADC to do the conversion.

Channel 0 of ADC is *physically wired* to channel 0 of ADC1, and so
forth for all eight channels.

Regards,
Rolf

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]