[En-Nut-Discussion] Analog Input

Harald Kipp harald.kipp at egnite.de
Fri Sep 11 15:42:41 CEST 2009


Ole Reinhardt wrote:

> Just another hint: One of the most common errors is not to switch of the
> JTAG port by setting the fuse bit correctly. If the JTAG port is enabled
> ADC conversion will not work on all channels.

Easy talk for you. As you are not selling AVR boards, you don't need to
deal with customers who misprogrammed their fuses. ;-)

When starting with AVR, I killed several chips by setting wrong fuse
bits. As long as there is an alternative, better do not change the fuse
settings.

uint8_t mcucsr;
/*
 * The JTAG disable bit must be written twice within four cycles.
 * Thus we have to disable interrupts.
 */
mcucsr = inb(MCUCSR) | _BV(JTD);
NutEnterCritical();
outb(MCUCSR, val);
outb(MCUCSR, val);
NutExitCritical();


Reprogramming via JTAG requires to keep the reset button pressed when
calling avrdude (or any other programming tool of your choice).

Harald



More information about the En-Nut-Discussion mailing list