EmbeddedRelated.com
Forums

JTAG muxed ADC channels on AVR?

Started by larwe September 12, 2010
I'm using ATmega169P in an application and just came across a need for
an additional two ADC channels (0-3 are in use). Unfortunately on this
part, ADC4-7 are muxed with JTAG pins. I've had no luck getting the
micro to read those channels

Is it necessary to disable the JTAG interface via fuse settings in
order to use these upper ADCs? That's a real drag for me... means I
have to dig out my AVR-ISP to program it over SPI, and I won't be able
to do any further debugging :(

[Obviously I am not expecting to use the JTAG interface simultaneously
with having those pins work as ADCs. I just don't want to lock off the
JTAG just yet...]

thanks.
On Sep 12, 11:08=A0am, larwe <zwsdot...@gmail.com> wrote:
> I'm using ATmega169P in an application and just came across a need for > an additional two ADC channels (0-3 are in use). Unfortunately on this > part, ADC4-7 are muxed with JTAG pins. I've had no luck getting the > micro to read those channels > > Is it necessary to disable the JTAG interface via fuse settings in > order to use these upper ADCs?
Yes, for sure. Or use external MUX off ADC0-3.
> That's a real drag for me... means I > have to dig out my AVR-ISP to program it over SPI, and I won't be able > to do any further debugging :( > > [Obviously I am not expecting to use the JTAG interface simultaneously > with having those pins work as ADCs. I just don't want to lock off the > JTAG just yet...] > > thanks.

larwe wrote:

> I'm using ATmega169P in an application and just came across a need for > an additional two ADC channels (0-3 are in use). Unfortunately on this > part, ADC4-7 are muxed with JTAG pins. I've had no luck getting the > micro to read those channels > > Is it necessary to disable the JTAG interface via fuse settings in > order to use these upper ADCs?
Yes, you have to disable JTAG via fuses. That's typical problem with AVR JTAG pins. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
On Sep 12, 2:31=A0pm, Vladimir Vassilevsky <nos...@nowhere.com> wrote:

> > Is it necessary to disable the JTAG interface via fuse settings in > > order to use these upper ADCs? > > Yes, you have to disable JTAG via fuses. That's typical problem with AVR > JTAG pins.
Bugger. That answer is concise, accurate, and a complete pain in my rump. Thanks.
On Sep 12, 2:26=A0pm, linnix <m...@linnix.info-for.us> wrote:
> On Sep 12, 11:08=A0am, larwe <zwsdot...@gmail.com> wrote: > > > I'm using ATmega169P in an application and just came across a need for > > an additional two ADC channels (0-3 are in use). Unfortunately on this > > part, ADC4-7 are muxed with JTAG pins. I've had no luck getting the > > micro to read those channels > > > Is it necessary to disable the JTAG interface via fuse settings in > > order to use these upper ADCs? > > Yes, for sure. =A0Or use external MUX off ADC0-3.
hmmm, an idea. Have to decide if that is less trouble than reworking it. (It's a prototype only and it needs to be rebuilt from scratch anyway, but we were hoping to do a little more testing with the existing hardware before the next phase).
On 9/12/2010 12:26 PM, linnix wrote:
> On Sep 12, 11:08 am, larwe<zwsdot...@gmail.com> wrote: >> I'm using ATmega169P in an application and just came across a need for >> an additional two ADC channels (0-3 are in use). Unfortunately on this >> part, ADC4-7 are muxed with JTAG pins. I've had no luck getting the >> micro to read those channels >> >> Is it necessary to disable the JTAG interface via fuse settings in >> order to use these upper ADCs? > > Yes, for sure. Or use external MUX off ADC0-3. > >> That's a real drag for me... means I >> have to dig out my AVR-ISP to program it over SPI, and I won't be able >> to do any further debugging :( >> >> [Obviously I am not expecting to use the JTAG interface simultaneously >> with having those pins work as ADCs. I just don't want to lock off the >> JTAG just yet...] >> >> thanks. >
You can switch to ISP over SPI. Looks like your code is fairly complete, so you may not really need full JTAG debugging. h
On Sep 12, 2:56=A0pm, hamilton <hamil...@nothere.com> wrote:

> You can switch to ISP over SPI.
That's exactly what I'm going to do. It just makes everything a bit irksome because I can't see what the actual ADC values are. Oh, and having to find my AVR-ISP :)
On 12.09.2010 20:51, larwe wrote:

> Bugger. That answer is concise, accurate, and a complete pain in my > rump.
Hmm... reminds me of that joke about an answer that must have been given by a mathematician because it's so wonderfully short, extremely correct, .... and completely useless.

Hans-Bernhard Br=F6ker wrote:

> On 12.09.2010 20:51, larwe wrote: >=20 >> Bugger. That answer is concise, accurate, and a complete pain in my >> rump. >=20 >=20 > Hmm... reminds me of that joke about an answer that must have been give=
n=20
> by a mathematician because it's so wonderfully short, extremely correct=
,=20
> ..... and completely useless.
Reminds me of that joke about an answer that must have been given by a=20 manager: somebody else's design problem from now on must become my=20 personal problem. VLV
On Sep 12, 11:08=A0am, larwe <zwsdot...@gmail.com> wrote:
> I'm using ATmega169P in an application and just came across a need for > an additional two ADC channels (0-3 are in use). Unfortunately on this > part, ADC4-7 are muxed with JTAG pins. I've had no luck getting the > micro to read those channels > > Is it necessary to disable the JTAG interface via fuse settings in > order to use these upper ADCs? That's a real drag for me... means I > have to dig out my AVR-ISP to program it over SPI, and I won't be able > to do any further debugging :( > > [Obviously I am not expecting to use the JTAG interface simultaneously > with having those pins work as ADCs. I just don't want to lock off the > JTAG just yet...] > > thanks.
You can disable the JTAG interface under program control even if the fuses have it enabled. So depending on your application it may be appropriate to have JTAG disabled when needed by the program and enabled when you need it for programming/debugging. kevin