Add support for ATMega163.

Add support for reading/writing ATMega163 lock and fuse bits.
Unfortunately, in looking at the specs for other ATMega parts, they
use entirely different instruction formats for these commands.  Thus,
these routines won't work for the ATMega103, for example.

Add support for sending raw command bytes via the interactive terminal
interface.  This allows one to execute any programming instruction on
the target device, whether or not avrprog supports it explicitly or
not.  Thus, one can use this feature to program fuse / lock bits, or
access any other feature of a current or future device that avrprog
does not know how to do.

Add in comments, an experimental instruction format in the
configuration file.  If this works out, it would allow supporting new
parts and non-orthoganal instructions across existing parts without
making avrprog code changes.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@99 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Brian S. Dean
2001-11-19 17:44:24 +00:00
parent 76fb1330af
commit f1af5d3981
6 changed files with 338 additions and 91 deletions

24
ppi.c
View File

@@ -35,6 +35,8 @@
#include "ppi.h"
#define SLOW_TOGGLE 0
extern char * progname;
struct ppipins_t {
@@ -224,8 +226,17 @@ int ppi_setall(int fd, int reg, int val)
int ppi_pulse(int fd, int reg, int bit)
{
ppi_toggle(fd, reg, bit);
#if SLOW_TOGGLE
usleep(1000);
#endif
ppi_toggle(fd, reg, bit);
#if SLOW_TOGGLE
usleep(1000);
#endif
return 0;
}
@@ -246,6 +257,10 @@ int ppi_setpin(int fd, int pin, int value)
else
ppi_clr(fd, pins[pin].reg, pins[pin].bit);
#if SLOW_TOGGLE
usleep(1000);
#endif
return 0;
}
@@ -280,8 +295,17 @@ int ppi_pulsepin(int fd, int pin)
pin--;
ppi_toggle(fd, pins[pin].reg, pins[pin].bit);
#if SLOW_TOGGLE
usleep(1000);
#endif
ppi_toggle(fd, pins[pin].reg, pins[pin].bit);
#if SLOW_TOGGLE
usleep(1000);
#endif
return 0;
}