Subversion Repositories Tronxy-X3A-Marlin

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 ron 1
# $Id: avrdude.conf.in 916 2010-01-15 16:36:13Z joerg_wunsch $
2
#
3
# AVRDUDE Configuration File
4
#
5
# This file contains configuration data used by AVRDUDE which describes
6
# the programming hardware pinouts and also provides part definitions.
7
# AVRDUDE's "-C" command line option specifies the location of the
8
# configuration file.  The "-c" option names the programmer configuration
9
# which must match one of the entry's "id" parameter.  The "-p" option
10
# identifies which part AVRDUDE is going to be programming and must match
11
# one of the parts' "id" parameter.
12
#
13
# Possible entry formats are:
14
#
15
#   programmer
16
#       id       = <id1> [, <id2> [, <id3>] ...] ;  # <idN> are quoted strings
17
#       desc     = <description> ;                  # quoted string
18
#       type     = par | stk500 | stk500v2 | stk500pp | stk500hvsp | stk500generic |
19
#                  stk600 | stk600pp | stk600hvsp |
20
#                  avr910 | butterfly | usbasp |
21
#                  jtagmki | jtagmkii | jtagmkii_isp | jtagmkii_dw |
22
#                  jtagmkII_avr32 | jtagmkii_pdi |
23
#                  dragon_dw | dragon_jtag | dragon_isp | dragon_pp |
24
#                  dragon_hvsp | dragon_pdi | arduino; # programmer type
25
#       baudrate = <num> ;                          # baudrate for avr910-programmer
26
#       vcc      = <num1> [, <num2> ... ] ;         # pin number(s)
27
#       reset    = <num> ;                          # pin number
28
#       sck      = <num> ;                          # pin number
29
#       mosi     = <num> ;                          # pin number
30
#       miso     = <num> ;                          # pin number
31
#       errled   = <num> ;                          # pin number
32
#       rdyled   = <num> ;                          # pin number
33
#       pgmled   = <num> ;                          # pin number
34
#       vfyled   = <num> ;                          # pin number
35
#     ;
36
#
37
#   part
38
#       id               = <id> ;                 # quoted string
39
#       desc             = <description> ;        # quoted string
40
#       has_jtag         = <yes/no> ;             # part has JTAG i/f
41
#       has_debugwire    = <yes/no> ;             # part has debugWire i/f
42
#       has_pdi          = <yes/no> ;             # part has PDI i/f
43
#       has_tpi          = <yes/no> ;             # part has TPI i/f
44
#       devicecode       = <num> ;            # deprecated, use stk500_devcode
45
#       stk500_devcode   = <num> ;                # numeric
46
#       avr910_devcode   = <num> ;                # numeric
47
#       signature        = <num> <num> <num> ;    # signature bytes
48
#       chip_erase_delay = <num> ;                # micro-seconds
49
#       reset            = dedicated | io;
50
#       retry_pulse      = reset | sck;
51
#       pgm_enable       = <instruction format> ;
52
#       chip_erase       = <instruction format> ;
53
#       chip_erase_delay = <num> ;                # chip erase delay (us)
54
#       # STK500 parameters (parallel programming IO lines)
55
#       pagel            = <num> ;                # pin name in hex, i.e., 0xD7
56
#       bs2              = <num> ;                # pin name in hex, i.e., 0xA0
57
#       serial           = <yes/no> ;             # can use serial downloading
58
#       parallel         = <yes/no/pseudo>;       # can use par. programming
59
#       # STK500v2 parameters, to be taken from Atmel's XML files
60
#       timeout          = <num> ;
61
#       stabdelay        = <num> ;
62
#       cmdexedelay      = <num> ;
63
#       synchloops       = <num> ;
64
#       bytedelay        = <num> ;
65
#       pollvalue        = <num> ;
66
#       pollindex        = <num> ;
67
#       predelay         = <num> ;
68
#       postdelay        = <num> ;
69
#       pollmethod       = <num> ;
70
#       mode             = <num> ;
71
#       delay            = <num> ;
72
#       blocksize        = <num> ;
73
#       readsize         = <num> ;
74
#       hvspcmdexedelay  = <num> ;
75
#       # STK500v2 HV programming parameters, from XML
76
#       pp_controlstack  = <num>, <num>, ...;   # PP only
77
#       hvsp_controlstack = <num>, <num>, ...;  # HVSP only
78
#       hventerstabdelay = <num>;
79
#       progmodedelay    = <num>;               # PP only
80
#       latchcycles      = <num>;
81
#       togglevtg        = <num>;
82
#       poweroffdelay    = <num>;
83
#       resetdelayms     = <num>;
84
#       resetdelayus     = <num>;
85
#       hvleavestabdelay = <num>;
86
#       resetdelay       = <num>;
87
#       synchcycles      = <num>;               # HVSP only
88
#       chiperasepulsewidth = <num>;            # PP only
89
#       chiperasepolltimeout = <num>;
90
#       chiperasetime    = <num>;               # HVSP only
91
#       programfusepulsewidth = <num>;          # PP only
92
#       programfusepolltimeout = <num>;
93
#       programlockpulsewidth = <num>;          # PP only
94
#       programlockpolltimeout = <num>;
95
#       # JTAG ICE mkII parameters, also from XML files
96
#       allowfullpagebitstream = <yes/no> ;
97
#       enablepageprogramming = <yes/no> ;
98
#       idr              = <num> ;                # IO addr of IDR (OCD) reg.
99
#       rampz            = <num> ;                # IO addr of RAMPZ reg.
100
#       spmcr            = <num> ;                # mem addr of SPMC[S]R reg.
101
#       eecr             = <num> ;                # mem addr of EECR reg.
102
#                                                 # (only when != 0x3c)
103
#       is_avr32         = <yes/no> ;             # AVR32 part
104
#
105
#       memory <memtype>
106
#           paged           = <yes/no> ;          # yes / no
107
#           size            = <num> ;             # bytes
108
#           page_size       = <num> ;             # bytes
109
#           num_pages       = <num> ;             # numeric
110
#           min_write_delay = <num> ;             # micro-seconds
111
#           max_write_delay = <num> ;             # micro-seconds
112
#           readback_p1     = <num> ;             # byte value
113
#           readback_p2     = <num> ;             # byte value
114
#           pwroff_after_write = <yes/no> ;       # yes / no
115
#           read            = <instruction format> ;
116
#           write           = <instruction format> ;
117
#           read_lo         = <instruction format> ;
118
#           read_hi         = <instruction format> ;
119
#           write_lo        = <instruction format> ;
120
#           write_hi        = <instruction format> ;
121
#           loadpage_lo     = <instruction format> ;
122
#           loadpage_hi     = <instruction format> ;
123
#           writepage       = <instruction format> ;
124
#         ;
125
#     ;
126
#
127
# If any of the above parameters are not specified, the default value
128
# of 0 is used for numerics or the empty string ("") for string
129
# values.  If a required parameter is left empty, AVRDUDE will
130
# complain.
131
#
132
# NOTES:
133
#   * 'devicecode' is the device code used by the STK500 (see codes
134
#       listed below)
135
#   * Not all memory types will implement all instructions.
136
#   * AVR Fuse bits and Lock bits are implemented as a type of memory.
137
#   * Example memory types are:
138
#       "flash", "eeprom", "fuse", "lfuse" (low fuse), "hfuse" (high
139
#       fuse), "signature", "calibration", "lock"
140
#   * The memory type specified on the avrdude command line must match
141
#     one of the memory types defined for the specified chip.
142
#   * The pwroff_after_write flag causes avrdude to attempt to
143
#     power the device off and back on after an unsuccessful write to
144
#     the affected memory area if VCC programmer pins are defined.  If
145
#     VCC pins are not defined for the programmer, a message
146
#     indicating that the device needs a power-cycle is printed out.
147
#     This flag was added to work around a problem with the
148
#     at90s4433/2333's; see the at90s4433 errata at:
149
#
150
#         http://www.atmel.com/atmel/acrobat/doc1280.pdf
151
#
152
# INSTRUCTION FORMATS
153
#
154
#    Instruction formats are specified as a comma seperated list of
155
#    string values containing information (bit specifiers) about each
156
#    of the 32 bits of the instruction.  Bit specifiers may be one of
157
#    the following formats:
158
#
159
#       '1'  = the bit is always set on input as well as output
160
#
161
#       '0'  = the bit is always clear on input as well as output
162
#
163
#       'x'  = the bit is ignored on input and output
164
#
165
#       'a'  = the bit is an address bit, the bit-number matches this bit
166
#              specifier's position within the current instruction byte
167
#
168
#       'aN' = the bit is the Nth address bit, bit-number = N, i.e., a12
169
#              is address bit 12 on input, a0 is address bit 0.
170
#
171
#       'i'  = the bit is an input data bit
172
#
173
#       'o'  = the bit is an output data bit
174
#
175
#    Each instruction must be composed of 32 bit specifiers.  The
176
#    instruction specification closely follows the instruction data
177
#    provided in Atmel's data sheets for their parts.
178
#
179
# See below for some examples.
180
#
181
#
182
# The following are STK500 part device codes to use for the
183
# "devicecode" field of the part.  These came from Atmel's software
184
# section avr061.zip which accompanies the application note
185
# AVR061 available from:
186
#
187
#      http://www.atmel.com/atmel/acrobat/doc2525.pdf
188
#
189
 
190
#define ATTINY10    0x10  /* the _old_ one that never existed! */
191
#define ATTINY11    0x11
192
#define ATTINY12    0x12
193
#define ATTINY15    0x13
194
#define ATTINY13    0x14
195
 
196
#define ATTINY22    0x20
197
#define ATTINY26    0x21
198
#define ATTINY28    0x22
199
#define ATTINY2313  0x23
200
 
201
#define AT90S1200   0x33
202
 
203
#define AT90S2313   0x40
204
#define AT90S2323   0x41
205
#define AT90S2333   0x42
206
#define AT90S2343   0x43
207
 
208
#define AT90S4414   0x50
209
#define AT90S4433   0x51
210
#define AT90S4434   0x52
211
#define ATMEGA48    0x59
212
 
213
#define AT90S8515   0x60
214
#define AT90S8535   0x61
215
#define AT90C8534   0x62
216
#define ATMEGA8515  0x63
217
#define ATMEGA8535  0x64
218
 
219
#define ATMEGA8     0x70
220
#define ATMEGA88    0x73
221
#define ATMEGA168   0x86
222
 
223
#define ATMEGA161   0x80
224
#define ATMEGA163   0x81
225
#define ATMEGA16    0x82
226
#define ATMEGA162   0x83
227
#define ATMEGA169   0x84
228
 
229
#define ATMEGA323   0x90
230
#define ATMEGA32    0x91
231
 
232
#define ATMEGA64    0xA0
233
 
234
#define ATMEGA103   0xB1
235
#define ATMEGA128   0xB2
236
#define AT90CAN128  0xB3
237
#define AT90CAN64   0xB3
238
#define AT90CAN32   0xB3
239
 
240
#define AT86RF401   0xD0
241
 
242
#define AT89START   0xE0
243
#define AT89S51	    0xE0
244
#define AT89S52	    0xE1
245
 
246
# The following table lists the devices in the original AVR910
247
# appnote:
248
# |Device |Signature | Code |
249
# +-------+----------+------+
250
# |tiny12 | 1E 90 05 | 0x55 |
251
# |tiny15 | 1E 90 06 | 0x56 |
252
# |       |          |      |
253
# | S1200 | 1E 90 01 | 0x13 |
254
# |       |          |      |
255
# | S2313 | 1E 91 01 | 0x20 |
256
# | S2323 | 1E 91 02 | 0x48 |
257
# | S2333 | 1E 91 05 | 0x34 |
258
# | S2343 | 1E 91 03 | 0x4C |
259
# |       |          |      |
260
# | S4414 | 1E 92 01 | 0x28 |
261
# | S4433 | 1E 92 03 | 0x30 |
262
# | S4434 | 1E 92 02 | 0x6C |
263
# |       |          |      |
264
# | S8515 | 1E 93 01 | 0x38 |
265
# | S8535 | 1E 93 03 | 0x68 |
266
# |       |          |      |
267
# |mega32 | 1E 95 01 | 0x72 |
268
# |mega83 | 1E 93 05 | 0x65 |
269
# |mega103| 1E 97 01 | 0x41 |
270
# |mega161| 1E 94 01 | 0x60 |
271
# |mega163| 1E 94 02 | 0x64 |
272
 
273
# Appnote AVR109 also has a table of AVR910 device codes, which
274
# lists:
275
# dev         avr910   signature
276
# ATmega8     0x77     0x1E 0x93 0x07
277
# ATmega8515  0x3B     0x1E 0x93 0x06
278
# ATmega8535  0x6A     0x1E 0x93 0x08
279
# ATmega16    0x75     0x1E 0x94 0x03
280
# ATmega162   0x63     0x1E 0x94 0x04
281
# ATmega163   0x66     0x1E 0x94 0x02
282
# ATmega169   0x79     0x1E 0x94 0x05
283
# ATmega32    0x7F     0x1E 0x95 0x02
284
# ATmega323   0x73     0x1E 0x95 0x01
285
# ATmega64    0x46     0x1E 0x96 0x02
286
# ATmega128   0x44     0x1E 0x97 0x02
287
#
288
# These codes refer to "BOOT" device codes which are apparently
289
# different than standard device codes, for whatever reasons
290
# (often one above the standard code).
291
 
292
# There are several extended versions of AVR910 implementations around
293
# in the Internet.  These add the following codes (only devices that
294
# actually exist are listed):
295
 
296
# ATmega8515	0x3A
297
# ATmega128	0x43
298
# ATmega64	0x45
299
# ATtiny26	0x5E
300
# ATmega8535	0x69
301
# ATmega32	0x72
302
# ATmega16	0x74
303
# ATmega8	0x76
304
# ATmega169	0x78
305
 
306
#
307
# Overall avrdude defaults
308
#
309
default_parallel   = "lpt1";
310
default_serial     = "com1";
311
 
312
 
313
#
314
# PROGRAMMER DEFINITIONS
315
#
316
 
317
programmer
318
  id    = "arduino";
319
  desc  = "Arduino";
320
  type  = arduino;
321
;
322
 
323
programmer
324
  id    = "avrisp";
325
  desc  = "Atmel AVR ISP";
326
  type  = stk500;
327
;
328
 
329
programmer
330
  id    = "avrispv2";
331
  desc  = "Atmel AVR ISP V2";
332
  type  =  stk500v2;
333
;
334
 
335
programmer
336
  id    = "avrispmkII";
337
  desc  = "Atmel AVR ISP mkII";
338
  type  =  stk500v2;
339
;
340
 
341
programmer
342
  id    = "avrisp2";
343
  desc  = "Atmel AVR ISP mkII";
344
  type  =  stk500v2;
345
;
346
 
347
programmer
348
  id    = "buspirate";
349
  desc  = "The Bus Pirate";
350
  type  = buspirate;
351
;
352
 
353
# This is supposed to be the "default" STK500 entry.
354
# Attempts to select the correct firmware version
355
# by probing for it.  Better use one of the entries
356
# below instead.
357
programmer
358
  id    = "stk500";
359
  desc  = "Atmel STK500";
360
  type  = stk500generic;
361
;
362
 
363
programmer
364
  id    = "stk500v1";
365
  desc  = "Atmel STK500 Version 1.x firmware";
366
  type  = stk500;
367
;
368
 
369
programmer
370
  id    = "mib510";
371
  desc  = "Crossbow MIB510 programming board";
372
  type  = stk500;
373
;
374
 
375
programmer
376
  id    = "stk500v2";
377
  desc  = "Atmel STK500 Version 2.x firmware";
378
  type  = stk500v2;
379
;
380
 
381
programmer
382
  id    = "stk500pp";
383
  desc  = "Atmel STK500 V2 in parallel programming mode";
384
  type  = stk500pp;
385
;
386
 
387
programmer
388
  id    = "stk500hvsp";
389
  desc  = "Atmel STK500 V2 in high-voltage serial programming mode";
390
  type  = stk500hvsp;
391
;
392
 
393
programmer
394
  id    = "stk600";
395
  desc  = "Atmel STK600";
396
  type  = stk600;
397
;
398
 
399
programmer
400
  id    = "stk600pp";
401
  desc  = "Atmel STK600 in parallel programming mode";
402
  type  = stk600pp;
403
;
404
 
405
programmer
406
  id    = "stk600hvsp";
407
  desc  = "Atmel STK600 in high-voltage serial programming mode";
408
  type  = stk600hvsp;
409
;
410
 
411
programmer
412
  id    = "avr910";
413
  desc  = "Atmel Low Cost Serial Programmer";
414
  type  = avr910;
415
;
416
 
417
programmer
418
  id    = "usbasp";
419
  desc  = "USBasp, http://www.fischl.de/usbasp/";
420
  type  = usbasp;
421
;
422
 
423
programmer
424
  id    = "usbtiny";
425
  desc  = "USBtiny simple USB programmer, http://www.ladyada.net/make/usbtinyisp/";
426
  type  = usbtiny;
427
;
428
 
429
programmer
430
  id    = "butterfly";
431
  desc  = "Atmel Butterfly Development Board";
432
  type  = butterfly;
433
;
434
 
435
programmer
436
  id    = "avr109";
437
  desc  = "Atmel AppNote AVR109 Boot Loader";
438
  type  = butterfly;
439
;
440
 
441
programmer
442
  id    = "avr911";
443
  desc  = "Atmel AppNote AVR911 AVROSP";
444
  type  = butterfly;
445
;
446
 
447
programmer
448
  id    = "jtagmkI";
449
  desc  = "Atmel JTAG ICE (mkI)";
450
  baudrate = 115200;    # default is 115200
451
  type  = jtagmki;
452
;
453
 
454
# easier to type
455
programmer
456
  id    = "jtag1";
457
  desc  = "Atmel JTAG ICE (mkI)";
458
  baudrate = 115200;    # default is 115200
459
  type  = jtagmki;
460
;
461
 
462
# easier to type
463
programmer
464
  id    = "jtag1slow";
465
  desc  = "Atmel JTAG ICE (mkI)";
466
  baudrate = 19200;
467
  type  = jtagmki;
468
;
469
 
470
programmer
471
  id    = "jtagmkII";
472
  desc  = "Atmel JTAG ICE mkII";
473
  baudrate = 19200;    # default is 19200
474
  type  = jtagmkii;
475
;
476
 
477
# easier to type
478
programmer
479
  id    = "jtag2slow";
480
  desc  = "Atmel JTAG ICE mkII";
481
  baudrate = 19200;    # default is 19200
482
  type  = jtagmkii;
483
;
484
 
485
# JTAG ICE mkII @ 115200 Bd
486
programmer
487
  id    = "jtag2fast";
488
  desc  = "Atmel JTAG ICE mkII";
489
  baudrate = 115200;
490
  type  = jtagmkii;
491
;
492
 
493
# make the fast one the default, people will love that
494
programmer
495
  id    = "jtag2";
496
  desc  = "Atmel JTAG ICE mkII";
497
  baudrate = 115200;
498
  type  = jtagmkii;
499
;
500
 
501
# JTAG ICE mkII in ISP mode
502
programmer
503
  id    = "jtag2isp";
504
  desc  = "Atmel JTAG ICE mkII in ISP mode";
505
  baudrate = 115200;
506
  type  = jtagmkii_isp;
507
;
508
 
509
# JTAG ICE mkII in debugWire mode
510
programmer
511
  id    = "jtag2dw";
512
  desc  = "Atmel JTAG ICE mkII in debugWire mode";
513
  baudrate = 115200;
514
  type  = jtagmkii_dw;
515
;
516
 
517
# JTAG ICE mkII in AVR32 mode
518
programmer
519
  id    = "jtagmkII_avr32";
520
  desc  = "Atmel JTAG ICE mkII im AVR32 mode";
521
  baudrate = 115200;
522
  type  = jtagmkii_avr32;
523
;
524
 
525
# JTAG ICE mkII in AVR32 mode
526
programmer
527
  id    = "jtag2avr32";
528
  desc  = "Atmel JTAG ICE mkII im AVR32 mode";
529
  baudrate = 115200;
530
  type  = jtagmkii_avr32;
531
;
532
 
533
# JTAG ICE mkII in PDI mode
534
programmer
535
  id    = "jtag2pdi";
536
  desc  = "Atmel JTAG ICE mkII PDI mode";
537
  baudrate = 115200;
538
  type  = jtagmkii_pdi;
539
;
540
 
541
# AVR Dragon in JTAG mode
542
programmer
543
  id    = "dragon_jtag";
544
  desc  = "Atmel AVR Dragon in JTAG mode";
545
  baudrate = 115200;
546
  type  = dragon_jtag;
547
;
548
 
549
# AVR Dragon in ISP mode
550
programmer
551
  id    = "dragon_isp";
552
  desc  = "Atmel AVR Dragon in ISP mode";
553
  baudrate = 115200;
554
  type  = dragon_isp;
555
;
556
 
557
# AVR Dragon in PP mode
558
programmer
559
  id    = "dragon_pp";
560
  desc  = "Atmel AVR Dragon in PP mode";
561
  baudrate = 115200;
562
  type  = dragon_pp;
563
;
564
 
565
# AVR Dragon in HVSP mode
566
programmer
567
  id    = "dragon_hvsp";
568
  desc  = "Atmel AVR Dragon in HVSP mode";
569
  baudrate = 115200;
570
  type  = dragon_hvsp;
571
;
572
 
573
# AVR Dragon in debugWire mode
574
programmer
575
  id    = "dragon_dw";
576
  desc  = "Atmel AVR Dragon in debugWire mode";
577
  baudrate = 115200;
578
  type  = dragon_dw;
579
;
580
 
581
# AVR Dragon in PDI mode
582
programmer
583
  id    = "dragon_pdi";
584
  desc  = "Atmel AVR Dragon in PDI mode";
585
  baudrate = 115200;
586
  type  = dragon_pdi;
587
;
588
 
589
programmer
590
  id    = "pavr";
591
  desc  = "Jason Kyle's pAVR Serial Programmer";
592
  type  = avr910;
593
;
594
 
595
# Parallel port programmers.
596
 
597
programmer
598
  id    = "bsd";
599
  desc  = "Brian Dean's Programmer, http://www.bsdhome.com/avrdude/";
600
  type  = par;
601
  vcc   = 2, 3, 4, 5;
602
  reset = 7;
603
  sck   = 8;
604
  mosi  = 9;
605
  miso  = 10;
606
;
607
 
608
programmer
609
  id    = "stk200";
610
  desc  = "STK200";
611
  type  = par;
612
  buff  = 4, 5;
613
  sck   = 6;
614
  mosi  = 7;
615
  reset = 9;
616
  miso  = 10;
617
;
618
 
619
# The programming dongle used by the popular Ponyprog
620
# utility.  It is almost similar to the STK200 one,
621
# except that there is a LED indicating that the
622
# programming is currently in progress.
623
 
624
programmer
625
  id    = "pony-stk200";
626
  desc  = "Pony Prog STK200";
627
  type  = par;
628
  buff  = 4, 5;
629
  sck   = 6;
630
  mosi  = 7;
631
  reset = 9;
632
  miso  = 10;
633
  pgmled = 8;
634
;
635
 
636
programmer
637
  id    = "dt006";
638
  desc  = "Dontronics DT006";
639
  type  = par;
640
  reset = 4;
641
  sck   = 5;
642
  mosi  = 2;
643
  miso  = 11;
644
;
645
 
646
programmer
647
  id    = "bascom";
648
  desc  = "Bascom SAMPLE programming cable";
649
  type  = par;
650
  reset = 4;
651
  sck   = 5;
652
  mosi  = 2;
653
  miso  = 11;
654
;
655
 
656
programmer
657
  id     = "alf";
658
  desc   = "Nightshade ALF-PgmAVR, http://nightshade.homeip.net/";
659
  type   = par;
660
  vcc    = 2, 3, 4, 5;
661
  buff   = 6;
662
  reset  = 7;
663
  sck    = 8;
664
  mosi   = 9;
665
  miso   = 10;
666
  errled = 1;
667
  rdyled = 14;
668
  pgmled = 16;
669
  vfyled = 17;
670
;
671
 
672
programmer
673
  id    = "sp12";
674
  desc  = "Steve Bolt's Programmer";
675
  type  = par;
676
  vcc   = 4,5,6,7,8;
677
  reset = 3;
678
  sck   = 2;
679
  mosi  = 9;
680
  miso  = 11;
681
;
682
 
683
programmer
684
  id     = "picoweb";
685
  desc   = "Picoweb Programming Cable, http://www.picoweb.net/";
686
  type   = par;
687
  reset  = 2;
688
  sck    = 3;
689
  mosi   = 4;
690
  miso   = 13;
691
;
692
 
693
programmer
694
  id    = "abcmini";
695
  desc  = "ABCmini Board, aka Dick Smith HOTCHIP";
696
  type  = par;
697
  reset = 4;
698
  sck   = 3;
699
  mosi  = 2;
700
  miso  = 10;
701
;
702
 
703
programmer
704
  id    = "futurlec";
705
  desc  = "Futurlec.com programming cable.";
706
  type  = par;
707
  reset = 3;
708
  sck   = 2;
709
  mosi  = 1;
710
  miso  = 10;
711
;
712
 
713
 
714
# From the contributor of the "xil" jtag cable:
715
# The "vcc" definition isn't really vcc (the cable gets its power from
716
# the programming circuit) but is necessary to switch one of the
717
# buffer lines (trying to add it to the "buff" lines doesn't work).
718
# With this, TMS connects to RESET, TDI to MOSI, TDO to MISO and TCK
719
# to SCK (plus vcc/gnd of course)
720
programmer
721
  id    = "xil";
722
  desc  = "Xilinx JTAG cable";
723
  type  = par;
724
  mosi  = 2;
725
  sck   = 3;
726
  reset = 4;
727
  buff  = 5;
728
  miso  = 13;
729
  vcc   = 6;
730
;
731
 
732
 
733
programmer
734
  id = "dapa";
735
  desc = "Direct AVR Parallel Access cable";
736
  type = par;
737
  vcc   = 3;
738
  reset = 16;
739
  sck = 1;
740
  mosi = 2;
741
  miso = 11;
742
;
743
 
744
programmer
745
  id    = "atisp";
746
  desc  = "AT-ISP V1.1 programming cable for AVR-SDK1 from <http://micro-research.co.th/> micro-research.co.th";
747
  type  = par;
748
  reset = ~6;
749
  sck   = ~8;
750
  mosi  = ~7;
751
  miso  = ~10;
752
;
753
 
754
programmer
755
  id    = "ere-isp-avr";
756
  desc  = "ERE ISP-AVR <http://www.ere.co.th/download/sch050713.pdf>";
757
  type  = par;
758
  reset = ~4;
759
  sck   = 3;
760
  mosi  = 2;
761
  miso  = 10;
762
;
763
 
764
programmer
765
  id    = "blaster";
766
  desc  = "Altera ByteBlaster";
767
  type  = par;
768
  sck   = 2;
769
  miso  = 11;
770
  reset = 3;
771
  mosi  = 8;
772
  buff  = 14;
773
;
774
 
775
# It is almost same as pony-stk200, except vcc on pin 5 to auto
776
# disconnect port (download on http://electropol.free.fr)
777
programmer
778
  id    = "frank-stk200";
779
  desc  = "Frank STK200";
780
  type  = par;
781
  vcc   = 5;
782
  sck   = 6;
783
  mosi  = 7;
784
  reset = 9;
785
  miso  = 10;
786
  pgmled = 8;
787
;
788
 
789
# The AT98ISP Cable is a simple parallel dongle for AT89 family.
790
# http://www.atmel.com/dyn/products/tools_card.asp?tool_id=2877
791
programmer
792
id = "89isp";
793
desc = "Atmel at89isp cable";
794
type = par;
795
reset = 17;
796
sck = 1;
797
mosi = 2;
798
miso = 10;
799
;
800
 
801
 
802
#
803
# some ultra cheap programmers use bitbanging on the
804
# serialport.
805
#
806
# PC - DB9 - Pins for RS232:
807
#
808
# GND   5   -- |O
809
#              |   O| <-   9   RI
810
# DTR   4   <- |O   |
811
#              |   O| <-   8   CTS
812
# TXD   3   <- |O   |
813
#              |   O| ->   7   RTS
814
# RXD   2   -> |O   |
815
#              |   O| <-   6   DSR
816
# DCD   1   -> |O
817
#
818
# Using RXD is currently not supported.
819
# Using RI is not supported under Win32 but is supported under Posix.
820
 
821
# serial ponyprog design (dasa2 in uisp)
822
# reset=!txd sck=rts mosi=dtr miso=cts
823
 
824
programmer
825
  id    = "ponyser";
826
  desc  = "design ponyprog serial, reset=!txd sck=rts mosi=dtr miso=cts";
827
  type  = serbb;
828
  reset = ~3;
829
  sck   = 7;
830
  mosi  = 4;
831
  miso  = 8;
832
;
833
 
834
# Same as above, different name
835
# reset=!txd sck=rts mosi=dtr miso=cts
836
 
837
programmer
838
  id    = "siprog";
839
  desc  = "Lancos SI-Prog <http://www.lancos.com/siprogsch.html>";
840
  type  = serbb;
841
  reset = ~3;
842
  sck   = 7;
843
  mosi  = 4;
844
  miso  = 8;
845
;
846
 
847
# unknown (dasa in uisp)
848
# reset=rts sck=dtr mosi=txd miso=cts
849
 
850
programmer
851
  id    = "dasa";
852
  desc  = "serial port banging, reset=rts sck=dtr mosi=txd miso=cts";
853
  type  = serbb;
854
  reset = 7;
855
  sck   = 4;
856
  mosi  = 3;
857
  miso  = 8;
858
;
859
 
860
# unknown (dasa3 in uisp)
861
# reset=!dtr sck=rts mosi=txd miso=cts
862
 
863
programmer
864
  id    = "dasa3";
865
  desc  = "serial port banging, reset=!dtr sck=rts mosi=txd miso=cts";
866
  type  = serbb;
867
  reset = ~4;
868
  sck   = 7;
869
  mosi  = 3;
870
  miso  = 8;
871
;
872
 
873
# C2N232i (jumper configuration "auto")
874
# reset=dtr sck=!rts mosi=!txd miso=!cts
875
 
876
programmer
877
  id    = "c2n232i";
878
  desc  = "serial port banging, reset=dtr sck=!rts mosi=!txd miso=!cts";
879
  type  = serbb;
880
  reset = 4;
881
  sck   = ~7;
882
  mosi  = ~3;
883
  miso  = ~8;
884
;
885
 
886
#
887
# PART DEFINITIONS
888
#
889
 
890
#------------------------------------------------------------
891
# ATtiny11
892
#------------------------------------------------------------
893
 
894
# This is an HVSP-only device.
895
 
896
part
897
    id                  = "t11";
898
    desc                = "ATtiny11";
899
    stk500_devcode      = 0x11;
900
    signature           = 0x1e 0x90 0x04;
901
    chip_erase_delay    = 20000;
902
 
903
    timeout		= 200;
904
    hvsp_controlstack     =
905
        0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00,
906
        0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78,
907
        0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
908
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
909
    hventerstabdelay    = 100;
910
    progmodedelay       = 0;
911
    hvspcmdexedelay     = 0;
912
    synchcycles         = 6;
913
    latchcycles         = 1;
914
    togglevtg           = 1;
915
    poweroffdelay       = 25;
916
    resetdelayms        = 0;
917
    resetdelayus        = 50;
918
    hvleavestabdelay    = 100;
919
    resetdelay          = 25;
920
    chiperasepolltimeout = 40;
921
    chiperasetime       = 0;
922
    programfusepolltimeout = 25;
923
    programlockpolltimeout = 25;
924
 
925
    memory "eeprom"
926
        size            = 64;
927
	blocksize	= 64;
928
	readsize	= 256;
929
	delay		= 5;
930
    ;
931
 
932
    memory "flash"
933
        size            = 1024;
934
	blocksize	= 128;
935
	readsize	= 256;
936
	delay		= 3;
937
    ;
938
 
939
    memory "signature"
940
        size            = 3;
941
    ;
942
 
943
    memory "lock"
944
        size            = 1;
945
    ;
946
 
947
    memory "calibration"
948
        size            = 1;
949
    ;
950
 
951
    memory "fuse"
952
        size            = 1;
953
    ;
954
;
955
 
956
#------------------------------------------------------------
957
# ATtiny12
958
#------------------------------------------------------------
959
 
960
part
961
    id                  = "t12";
962
    desc                = "ATtiny12";
963
    stk500_devcode      = 0x12;
964
    avr910_devcode      = 0x55;
965
    signature           = 0x1e 0x90 0x05;
966
    chip_erase_delay    = 20000;
967
    pgm_enable          = "1 0 1 0  1 1 0 0   0 1 0 1  0 0 1 1",
968
                          "x x x x  x x x x   x x x x  x x x x";
969
 
970
    chip_erase          = "1 0 1 0  1 1 0 0   1 0 0 x  x x x x",
971
                          "x x x x  x x x x   x x x x  x x x x";
972
 
973
    timeout		= 200;
974
    stabdelay		= 100;
975
    cmdexedelay		= 25;
976
    synchloops		= 32;
977
    bytedelay		= 0;
978
    pollindex		= 3;
979
    pollvalue		= 0x53;
980
    predelay		= 1;
981
    postdelay		= 1;
982
    pollmethod		= 0;
983
 
984
    hvsp_controlstack   =
985
        0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00,
986
        0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78,
987
        0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
988
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
989
    hventerstabdelay    = 100;
990
    hvspcmdexedelay     = 0;
991
    synchcycles         = 6;
992
    latchcycles         = 1;
993
    togglevtg           = 1;
994
    poweroffdelay       = 25;
995
    resetdelayms        = 0;
996
    resetdelayus        = 50;
997
    hvleavestabdelay    = 100;
998
    resetdelay          = 25;
999
    chiperasepolltimeout = 40;
1000
    chiperasetime       = 0;
1001
    programfusepolltimeout = 25;
1002
    programlockpolltimeout = 25;
1003
 
1004
    memory "eeprom"
1005
        size            = 64;
1006
        min_write_delay = 9000;
1007
        max_write_delay = 20000;
1008
        readback_p1     = 0xff;
1009
        readback_p2     = 0xff;
1010
        read            = "1  0  1  0   0  0  0  0    x x x x  x x x x",
1011
                          "x  x a5 a4  a3 a2 a1 a0    o o o o  o o o o";
1012
 
1013
        write           = "1  1  0  0   0  0  0  0    x x x x  x x x x",
1014
                          "x  x a5 a4  a3 a2 a1 a0    i i i i  i i i i";
1015
 
1016
	mode		= 0x04;
1017
	delay		= 8;
1018
	blocksize	= 64;
1019
	readsize	= 256;
1020
    ;
1021
 
1022
    memory "flash"
1023
        size            = 1024;
1024
        min_write_delay = 4500;
1025
        max_write_delay = 20000;
1026
        readback_p1     = 0xff;
1027
        readback_p2     = 0xff;
1028
        read_lo         = "  0  0  1  0   0  0  0  0",
1029
                          "  x  x  x  x   x  x  x a8",
1030
                          " a7 a6 a5 a4  a3 a2 a1 a0",
1031
                          "  o  o  o  o   o  o  o  o";
1032
 
1033
        read_hi         = "  0  0  1  0   1  0  0  0",
1034
                          "  x  x  x  x   x  x  x a8",
1035
                          " a7 a6 a5 a4  a3 a2 a1 a0",
1036
                          "  o  o  o  o   o  o  o  o";
1037
 
1038
        write_lo        = "  0  1  0  0   0  0  0  0",
1039
                          "  x  x  x  x   x  x  x a8",
1040
                          " a7 a6 a5 a4  a3 a2 a1 a0",
1041
                          "  i  i  i  i   i  i  i  i";
1042
 
1043
        write_hi        = "  0  1  0  0   1  0  0  0",
1044
                          "  x  x  x  x   x  x  x a8",
1045
                          " a7 a6 a5 a4  a3 a2 a1 a0",
1046
                          "  i  i  i  i   i  i  i  i";
1047
 
1048
	mode		= 0x04;
1049
	delay		= 5;
1050
	blocksize	= 128;
1051
	readsize	= 256;
1052
    ;
1053
 
1054
    memory "signature"
1055
        size            = 3;
1056
        read            = "0  0  1  1   0  0  0  0    x x x x  x x x x",
1057
                          "0  0  0  0   0  0 a1 a0    o o o o  o o o o";
1058
    ;
1059
 
1060
    memory "lock"
1061
        size            = 1;
1062
        read            = "0  1  0  1   1  0  0  0    x x x x  x x x x",
1063
                          "x  x  x  x   x  x  x  x    x x x x  x o o x";
1064
 
1065
        write           = "1  0  1  0   1  1  0  0    1 1 1 1  1 i i 1",
1066
                          "x  x  x  x   x  x  x  x    x x x x  x x x x";
1067
        min_write_delay = 9000;
1068
        max_write_delay = 9000;
1069
    ;
1070
 
1071
    memory "calibration"
1072
        size            = 1;
1073
        read            = "0  0  1  1   1  0  0  0    x x x x  x x x x",
1074
                          "0  0  0  0   0  0  0  0    o o o o  o o o o";
1075
    ;
1076
 
1077
    memory "fuse"
1078
        size            = 1;
1079
        read            = "0  1  0  1   0  0  0  0    x x x x  x x x x",
1080
                          "x  x  x  x   x  x  x  x    o o o o  o o o o";
1081
 
1082
        write           = "1  0  1  0   1  1  0  0    1 0 1 x  x x x x",
1083
                          "x  x  x  x   x  x  x  x    i i i i  i i i i";
1084
        min_write_delay = 9000;
1085
        max_write_delay = 9000;
1086
    ;
1087
;
1088
 
1089
#------------------------------------------------------------
1090
# ATtiny13
1091
#------------------------------------------------------------
1092
 
1093
part
1094
    id                  = "t13";
1095
    desc                = "ATtiny13";
1096
     has_debugwire = yes;
1097
     flash_instr   = 0xB4, 0x0E, 0x1E;
1098
     eeprom_instr  = 0xBB, 0xFE, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
1099
	             0xBC, 0x0E, 0xB4, 0x0E, 0xBA, 0x0D, 0xBB, 0xBC,
1100
	             0x99, 0xE1, 0xBB, 0xAC;
1101
    stk500_devcode      = 0x14;
1102
    signature           = 0x1e 0x90 0x07;
1103
    chip_erase_delay    = 4000;
1104
    pgm_enable          = "1 0 1 0  1 1 0 0   0 1 0 1  0 0 1 1",
1105
                          "x x x x  x x x x   x x x x  x x x x";
1106
 
1107
    chip_erase          = "1 0 1 0  1 1 0 0   1 0 0 x  x x x x",
1108
                          "x x x x  x x x x   x x x x  x x x x";
1109
 
1110
    timeout		= 200;
1111
    stabdelay		= 100;
1112
    cmdexedelay		= 25;
1113
    synchloops		= 32;
1114
    bytedelay		= 0;
1115
    pollindex		= 3;
1116
    pollvalue		= 0x53;
1117
    predelay		= 1;
1118
    postdelay		= 1;
1119
    pollmethod		= 1;
1120
 
1121
    hvsp_controlstack     =
1122
	0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
1123
        0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
1124
        0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
1125
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
1126
    hventerstabdelay    = 100;
1127
    progmodedelay       = 0;
1128
    hvspcmdexedelay     = 0;
1129
    synchcycles         = 6;
1130
    latchcycles         = 1;
1131
    togglevtg           = 1;
1132
    poweroffdelay       = 25;
1133
    resetdelayms        = 0;
1134
    resetdelayus        = 90;
1135
    hvleavestabdelay    = 100;
1136
    resetdelay          = 25;
1137
    chiperasepolltimeout = 40;
1138
    chiperasetime       = 0;
1139
    programfusepolltimeout = 25;
1140
    programlockpolltimeout = 25;
1141
 
1142
    memory "eeprom"
1143
        size            = 64;
1144
        page_size       = 4;
1145
        min_write_delay = 4000;
1146
        max_write_delay = 4000;
1147
        readback_p1     = 0xff;
1148
        readback_p2     = 0xff;
1149
        read            = "1  0  1  0   0  0  0  0    0 0 0 x  x x x x",
1150
                          "x  x a5 a4  a3 a2 a1 a0    o o o o  o o o o";
1151
 
1152
        write           = "1  1  0  0   0  0  0  0    0 0 0 x  x x x x",
1153
                          "x  x a5 a4  a3 a2 a1 a0    i i i i  i i i i";
1154
 
1155
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
1156
			  "  0   0   0   0      0   0   0   0",
1157
			  "  0   0   0   0      0   0  a1  a0",
1158
			  "  i   i   i   i      i   i   i   i";
1159
 
1160
	writepage	= "  1   1   0   0      0   0   1   0",
1161
			  "  0   0   x   x      x   x   x   x",
1162
			  "  x   x  a5  a4     a3  a2   0   0",
1163
			  "  x   x   x   x      x   x   x   x";
1164
 
1165
	mode		= 0x41;
1166
	delay		= 5;
1167
	blocksize	= 4;
1168
	readsize	= 256;
1169
    ;
1170
 
1171
    memory "flash"
1172
        paged           = yes;
1173
        size            = 1024;
1174
        page_size       = 32;
1175
        num_pages       = 32;
1176
        min_write_delay = 4500;
1177
        max_write_delay = 4500;
1178
        readback_p1     = 0xff;
1179
        readback_p2     = 0xff;
1180
        read_lo         = "  0  0  1  0   0  0  0  0",
1181
                          "  0  0  0  0   0  0  0 a8",
1182
                          " a7 a6 a5 a4  a3 a2 a1 a0",
1183
                          "  o  o  o  o   o  o  o  o";
1184
 
1185
        read_hi         = "  0  0  1  0   1  0  0  0",
1186
                          "  0  0  0  0   0  0  0 a8",
1187
                          " a7 a6 a5 a4  a3 a2 a1 a0",
1188
                          "  o  o  o  o   o  o  o  o";
1189
 
1190
        loadpage_lo     = "  0  1  0  0   0  0  0  0",
1191
                          "  0  0  0  x   x  x  x  x",
1192
                          "  x  x  x  x  a3 a2 a1 a0",
1193
                          "  i  i  i  i   i  i  i  i";
1194
 
1195
        loadpage_hi     = "  0  1  0  0   1  0  0  0",
1196
                          "  0  0  0  x   x  x  x  x",
1197
                          "  x  x  x  x  a3 a2 a1 a0",
1198
                          "  i  i  i  i   i  i  i  i";
1199
 
1200
        writepage       = "  0  1  0  0   1  1  0  0",
1201
                          "  0  0  0  0   0  0  0 a8",
1202
                          " a7 a6 a5 a4   x  x  x  x",
1203
                          "  x  x  x  x   x  x  x  x";
1204
 
1205
	mode		= 0x41;
1206
	delay		= 6;
1207
	blocksize	= 32;
1208
	readsize	= 256;
1209
    ;
1210
 
1211
    memory "signature"
1212
        size            = 3;
1213
        read            = "0  0  1  1   0  0  0  0    0 0 0 x  x x x x",
1214
                          "x  x  x  x   x  x a1 a0    o o o o  o o o o";
1215
    ;
1216
 
1217
    memory "lock"
1218
        size            = 1;
1219
        min_write_delay = 4500;
1220
        max_write_delay = 4500;
1221
 
1222
	read            = "0  1  0  1   1  0  0  0    0 0 0 0  0 0 0 0",
1223
                          "x  x  x  x   x  x  x  x    x x o o  o o o o";
1224
 
1225
        write           = "1  0  1  0   1  1  0  0    1 1 1 x  x x x x",
1226
                          "x  x  x  x   x  x  x  x    1 1 i i  i i i i";
1227
    ;
1228
 
1229
    memory "calibration"
1230
        size            = 2;
1231
        read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
1232
                          "0  0  0  0   0  0  0 a0    o o o o  o o o o";
1233
    ;
1234
 
1235
    memory "lfuse"
1236
        size            = 1;
1237
        min_write_delay = 4500;
1238
        max_write_delay = 4500;
1239
 
1240
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
1241
                          "x x x x  x x x x  i i i i  i i i i";
1242
 
1243
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
1244
                          "x x x x  x x x x  o o o o  o o o o";
1245
      ;
1246
 
1247
    memory "hfuse"
1248
        size            = 1;
1249
        min_write_delay = 4500;
1250
        max_write_delay = 4500;
1251
 
1252
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
1253
                          "x x x x  x x x x  i i i i  i i i i";
1254
 
1255
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
1256
                          "x x x x  x x x x  o o o o  o o o o";
1257
      ;
1258
 
1259
;
1260
 
1261
 
1262
#------------------------------------------------------------
1263
# ATtiny15
1264
#------------------------------------------------------------
1265
 
1266
part
1267
    id                  = "t15";
1268
    desc                = "ATtiny15";
1269
    stk500_devcode      = 0x13;
1270
    avr910_devcode      = 0x56;
1271
    signature           = 0x1e 0x90 0x06;
1272
    chip_erase_delay    = 8200;
1273
    pgm_enable          = "1 0 1 0  1 1 0 0   0 1 0 1  0 0 1 1",
1274
                          "x x x x  x x x x   x x x x  x x x x";
1275
 
1276
    chip_erase          = "1 0 1 0  1 1 0 0   1 0 0 x  x x x x",
1277
                          "x x x x  x x x x   x x x x  x x x x";
1278
 
1279
    timeout		= 200;
1280
    stabdelay		= 100;
1281
    cmdexedelay		= 25;
1282
    synchloops		= 32;
1283
    bytedelay		= 0;
1284
    pollindex		= 3;
1285
    pollvalue		= 0x53;
1286
    predelay		= 1;
1287
    postdelay		= 1;
1288
    pollmethod		= 0;
1289
 
1290
    hvsp_controlstack   =
1291
        0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00,
1292
        0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78,
1293
        0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
1294
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
1295
    hventerstabdelay    = 100;
1296
    hvspcmdexedelay     = 5;
1297
    synchcycles         = 6;
1298
    latchcycles         = 16;
1299
    togglevtg           = 1;
1300
    poweroffdelay       = 25;
1301
    resetdelayms        = 0;
1302
    resetdelayus        = 50;
1303
    hvleavestabdelay    = 100;
1304
    resetdelay          = 25;
1305
    chiperasepolltimeout = 40;
1306
    chiperasetime       = 0;
1307
    programfusepolltimeout = 25;
1308
    programlockpolltimeout = 25;
1309
 
1310
    memory "eeprom"
1311
        size            = 64;
1312
        min_write_delay = 8200;
1313
        max_write_delay = 8200;
1314
        readback_p1     = 0xff;
1315
        readback_p2     = 0xff;
1316
        read            = "1  0  1  0   0  0  0  0    x x x x  x x x x",
1317
                          "x  x a5 a4  a3 a2 a1 a0    o o o o  o o o o";
1318
 
1319
        write           = "1  1  0  0   0  0  0  0    x x x x  x x x x",
1320
                          "x  x a5 a4  a3 a2 a1 a0    i i i i  i i i i";
1321
 
1322
	mode		= 0x04;
1323
	delay		= 10;
1324
	blocksize	= 64;
1325
	readsize	= 256;
1326
    ;
1327
 
1328
    memory "flash"
1329
        size            = 1024;
1330
        min_write_delay = 4100;
1331
        max_write_delay = 4100;
1332
        readback_p1     = 0xff;
1333
        readback_p2     = 0xff;
1334
        read_lo         = "  0  0  1  0   0  0  0  0",
1335
                          "  x  x  x  x   x  x  x a8",
1336
                          " a7 a6 a5 a4  a3 a2 a1 a0",
1337
                          "  o  o  o  o   o  o  o  o";
1338
 
1339
        read_hi         = "  0  0  1  0   1  0  0  0",
1340
                          "  x  x  x  x   x  x  x a8",
1341
                          " a7 a6 a5 a4  a3 a2 a1 a0",
1342
                          "  o  o  o  o   o  o  o  o";
1343
 
1344
        write_lo        = "  0  1  0  0   0  0  0  0",
1345
                          "  x  x  x  x   x  x  x a8",
1346
                          " a7 a6 a5 a4  a3 a2 a1 a0",
1347
                          "  i  i  i  i   i  i  i  i";
1348
 
1349
        write_hi        = "  0  1  0  0   1  0  0  0",
1350
                          "  x  x  x  x   x  x  x a8",
1351
                          " a7 a6 a5 a4  a3 a2 a1 a0",
1352
                          "  i  i  i  i   i  i  i  i";
1353
 
1354
	mode		= 0x04;
1355
	delay		= 5;
1356
	blocksize	= 128;
1357
	readsize	= 256;
1358
    ;
1359
 
1360
    memory "signature"
1361
        size            = 3;
1362
        read            = "0  0  1  1   0  0  0  0    x x x x  x x x x",
1363
                          "0  0  0  0   0  0 a1 a0    o o o o  o o o o";
1364
    ;
1365
 
1366
    memory "lock"
1367
        size            = 1;
1368
        read            = "0  1  0  1   1  0  0  0    x x x x  x x x x",
1369
                          "x  x  x  x   x  x  x  x    x x x x  x o o x";
1370
 
1371
        write           = "1  0  1  0   1  1  0  0    1 1 1 1  1 i i 1",
1372
                          "x  x  x  x   x  x  x  x    x x x x  x x x x";
1373
        min_write_delay = 9000;
1374
        max_write_delay = 9000;
1375
    ;
1376
 
1377
    memory "calibration"
1378
        size            = 1;
1379
        read            = "0  0  1  1   1  0  0  0    x x x x  x x x x",
1380
                          "0  0  0  0   0  0  0  0    o o o o  o o o o";
1381
    ;
1382
 
1383
    memory "fuse"
1384
        size            = 1;
1385
        read            = "0  1  0  1   0  0  0  0    x x x x  x x x x",
1386
                          "x  x  x  x   x  x  x  x    o o o o  x x o o";
1387
 
1388
        write           = "1  0  1  0   1  1  0  0    1 0 1 x  x x x x",
1389
                          "x  x  x  x   x  x  x  x    i i i i  1 1 i i";
1390
        min_write_delay = 9000;
1391
        max_write_delay = 9000;
1392
    ;
1393
;
1394
 
1395
#------------------------------------------------------------
1396
# AT90s1200
1397
#------------------------------------------------------------
1398
 
1399
part
1400
    id               = "1200";
1401
    desc             = "AT90S1200";
1402
    stk500_devcode   = 0x33;
1403
    avr910_devcode   = 0x13;
1404
    signature        = 0x1e 0x90 0x01;
1405
    pagel            = 0xd7;
1406
    bs2              = 0xa0;
1407
    chip_erase_delay = 20000;
1408
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
1409
                       "x x x x  x x x x    x x x x  x x x x";
1410
 
1411
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
1412
                       "x x x x  x x x x    x x x x  x x x x";
1413
 
1414
    timeout		= 200;
1415
    stabdelay		= 100;
1416
    cmdexedelay		= 25;
1417
    synchloops		= 1;
1418
    bytedelay		= 0;
1419
    pollindex		= 0;
1420
    pollvalue		= 0xFF;
1421
    predelay		= 1;
1422
    postdelay		= 1;
1423
    pollmethod		= 0;
1424
 
1425
    pp_controlstack     =
1426
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
1427
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
1428
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
1429
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
1430
    hventerstabdelay    = 100;
1431
    progmodedelay       = 0;
1432
    latchcycles         = 0;
1433
    togglevtg           = 0;
1434
    poweroffdelay       = 0;
1435
    resetdelayms        = 0;
1436
    resetdelayus        = 0;
1437
    hvleavestabdelay    = 15;
1438
    chiperasepulsewidth = 15;
1439
    chiperasepolltimeout = 0;
1440
    programfusepulsewidth = 2;
1441
    programfusepolltimeout = 0;
1442
    programlockpulsewidth = 0;
1443
    programlockpolltimeout = 1;
1444
 
1445
    memory "eeprom"
1446
        size            = 64;
1447
        min_write_delay = 4000;
1448
        max_write_delay = 9000;
1449
        readback_p1     = 0x00;
1450
        readback_p2     = 0xff;
1451
        read            = "1 0  1  0   0  0  0  0   x x x x  x x x x",
1452
                          "x x a5 a4  a3 a2 a1 a0   o o o o  o o o o";
1453
 
1454
        write           = "1 1  0  0   0  0  0  0   x x x x  x x x x",
1455
                          "x x a5 a4  a3 a2 a1 a0   i i i i  i i i i";
1456
 
1457
	mode		= 0x04;
1458
	delay		= 20;
1459
	blocksize	= 32;
1460
	readsize	= 256;
1461
      ;
1462
    memory "flash"
1463
        size            = 1024;
1464
        min_write_delay = 4000;
1465
        max_write_delay = 9000;
1466
        readback_p1     = 0xff;
1467
        readback_p2     = 0xff;
1468
        read_lo         = "  0   0   1   0    0   0   0   0",
1469
                          "  x   x   x   x    x   x   x  a8",
1470
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1471
                          "  o   o   o   o    o   o   o   o";
1472
 
1473
        read_hi         = "  0   0   1   0    1   0   0   0",
1474
                          "  x   x   x   x    x   x   x  a8",
1475
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1476
                          "  o   o   o   o    o   o   o   o";
1477
 
1478
        write_lo        = "  0   1   0   0    0   0   0   0",
1479
                          "  x   x   x   x    x   x   x  a8",
1480
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1481
                          "  i   i   i   i    i   i   i   i";
1482
 
1483
        write_hi        = "  0   1   0   0    1   0   0   0",
1484
                          "  x   x   x   x    x   x   x  a8",
1485
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1486
                          "  i   i   i   i    i   i   i   i";
1487
 
1488
	mode		= 0x02;
1489
	delay		= 15;
1490
	blocksize	= 128;
1491
	readsize	= 256;
1492
      ;
1493
    memory "signature"
1494
        size            = 3;
1495
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
1496
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
1497
      ;
1498
    memory "fuse"
1499
        size            = 1;
1500
      ;
1501
    memory "lock"
1502
        size            = 1;
1503
        min_write_delay = 9000;
1504
        max_write_delay = 20000;
1505
        write           = "1 0 1 0  1 1 0 0   1 1 1 1  1 i i 1",
1506
                          "x x x x  x x x x   x x x x  x x x x";
1507
      ;
1508
  ;
1509
 
1510
#------------------------------------------------------------
1511
# AT90s4414
1512
#------------------------------------------------------------
1513
 
1514
part
1515
    id               = "4414";
1516
    desc             = "AT90S4414";
1517
    stk500_devcode   = 0x50;
1518
    avr910_devcode   = 0x28;
1519
    signature        = 0x1e 0x92 0x01;
1520
    chip_erase_delay = 20000;
1521
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
1522
                       "x x x x  x x x x    x x x x  x x x x";
1523
 
1524
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
1525
                       "x x x x  x x x x    x x x x  x x x x";
1526
 
1527
    timeout		= 200;
1528
    stabdelay		= 100;
1529
    cmdexedelay		= 25;
1530
    synchloops		= 32;
1531
    bytedelay		= 0;
1532
    pollindex		= 3;
1533
    pollvalue		= 0x53;
1534
    predelay		= 1;
1535
    postdelay		= 1;
1536
    pollmethod		= 0;
1537
 
1538
    pp_controlstack     =
1539
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
1540
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
1541
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
1542
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01;
1543
    hventerstabdelay    = 100;
1544
    progmodedelay       = 0;
1545
    latchcycles         = 0;
1546
    togglevtg           = 0;
1547
    poweroffdelay       = 0;
1548
    resetdelayms        = 0;
1549
    resetdelayus        = 0;
1550
    hvleavestabdelay    = 15;
1551
    chiperasepulsewidth = 15;
1552
    chiperasepolltimeout = 0;
1553
    programfusepulsewidth = 2;
1554
    programfusepolltimeout = 0;
1555
    programlockpulsewidth = 0;
1556
    programlockpolltimeout = 1;
1557
 
1558
    memory "eeprom"
1559
        size            = 256;
1560
        min_write_delay = 9000;
1561
        max_write_delay = 20000;
1562
        readback_p1     = 0x80;
1563
        readback_p2     = 0x7f;
1564
        read            = " 1  0  1  0   0  0  0  0  x x x x  x x x a8",
1565
                          "a7 a6 a5 a4 a3 a2 a1 a0   o o o o  o o o o";
1566
 
1567
        write           = " 1  1  0  0   0  0  0  0   x x x x  x x x a8",
1568
                          "a7 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
1569
 
1570
	mode		= 0x04;
1571
	delay		= 12;
1572
	blocksize	= 64;
1573
	readsize	= 256;
1574
      ;
1575
    memory "flash"
1576
        size            = 4096;
1577
        min_write_delay = 9000;
1578
        max_write_delay = 20000;
1579
        readback_p1     = 0x7f;
1580
        readback_p2     = 0x7f;
1581
        read_lo         = "  0   0   1   0    0   0   0   0",
1582
                          "  x   x   x   x  a11 a10  a9  a8",
1583
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1584
                          "  o   o   o   o    o   o   o   o";
1585
 
1586
        read_hi         = "  0   0   1   0    1   0   0   0",
1587
                          "  x   x   x   x  a11 a10  a9  a8",
1588
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1589
                          "  o   o   o   o    o   o   o   o";
1590
 
1591
        write_lo        = "  0   1   0   0    0   0   0   0",
1592
                          "  x   x   x   x  a11 a10  a9  a8",
1593
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1594
                          "  i   i   i   i    i   i   i   i";
1595
 
1596
        write_hi        = "  0   1   0   0    1   0   0   0",
1597
                          "  x   x   x   x  a11 a10  a9  a8",
1598
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1599
                          "  i   i   i   i    i   i   i   i";
1600
 
1601
	mode		= 0x04;
1602
	delay		= 12;
1603
	blocksize	= 64;
1604
	readsize	= 256;
1605
      ;
1606
    memory "signature"
1607
        size            = 3;
1608
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
1609
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
1610
      ;
1611
    memory "fuse"
1612
	size		= 1;
1613
      ;
1614
    memory "lock"
1615
	size		= 1;
1616
	write		= "1  0  1  0   1  1  0  0   1  1  1  1   1  i  i  1",
1617
			  "x  x  x  x   x  x  x  x   x  x  x  x   x  x  x  x";
1618
        min_write_delay = 9000;
1619
        max_write_delay = 9000;
1620
      ;
1621
  ;
1622
 
1623
#------------------------------------------------------------
1624
# AT90s2313
1625
#------------------------------------------------------------
1626
 
1627
part
1628
    id               = "2313";
1629
    desc             = "AT90S2313";
1630
    stk500_devcode   = 0x40;
1631
    avr910_devcode   = 0x20;
1632
    signature        = 0x1e 0x91 0x01;
1633
    chip_erase_delay = 20000;
1634
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
1635
                       "x x x x  x x x x    x x x x  x x x x";
1636
 
1637
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
1638
                       "x x x x  x x x x    x x x x  x x x x";
1639
 
1640
    timeout		= 200;
1641
    stabdelay		= 100;
1642
    cmdexedelay		= 25;
1643
    synchloops		= 32;
1644
    bytedelay		= 0;
1645
    pollindex		= 3;
1646
    pollvalue		= 0x53;
1647
    predelay		= 1;
1648
    postdelay		= 1;
1649
    pollmethod		= 0;
1650
 
1651
    pp_controlstack     =
1652
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
1653
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
1654
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
1655
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
1656
    hventerstabdelay    = 100;
1657
    progmodedelay       = 0;
1658
    latchcycles         = 0;
1659
    togglevtg           = 0;
1660
    poweroffdelay       = 0;
1661
    resetdelayms        = 0;
1662
    resetdelayus        = 0;
1663
    hvleavestabdelay    = 15;
1664
    chiperasepulsewidth = 15;
1665
    chiperasepolltimeout = 0;
1666
    programfusepulsewidth = 2;
1667
    programfusepolltimeout = 0;
1668
    programlockpulsewidth = 0;
1669
    programlockpolltimeout = 1;
1670
 
1671
    memory "eeprom"
1672
        size            = 128;
1673
        min_write_delay = 4000;
1674
        max_write_delay = 9000;
1675
        readback_p1     = 0x80;
1676
        readback_p2     = 0x7f;
1677
        read            = "1  0  1  0   0  0  0  0   x x x x  x x x x",
1678
                          "x a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
1679
 
1680
        write           = "1  1  0  0   0  0  0  0   x x x x  x x x x",
1681
                          "x a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
1682
 
1683
	mode		= 0x04;
1684
	delay		= 12;
1685
	blocksize	= 64;
1686
	readsize	= 256;
1687
      ;
1688
    memory "flash"
1689
        size            = 2048;
1690
        min_write_delay = 4000;
1691
        max_write_delay = 9000;
1692
        readback_p1     = 0x7f;
1693
        readback_p2     = 0x7f;
1694
        read_lo         = "  0   0   1   0    0   0   0   0",
1695
                          "  x   x   x   x    x   x  a9  a8",
1696
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1697
                          "  o   o   o   o    o   o   o   o";
1698
 
1699
        read_hi         = "  0   0   1   0    1   0   0   0",
1700
                          "  x   x   x   x    x   x  a9  a8",
1701
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1702
                          "  o   o   o   o    o   o   o   o";
1703
 
1704
        write_lo        = "  0   1   0   0    0   0   0   0",
1705
                          "  x   x   x   x    x   x  a9  a8",
1706
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1707
                          "  i   i   i   i    i   i   i   i";
1708
 
1709
        write_hi        = "  0   1   0   0    1   0   0   0",
1710
                          "  x   x   x   x    x   x  a9  a8",
1711
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1712
                          "  i   i   i   i    i   i   i   i";
1713
 
1714
	mode		= 0x04;
1715
	delay		= 12;
1716
	blocksize	= 128;
1717
	readsize	= 256;
1718
      ;
1719
    memory "signature"
1720
        size            = 3;
1721
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
1722
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
1723
      ;
1724
    memory "fuse"
1725
        size            = 1;
1726
      ;
1727
    memory "lock"
1728
        size            = 1;
1729
        write           = "1 0 1 0  1 1 0 0  1 1 1 x  x i i x",
1730
                          "x x x x  x x x x  x x x x  x x x x";
1731
        min_write_delay = 9000;
1732
        max_write_delay = 9000;
1733
      ;
1734
  ;
1735
 
1736
#------------------------------------------------------------
1737
# AT90s2333
1738
#------------------------------------------------------------
1739
 
1740
part
1741
    id               = "2333";
1742
##### WARNING: No XML file for device 'AT90S2333'! #####
1743
    desc             = "AT90S2333";
1744
    stk500_devcode   = 0x42;
1745
    avr910_devcode   = 0x34;
1746
    signature        = 0x1e 0x91 0x05;
1747
    chip_erase_delay = 20000;
1748
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
1749
                       "x x x x  x x x x    x x x x  x x x x";
1750
 
1751
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
1752
                       "x x x x  x x x x    x x x x  x x x x";
1753
 
1754
    timeout		= 200;
1755
    stabdelay		= 100;
1756
    cmdexedelay		= 25;
1757
    synchloops		= 32;
1758
    bytedelay		= 0;
1759
    pollindex		= 3;
1760
    pollvalue		= 0x53;
1761
    predelay		= 1;
1762
    postdelay		= 1;
1763
    pollmethod		= 0;
1764
 
1765
    pp_controlstack     =
1766
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
1767
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
1768
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
1769
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
1770
    hventerstabdelay    = 100;
1771
    progmodedelay       = 0;
1772
    latchcycles         = 0;
1773
    togglevtg           = 0;
1774
    poweroffdelay       = 0;
1775
    resetdelayms        = 0;
1776
    resetdelayus        = 0;
1777
    hvleavestabdelay    = 15;
1778
    chiperasepulsewidth = 15;
1779
    chiperasepolltimeout = 0;
1780
    programfusepulsewidth = 2;
1781
    programfusepolltimeout = 0;
1782
    programlockpulsewidth = 0;
1783
    programlockpolltimeout = 1;
1784
 
1785
    memory "eeprom"
1786
        size            = 128;
1787
        min_write_delay = 9000;
1788
        max_write_delay = 20000;
1789
        readback_p1     = 0x00;
1790
        readback_p2     = 0xff;
1791
        read            = "1  0  1  0   0  0  0  0   x x x x  x x x x",
1792
                          "x a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
1793
 
1794
        write           = "1  1  0  0   0  0  0  0   x x x x  x x x x",
1795
                          "x a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
1796
 
1797
	mode		= 0x04;
1798
	delay		= 12;
1799
	blocksize	= 128;
1800
	readsize	= 256;
1801
      ;
1802
 
1803
    memory "flash"
1804
        size            = 2048;
1805
        min_write_delay = 9000;
1806
        max_write_delay = 20000;
1807
        readback_p1     = 0xff;
1808
        readback_p2     = 0xff;
1809
        read_lo         = "  0   0   1   0    0   0   0   0",
1810
                          "  x   x   x   x    x   x  a9  a8",
1811
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1812
                          "  o   o   o   o    o   o   o   o";
1813
 
1814
        read_hi         = "  0   0   1   0    1   0   0   0",
1815
                          "  x   x   x   x    x   x  a9  a8",
1816
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1817
                          "  o   o   o   o    o   o   o   o";
1818
 
1819
        write_lo        = "  0   1   0   0    0   0   0   0",
1820
                          "  x   x   x   x    x   x  a9  a8",
1821
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1822
                          "  i   i   i   i    i   i   i   i";
1823
 
1824
        write_hi        = "  0   1   0   0    1   0   0   0",
1825
                          "  x   x   x   x    x   x  a9  a8",
1826
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1827
                          "  i   i   i   i    i   i   i   i";
1828
 
1829
	mode		= 0x04;
1830
	delay		= 12;
1831
	blocksize	= 128;
1832
	readsize	= 256;
1833
      ;
1834
 
1835
    memory "signature"
1836
        size            = 3;
1837
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
1838
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
1839
      ;
1840
    memory "fuse"
1841
        size            = 1;
1842
        min_write_delay = 9000;
1843
        max_write_delay = 20000;
1844
        pwroff_after_write = yes;
1845
        read            = "0 1 0 1  0 0 0 0   x x x x  x x x x",
1846
                          "x x x x  x x x x   x x o o  o o o o";
1847
 
1848
        write           = "1 0 1 0  1 1 0 0   1 0 1 i  i i i i",
1849
                          "x x x x  x x x x   x x x x  x x x x";
1850
      ;
1851
    memory "lock"
1852
        size            = 1;
1853
        min_write_delay = 9000;
1854
        max_write_delay = 20000;
1855
        read            = "0 1 0 1  1 0 0 0   x x x x  x x x x",
1856
                          "x x x x  x x x x   x x x x  x o o x";
1857
 
1858
        write           = "1 0 1 0  1 1 0 0   1 1 1 1  1 i i 1",
1859
                          "x x x x  x x x x   x x x x  x x x x";
1860
      ;
1861
  ;
1862
 
1863
 
1864
#------------------------------------------------------------
1865
# AT90s2343 (also AT90s2323 and ATtiny22)
1866
#------------------------------------------------------------
1867
 
1868
part
1869
    id               = "2343";
1870
    desc             = "AT90S2343";
1871
    stk500_devcode   = 0x43;
1872
    avr910_devcode   = 0x4c;
1873
    signature        = 0x1e 0x91 0x03;
1874
    chip_erase_delay = 18000;
1875
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
1876
                       "x x x x  x x x x    x x x x  x x x x";
1877
 
1878
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
1879
                       "x x x x  x x x x    x x x x  x x x x";
1880
 
1881
    timeout		= 200;
1882
    stabdelay		= 100;
1883
    cmdexedelay		= 25;
1884
    synchloops		= 32;
1885
    bytedelay		= 0;
1886
    pollindex		= 3;
1887
    pollvalue		= 0x53;
1888
    predelay		= 1;
1889
    postdelay		= 1;
1890
    pollmethod		= 0;
1891
 
1892
    hvsp_controlstack   =
1893
        0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00,
1894
        0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78,
1895
        0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
1896
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
1897
    hventerstabdelay    = 100;
1898
    hvspcmdexedelay     = 0;
1899
    synchcycles         = 6;
1900
    latchcycles         = 1;
1901
    togglevtg           = 0;
1902
    poweroffdelay       = 25;
1903
    resetdelayms        = 0;
1904
    resetdelayus        = 50;
1905
    hvleavestabdelay    = 100;
1906
    resetdelay          = 25;
1907
    chiperasepolltimeout = 40;
1908
    chiperasetime       = 0;
1909
    programfusepolltimeout = 25;
1910
    programlockpolltimeout = 25;
1911
 
1912
    memory "eeprom"
1913
        size            = 128;
1914
        min_write_delay = 9000;
1915
        max_write_delay = 20000;
1916
        readback_p1     = 0x00;
1917
        readback_p2     = 0xff;
1918
        read            = "1  0  1  0   0  0  0  0   0 0 0 0  0 0 0 0",
1919
                          "x a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
1920
 
1921
        write           = "1  1  0  0   0  0  0  0   0 0 0 0  0 0 0 0",
1922
                          "x a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
1923
 
1924
	mode		= 0x04;
1925
	delay		= 12;
1926
	blocksize	= 64;
1927
	readsize	= 256;
1928
      ;
1929
    memory "flash"
1930
        size            = 2048;
1931
        min_write_delay = 9000;
1932
        max_write_delay = 20000;
1933
        readback_p1     = 0xff;
1934
        readback_p2     = 0xff;
1935
        read_lo         = "  0   0   1   0    0   0   0   0",
1936
                          "  x   x   x   x    x   x  a9  a8",
1937
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1938
                          "  o   o   o   o    o   o   o   o";
1939
 
1940
        read_hi         = "  0   0   1   0    1   0   0   0",
1941
                          "  x   x   x   x    x   x  a9  a8",
1942
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1943
                          "  o   o   o   o    o   o   o   o";
1944
 
1945
        write_lo        = "  0   1   0   0    0   0   0   0",
1946
                          "  x   x   x   x    x   x  a9  a8",
1947
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1948
                          "  i   i   i   i    i   i   i   i";
1949
 
1950
        write_hi        = "  0   1   0   0    1   0   0   0",
1951
                          "  x   x   x   x    x   x  a9  a8",
1952
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1953
                          "  i   i   i   i    i   i   i   i";
1954
 
1955
	mode		= 0x04;
1956
	delay		= 12;
1957
	blocksize	= 128;
1958
	readsize	= 128;
1959
      ;
1960
    memory "signature"
1961
        size            = 3;
1962
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
1963
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
1964
      ;
1965
    memory "fuse"
1966
        size            = 1;
1967
        min_write_delay = 9000;
1968
        max_write_delay = 20000;
1969
        read            = "0 1 0 1  1 0 0 0   x x x x  x x x x",
1970
                          "x x x x  x x x x   o o o x  x x x o";
1971
 
1972
        write           = "1 0 1 0  1 1 0 0   1 0 1 1  1 1 1 i",
1973
                          "x x x x  x x x x   x x x x  x x x x";
1974
      ;
1975
    memory "lock"
1976
        size            = 1;
1977
        min_write_delay = 9000;
1978
        max_write_delay = 20000;
1979
        read            = "0 1 0 1  1 0 0 0   x x x x  x x x x",
1980
                          "x x x x  x x x x   o o o x  x x x o";
1981
 
1982
        write           = "1 0 1 0  1 1 0 0   1 1 1 1  1 i i 1",
1983
                          "x x x x  x x x x   x x x x  x x x x";
1984
      ;
1985
  ;
1986
 
1987
 
1988
#------------------------------------------------------------
1989
# AT90s4433
1990
#------------------------------------------------------------
1991
 
1992
part
1993
    id               = "4433";
1994
    desc             = "AT90S4433";
1995
    stk500_devcode   = 0x51;
1996
    avr910_devcode   = 0x30;
1997
    signature        = 0x1e 0x92 0x03;
1998
    chip_erase_delay = 20000;
1999
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
2000
                       "x x x x  x x x x    x x x x  x x x x";
2001
 
2002
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
2003
                       "x x x x  x x x x    x x x x  x x x x";
2004
 
2005
    timeout		= 200;
2006
    stabdelay		= 100;
2007
    cmdexedelay		= 25;
2008
    synchloops		= 32;
2009
    bytedelay		= 0;
2010
    pollindex		= 3;
2011
    pollvalue		= 0x53;
2012
    predelay		= 1;
2013
    postdelay		= 1;
2014
    pollmethod		= 0;
2015
 
2016
    pp_controlstack     =
2017
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
2018
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
2019
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
2020
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
2021
    hventerstabdelay    = 100;
2022
    progmodedelay       = 0;
2023
    latchcycles         = 0;
2024
    togglevtg           = 0;
2025
    poweroffdelay       = 0;
2026
    resetdelayms        = 0;
2027
    resetdelayus        = 0;
2028
    hvleavestabdelay    = 15;
2029
    chiperasepulsewidth = 15;
2030
    chiperasepolltimeout = 0;
2031
    programfusepulsewidth = 2;
2032
    programfusepolltimeout = 0;
2033
    programlockpulsewidth = 0;
2034
    programlockpolltimeout = 1;
2035
 
2036
    memory "eeprom"
2037
        size            = 256;
2038
        min_write_delay = 9000;
2039
        max_write_delay = 20000;
2040
        readback_p1     = 0x00;
2041
        readback_p2     = 0xff;
2042
        read            = " 1  0  1  0   0  0  0  0   x x x x  x x x x",
2043
                          "a7 a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
2044
 
2045
        write           = " 1  1  0  0   0  0  0  0   x x x x  x x x x",
2046
                          "a7 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
2047
 
2048
	mode		= 0x04;
2049
	delay		= 12;
2050
	blocksize	= 128;
2051
	readsize	= 256;
2052
      ;
2053
    memory "flash"
2054
        size            = 4096;
2055
        min_write_delay = 9000;
2056
        max_write_delay = 20000;
2057
        readback_p1     = 0xff;
2058
        readback_p2     = 0xff;
2059
        read_lo         = "  0   0   1   0    0   0   0   0",
2060
                          "  x   x   x   x    x a10  a9  a8",
2061
                          " a7  a6  a5  a4   a3  a2  a1  a0",
2062
                          "  o   o   o   o    o   o   o   o";
2063
 
2064
        read_hi         = "  0   0   1   0    1   0   0   0",
2065
                          "  x   x   x   x    x a10  a9  a8",
2066
                          " a7  a6  a5  a4   a3  a2  a1  a0",
2067
                          "  o   o   o   o    o   o   o   o";
2068
 
2069
        write_lo        = "  0   1   0   0    0   0   0   0",
2070
                          "  x   x   x   x    x a10  a9  a8",
2071
                          " a7  a6  a5  a4   a3  a2  a1  a0",
2072
                          "  i   i   i   i    i   i   i   i";
2073
 
2074
        write_hi        = "  0   1   0   0    1   0   0   0",
2075
                          "  x   x   x   x    x a10  a9  a8",
2076
                          " a7  a6  a5  a4   a3  a2  a1  a0",
2077
                          "  i   i   i   i    i   i   i   i";
2078
 
2079
	mode		= 0x04;
2080
	delay		= 12;
2081
	blocksize	= 128;
2082
	readsize	= 256;
2083
      ;
2084
    memory "signature"
2085
        size            = 3;
2086
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
2087
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
2088
      ;
2089
    memory "fuse"
2090
        size            = 1;
2091
        min_write_delay = 9000;
2092
        max_write_delay = 20000;
2093
        pwroff_after_write = yes;
2094
        read            = "0 1 0 1  0 0 0 0   x x x x  x x x x",
2095
                          "x x x x  x x x x   x x o o  o o o o";
2096
 
2097
        write           = "1 0 1 0  1 1 0 0   1 0 1 i  i i i i",
2098
                          "x x x x  x x x x   x x x x  x x x x";
2099
      ;
2100
    memory "lock"
2101
        size            = 1;
2102
        min_write_delay = 9000;
2103
        max_write_delay = 20000;
2104
        read            = "0 1 0 1  1 0 0 0   x x x x  x x x x",
2105
                          "x x x x  x x x x   x x x x  x o o x";
2106
 
2107
        write           = "1 0 1 0  1 1 0 0   1 1 1 1  1 i i 1",
2108
                          "x x x x  x x x x   x x x x  x x x x";
2109
      ;
2110
  ;
2111
 
2112
#------------------------------------------------------------
2113
# AT90s4434
2114
#------------------------------------------------------------
2115
 
2116
part
2117
    id               = "4434";
2118
##### WARNING: No XML file for device 'AT90S4434'! #####
2119
    desc             = "AT90S4434";
2120
    stk500_devcode   = 0x52;
2121
    avr910_devcode   = 0x6c;
2122
    signature        = 0x1e 0x92 0x02;
2123
    chip_erase_delay = 20000;
2124
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
2125
                       "x x x x  x x x x    x x x x  x x x x";
2126
 
2127
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
2128
                       "x x x x  x x x x    x x x x  x x x x";
2129
 
2130
    memory "eeprom"
2131
        size            = 256;
2132
        min_write_delay = 9000;
2133
        max_write_delay = 20000;
2134
        readback_p1     = 0x00;
2135
        readback_p2     = 0xff;
2136
        read            = " 1  0  1  0   0  0  0  0   x x x x  x x x x",
2137
                          "a7 a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
2138
 
2139
        write           = " 1  1  0  0   0  0  0  0   x x x x  x x x x",
2140
                          "a7 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
2141
      ;
2142
    memory "flash"
2143
        size            = 4096;
2144
        min_write_delay = 9000;
2145
        max_write_delay = 20000;
2146
        readback_p1     = 0xff;
2147
        readback_p2     = 0xff;
2148
        read_lo         = "  0   0   1   0    0   0   0   0",
2149
                          "  x   x   x   x    x a10  a9  a8",
2150
                          " a7  a6  a5  a4   a3  a2  a1  a0",
2151
                          "  o   o   o   o    o   o   o   o";
2152
 
2153
        read_hi         = "  0   0   1   0    1   0   0   0",
2154
                          "  x   x   x   x    x a10  a9  a8",
2155
                          " a7  a6  a5  a4   a3  a2  a1  a0",
2156
                          "  o   o   o   o    o   o   o   o";
2157
 
2158
        write_lo        = "  0   1   0   0    0   0   0   0",
2159
                          "  x   x   x   x    x a10  a9  a8",
2160
                          " a7  a6  a5  a4   a3  a2  a1  a0",
2161
                          "  i   i   i   i    i   i   i   i";
2162
 
2163
        write_hi        = "  0   1   0   0    1   0   0   0",
2164
                          "  x   x   x   x    x a10  a9  a8",
2165
                          " a7  a6  a5  a4   a3  a2  a1  a0",
2166
                          "  i   i   i   i    i   i   i   i";
2167
      ;
2168
    memory "signature"
2169
        size            = 3;
2170
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
2171
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
2172
      ;
2173
    memory "fuse"
2174
        size            = 1;
2175
        min_write_delay = 9000;
2176
        max_write_delay = 20000;
2177
        read            = "0 1 0 1  0 0 0 0   x x x x  x x x x",
2178
                          "x x x x  x x x x   x x o o  o o o o";
2179
 
2180
        write           = "1 0 1 0  1 1 0 0   1 0 1 i  i i i i",
2181
                          "x x x x  x x x x   x x x x  x x x x";
2182
      ;
2183
    memory "lock"
2184
        size            = 1;
2185
        min_write_delay = 9000;
2186
        max_write_delay = 20000;
2187
        read            = "0 1 0 1  1 0 0 0   x x x x  x x x x",
2188
                          "x x x x  x x x x   x x x x  x o o x";
2189
 
2190
        write           = "1 0 1 0  1 1 0 0   1 1 1 1  1 i i 1",
2191
                          "x x x x  x x x x   x x x x  x x x x";
2192
      ;
2193
  ;
2194
 
2195
#------------------------------------------------------------
2196
# AT90s8515
2197
#------------------------------------------------------------
2198
 
2199
part
2200
    id               = "8515";
2201
    desc             = "AT90S8515";
2202
    stk500_devcode   = 0x60;
2203
    avr910_devcode   = 0x38;
2204
    signature        = 0x1e 0x93 0x01;
2205
    chip_erase_delay = 20000;
2206
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
2207
                       "x x x x  x x x x    x x x x  x x x x";
2208
 
2209
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
2210
                       "x x x x  x x x x    x x x x  x x x x";
2211
 
2212
    timeout		= 200;
2213
    stabdelay		= 100;
2214
    cmdexedelay		= 25;
2215
    synchloops		= 32;
2216
    bytedelay		= 0;
2217
    pollindex		= 3;
2218
    pollvalue		= 0x53;
2219
    predelay		= 1;
2220
    postdelay		= 1;
2221
    pollmethod		= 0;
2222
 
2223
    pp_controlstack     =
2224
	0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
2225
	0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
2226
	0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
2227
	0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
2228
    hventerstabdelay    = 100;
2229
    progmodedelay       = 0;
2230
    latchcycles         = 0;
2231
    togglevtg           = 0;
2232
    poweroffdelay       = 0;
2233
    resetdelayms        = 0;
2234
    resetdelayus        = 0;
2235
    hvleavestabdelay    = 15;
2236
    resetdelay          = 15;
2237
    chiperasepulsewidth = 15;
2238
    chiperasepolltimeout = 0;
2239
    programfusepulsewidth = 2;
2240
    programfusepolltimeout = 0;
2241
    programlockpulsewidth = 0;
2242
    programlockpolltimeout = 1;
2243
 
2244
    memory "eeprom"
2245
        size            = 512;
2246
        min_write_delay = 4000;
2247
        max_write_delay = 9000;
2248
        readback_p1     = 0x80;
2249
        readback_p2     = 0x7f;
2250
        read            = " 1  0  1  0   0  0  0  0  x x x x  x x x a8",
2251
                          "a7 a6 a5 a4 a3 a2 a1 a0   o o o o  o o o o";
2252
 
2253
        write           = " 1  1  0  0   0  0  0  0   x x x x  x x x a8",
2254
                          "a7 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
2255
 
2256
	mode		= 0x04;
2257
	delay		= 12;
2258
	blocksize	= 128;
2259
	readsize	= 256;
2260
      ;
2261
    memory "flash"
2262
        size            = 8192;
2263
        min_write_delay = 4000;
2264
        max_write_delay = 9000;
2265
        readback_p1     = 0x7f;
2266
        readback_p2     = 0x7f;
2267
        read_lo         = "  0   0   1   0    0   0   0   0",
2268
                          "  x   x   x   x  a11 a10  a9  a8",
2269
                          " a7  a6  a5  a4   a3  a2  a1  a0",
2270
                          "  o   o   o   o    o   o   o   o";
2271
 
2272
        read_hi         = "  0   0   1   0    1   0   0   0",
2273
                          "  x   x   x   x  a11 a10  a9  a8",
2274
                          " a7  a6  a5  a4   a3  a2  a1  a0",
2275
                          "  o   o   o   o    o   o   o   o";
2276
 
2277
        write_lo        = "  0   1   0   0    0   0   0   0",
2278
                          "  x   x   x   x  a11 a10  a9  a8",
2279
                          " a7  a6  a5  a4   a3  a2  a1  a0",
2280
                          "  i   i   i   i    i   i   i   i";
2281
 
2282
        write_hi        = "  0   1   0   0    1   0   0   0",
2283
                          "  x   x   x   x  a11 a10  a9  a8",
2284
                          " a7  a6  a5  a4   a3  a2  a1  a0",
2285
                          "  i   i   i   i    i   i   i   i";
2286
 
2287
	mode		= 0x04;
2288
	delay		= 12;
2289
	blocksize	= 128;
2290
	readsize	= 256;
2291
      ;
2292
    memory "signature"
2293
        size            = 3;
2294
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
2295
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
2296
      ;
2297
    memory "fuse"
2298
	size		= 1;
2299
      ;
2300
    memory "lock"
2301
	size		= 1;
2302
	write		= "1  0  1  0   1  1  0  0   1  1  1  1   1  i  i  1",
2303
			  "x  x  x  x   x  x  x  x   x  x  x  x   x  x  x  x";
2304
        min_write_delay = 9000;
2305
        max_write_delay = 9000;
2306
      ;
2307
  ;
2308
 
2309
#------------------------------------------------------------
2310
# AT90s8535
2311
#------------------------------------------------------------
2312
 
2313
part
2314
    id               = "8535";
2315
    desc             = "AT90S8535";
2316
    stk500_devcode   = 0x61;
2317
    avr910_devcode   = 0x68;
2318
    signature        = 0x1e 0x93 0x03;
2319
    chip_erase_delay = 20000;
2320
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
2321
                       "x x x x  x x x x    x x x x  x x x x";
2322
 
2323
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
2324
                       "x x x x  x x x x    x x x x  x x x x";
2325
 
2326
    timeout		= 200;
2327
    stabdelay		= 100;
2328
    cmdexedelay		= 25;
2329
    synchloops		= 32;
2330
    bytedelay		= 0;
2331
    pollindex		= 3;
2332
    pollvalue		= 0x53;
2333
    predelay		= 1;
2334
    postdelay		= 1;
2335
    pollmethod		= 0;
2336
 
2337
    pp_controlstack     =
2338
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
2339
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
2340
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
2341
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
2342
    hventerstabdelay    = 100;
2343
    progmodedelay       = 0;
2344
    latchcycles         = 0;
2345
    togglevtg           = 0;
2346
    poweroffdelay       = 0;
2347
    resetdelayms        = 0;
2348
    resetdelayus        = 0;
2349
    hvleavestabdelay    = 15;
2350
    chiperasepulsewidth = 15;
2351
    chiperasepolltimeout = 0;
2352
    programfusepulsewidth = 2;
2353
    programfusepolltimeout = 0;
2354
    programlockpulsewidth = 0;
2355
    programlockpolltimeout = 1;
2356
 
2357
    memory "eeprom"
2358
        size            = 512;
2359
        min_write_delay = 9000;
2360
        max_write_delay = 20000;
2361
        readback_p1     = 0x00;
2362
        readback_p2     = 0xff;
2363
        read            = " 1  0  1  0   0  0  0  0   x x x x  x x x a8",
2364
                          "a7 a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
2365
 
2366
        write           = " 1  1  0  0   0  0  0  0   x x x x  x x x a8",
2367
                          "a7 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
2368
 
2369
	mode		= 0x04;
2370
	delay		= 12;
2371
	blocksize	= 128;
2372
	readsize	= 256;
2373
      ;
2374
    memory "flash"
2375
        size            = 8192;
2376
        min_write_delay = 9000;
2377
        max_write_delay = 20000;
2378
        readback_p1     = 0xff;
2379
        readback_p2     = 0xff;
2380
        read_lo         = "  0   0   1   0    0   0   0   0",
2381
                          "  x   x   x   x  a11 a10  a9  a8",
2382
                          " a7  a6  a5  a4   a3  a2  a1  a0",
2383
                          "  o   o   o   o    o   o   o   o";
2384
 
2385
        read_hi         = "  0   0   1   0    1   0   0   0",
2386
                          "  x   x   x   x  a11 a10  a9  a8",
2387
                          " a7  a6  a5  a4   a3  a2  a1  a0",
2388
                          "  o   o   o   o    o   o   o   o";
2389
 
2390
        write_lo        = "  0   1   0   0    0   0   0   0",
2391
                          "  x   x   x   x  a11 a10  a9  a8",
2392
                          " a7  a6  a5  a4   a3  a2  a1  a0",
2393
                          "  i   i   i   i    i   i   i   i";
2394
 
2395
        write_hi        = "  0   1   0   0    1   0   0   0",
2396
                          "  x   x   x   x  a11 a10  a9  a8",
2397
                          " a7  a6  a5  a4   a3  a2  a1  a0",
2398
                          "  i   i   i   i    i   i   i   i";
2399
 
2400
	mode		= 0x04;
2401
	delay		= 12;
2402
	blocksize	= 128;
2403
	readsize	= 256;
2404
      ;
2405
    memory "signature"
2406
        size            = 3;
2407
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
2408
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
2409
      ;
2410
    memory "fuse"
2411
	size		= 1;
2412
	read		= "0  1  0  1   1  0  0  0   x  x  x  x   x  x  x  x",
2413
			  "x  x  x  x   x  x  x  x   x  x  x  x   x  x  x  o";
2414
	write		= "1  0  1  0   1  1  0  0   1  0  1  1   1  1  1  i",
2415
			  "x  x  x  x   x  x  x  x   x  x  x  x   x  x  x  x";
2416
        min_write_delay = 9000;
2417
        max_write_delay = 9000;
2418
      ;
2419
    memory "lock"
2420
	size		= 1;
2421
	read		= "0  1  0  1   1  0  0  0   x  x  x  x   x  x  x  x",
2422
			  "x  x  x  x   x  x  x  x   o  o  x  x   x  x  x  x";
2423
	write		= "1  0  1  0   1  1  0  0   1  1  1  1   1  i  i  1",
2424
			  "x  x  x  x   x  x  x  x   x  x  x  x   x  x  x  x";
2425
        min_write_delay = 9000;
2426
        max_write_delay = 9000;
2427
      ;
2428
  ;
2429
 
2430
#------------------------------------------------------------
2431
# ATmega103
2432
#------------------------------------------------------------
2433
 
2434
part
2435
    id               = "m103";
2436
    desc             = "ATMEGA103";
2437
    stk500_devcode   = 0xB1;
2438
    avr910_devcode   = 0x41;
2439
    signature        = 0x1e 0x97 0x01;
2440
    chip_erase_delay = 112000;
2441
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
2442
                       "x x x x  x x x x    x x x x  x x x x";
2443
 
2444
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
2445
                       "x x x x  x x x x    x x x x  x x x x";
2446
 
2447
    timeout		= 200;
2448
    stabdelay		= 100;
2449
    cmdexedelay		= 25;
2450
    synchloops		= 32;
2451
    bytedelay		= 0;
2452
    pollindex		= 3;
2453
    pollvalue		= 0x53;
2454
    predelay		= 1;
2455
    postdelay		= 1;
2456
    pollmethod		= 0;
2457
 
2458
    pp_controlstack     =
2459
        0x0E, 0x1E, 0x8E, 0x9E, 0x2E, 0x3E, 0xAE, 0xBE,
2460
        0x4E, 0x5E, 0xCE, 0xDE, 0x6E, 0x7E, 0xEE, 0xDE,
2461
        0x66, 0x76, 0xE6, 0xF6, 0x6A, 0x7A, 0xEA, 0x7A,
2462
        0x7F, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
2463
    hventerstabdelay    = 100;
2464
    progmodedelay       = 0;
2465
    latchcycles         = 0;
2466
    togglevtg           = 0;
2467
    poweroffdelay       = 0;
2468
    resetdelayms        = 0;
2469
    resetdelayus        = 0;
2470
    hvleavestabdelay    = 15;
2471
    chiperasepulsewidth = 15;
2472
    chiperasepolltimeout = 0;
2473
    programfusepulsewidth = 2;
2474
    programfusepolltimeout = 0;
2475
    programlockpulsewidth = 0;
2476
    programlockpolltimeout = 10;
2477
 
2478
    memory "eeprom"
2479
        size            = 4096;
2480
        min_write_delay = 4000;
2481
        max_write_delay = 9000;
2482
        readback_p1     = 0x80;
2483
        readback_p2     = 0x7f;
2484
	read            = "  1   0   1   0      0   0   0   0",
2485
                          "  x   x   x   x    a11 a10  a9  a8",
2486
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2487
                          "  o   o   o   o      o   o   o   o";
2488
 
2489
	write           = "  1   1   0   0      0   0   0   0",
2490
                          "  x   x   x   x    a11 a10  a9  a8",
2491
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2492
                          "  i   i   i   i      i   i   i   i";
2493
 
2494
	mode		= 0x04;
2495
	delay		= 12;
2496
	blocksize	= 64;
2497
	readsize	= 256;
2498
      ;
2499
 
2500
    memory "flash"
2501
        paged           = yes;
2502
        size            = 131072;
2503
        page_size       = 256;
2504
        num_pages       = 512;
2505
        min_write_delay = 22000;
2506
        max_write_delay = 56000;
2507
        readback_p1     = 0xff;
2508
        readback_p2     = 0xff;
2509
        read_lo         = "  0   0   1   0      0   0   0   0",
2510
                          "a15 a14 a13 a12    a11 a10  a9  a8",
2511
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2512
                          "  o   o   o   o      o   o   o   o";
2513
 
2514
        read_hi         = "  0   0   1   0      1   0   0   0",
2515
                          "a15 a14 a13 a12    a11 a10  a9  a8",
2516
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2517
                          "  o   o   o   o      o   o   o   o";
2518
 
2519
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
2520
                          "  x   x   x   x      x   x   x   x",
2521
                          "  x  a6  a5  a4     a3  a2  a1  a0",
2522
                          "  i   i   i   i      i   i   i   i";
2523
 
2524
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
2525
                          "  x   x   x   x      x   x   x   x",
2526
                          "  x  a6  a5  a4     a3  a2  a1  a0",
2527
                          "  i   i   i   i      i   i   i   i";
2528
 
2529
        writepage       = "  0   1   0   0      1   1   0   0",
2530
                          "a15 a14 a13 a12    a11 a10  a9  a8",
2531
                          " a7   x   x   x      x   x   x   x",
2532
                          "  x   x   x   x      x   x   x   x";
2533
 
2534
	mode		= 0x11;
2535
	delay		= 70;
2536
	blocksize	= 256;
2537
	readsize	= 256;
2538
      ;
2539
 
2540
    memory "fuse"
2541
        size            = 1;
2542
        read            = "0 1 0 1  0 0 0 0  x x x x  x x x x",
2543
                          "x x x x  x x x x  x x o x  o 1 o o";
2544
 
2545
        write           = "1 0 1 0  1 1 0 0  1 0 1 1  i 1 i i",
2546
                          "x x x x  x x x x  x x x x  x x x x";
2547
        min_write_delay = 9000;
2548
        max_write_delay = 9000;
2549
      ;
2550
 
2551
    memory "lock"
2552
        size            = 1;
2553
        read            = "0 1 0 1  1 0 0 0   x x x x  x x x x",
2554
                          "x x x x  x x x x   x x x x  x o o x";
2555
 
2556
        write           = "1 0 1 0  1 1 0 0   1 1 1 1  1 i i 1",
2557
                          "x x x x  x x x x   x x x x  x x x x";
2558
        min_write_delay = 9000;
2559
        max_write_delay = 9000;
2560
      ;
2561
 
2562
    memory "signature"
2563
        size            = 3;
2564
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
2565
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
2566
      ;
2567
  ;
2568
 
2569
 
2570
#------------------------------------------------------------
2571
# ATmega64
2572
#------------------------------------------------------------
2573
 
2574
part
2575
    id               = "m64";
2576
    desc             = "ATMEGA64";
2577
    has_jtag         = yes;
2578
    stk500_devcode   = 0xA0;
2579
    avr910_devcode   = 0x45;
2580
    signature        = 0x1e 0x96 0x02;
2581
    chip_erase_delay = 9000;
2582
    pagel            = 0xD7;
2583
    bs2              = 0xA0;
2584
    reset            = dedicated;
2585
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
2586
                       "x x x x  x x x x    x x x x  x x x x";
2587
 
2588
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
2589
                       "x x x x  x x x x    x x x x  x x x x";
2590
 
2591
    timeout		= 200;
2592
    stabdelay		= 100;
2593
    cmdexedelay		= 25;
2594
    synchloops		= 32;
2595
    bytedelay		= 0;
2596
    pollindex		= 3;
2597
    pollvalue		= 0x53;
2598
    predelay		= 1;
2599
    postdelay		= 1;
2600
    pollmethod		= 0;
2601
 
2602
    pp_controlstack     =
2603
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
2604
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
2605
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
2606
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
2607
    hventerstabdelay    = 100;
2608
    progmodedelay       = 0;
2609
    latchcycles         = 6;
2610
    togglevtg           = 0;
2611
    poweroffdelay       = 0;
2612
    resetdelayms        = 0;
2613
    resetdelayus        = 0;
2614
    hvleavestabdelay    = 15;
2615
    chiperasepulsewidth = 0;
2616
    chiperasepolltimeout = 10;
2617
    programfusepulsewidth = 0;
2618
    programfusepolltimeout = 5;
2619
    programlockpulsewidth = 0;
2620
    programlockpolltimeout = 5;
2621
 
2622
    idr                 = 0x22;
2623
    spmcr               = 0x68;
2624
    allowfullpagebitstream = yes;
2625
 
2626
    memory "eeprom"
2627
        paged           = no; /* leave this "no" */
2628
        page_size       = 8;  /* for parallel programming */
2629
        size            = 2048;
2630
        min_write_delay = 9000;
2631
        max_write_delay = 9000;
2632
        readback_p1     = 0xff;
2633
        readback_p2     = 0xff;
2634
        read            = "  1   0   1   0      0   0   0   0",
2635
                          "  x   x   x   x    a11 a10  a9  a8",
2636
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2637
                          "  o   o   o   o      o   o   o   o";
2638
 
2639
        write           = "  1   1   0   0      0   0   0   0",
2640
                          "  x   x   x   x    a11 a10  a9  a8",
2641
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2642
                          "  i   i   i   i      i   i   i   i";
2643
 
2644
	mode		= 0x04;
2645
	delay		= 20;
2646
	blocksize	= 64;
2647
	readsize	= 256;
2648
      ;
2649
 
2650
    memory "flash"
2651
        paged           = yes;
2652
        size            = 65536;
2653
        page_size       = 256;
2654
        num_pages       = 256;
2655
        min_write_delay = 4500;
2656
        max_write_delay = 4500;
2657
        readback_p1     = 0xff;
2658
        readback_p2     = 0xff;
2659
        read_lo         = "  0   0   1   0      0   0   0   0",
2660
                          "  x a14 a13 a12    a11 a10  a9  a8",
2661
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2662
                          "  o   o   o   o      o   o   o   o";
2663
 
2664
        read_hi         = "  0   0   1   0      1   0   0   0",
2665
                          "  x a14 a13 a12    a11 a10  a9  a8",
2666
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2667
                          "  o   o   o   o      o   o   o   o";
2668
 
2669
 
2670
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
2671
                          "  x   x   x   x      x   x   x   x",
2672
                          "  x  a6  a5  a4     a3  a2  a1  a0",
2673
                          "  i   i   i   i      i   i   i   i";
2674
 
2675
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
2676
                          "  x   x   x   x      x   x   x   x",
2677
                          "  x  a6  a5  a4     a3  a2  a1  a0",
2678
                          "  i   i   i   i      i   i   i   i";
2679
 
2680
        writepage       = "  0   1   0   0      1   1   0   0",
2681
                          "  x a14 a13 a12    a11 a10  a9  a8",
2682
                          " a7   x   x   x      x   x   x   x",
2683
                          "  x   x   x   x      x   x   x   x";
2684
 
2685
	mode		= 0x21;
2686
	delay		= 6;
2687
	blocksize	= 128;
2688
	readsize	= 256;
2689
      ;
2690
 
2691
    memory "lfuse"
2692
        size            = 1;
2693
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
2694
                          "x x x x  x x x x  i i i i  i i i i";
2695
 
2696
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
2697
                          "x x x x  x x x x  o o o o  o o o o";
2698
        min_write_delay = 9000;
2699
        max_write_delay = 9000;
2700
      ;
2701
 
2702
    memory "hfuse"
2703
        size            = 1;
2704
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
2705
                          "x x x x  x x x x  i i i i  i i i i";
2706
 
2707
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
2708
                          "x x x x  x x x x  o o o o  o o o o";
2709
        min_write_delay = 9000;
2710
        max_write_delay = 9000;
2711
      ;
2712
 
2713
    memory "efuse"
2714
        size            = 1;
2715
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
2716
                          "x x x x  x x x x  x x x x  x x i i";
2717
 
2718
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
2719
                          "x x x x  x x x x  o o o o  o o o o";
2720
        min_write_delay = 9000;
2721
        max_write_delay = 9000;
2722
      ;
2723
 
2724
    memory "lock"
2725
        size            = 1;
2726
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
2727
                          "x x x x  x x x x   x x o o  o o o o";
2728
 
2729
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
2730
                          "x x x x  x x x x   1 1 i i  i i i i";
2731
        min_write_delay = 9000;
2732
        max_write_delay = 9000;
2733
      ;
2734
 
2735
    memory "calibration"
2736
        size            = 4;
2737
        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
2738
                          "0 0 0 0  0 0 a1 a0  o o o o  o o o o";
2739
      ;
2740
 
2741
    memory "signature"
2742
        size            = 3;
2743
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
2744
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
2745
      ;
2746
  ;
2747
 
2748
 
2749
 
2750
 
2751
#------------------------------------------------------------
2752
# ATmega128
2753
#------------------------------------------------------------
2754
 
2755
part
2756
    id               = "m128";
2757
    desc             = "ATMEGA128";
2758
    has_jtag         = yes;
2759
    stk500_devcode   = 0xB2;
2760
    avr910_devcode   = 0x43;
2761
    signature        = 0x1e 0x97 0x02;
2762
    chip_erase_delay = 9000;
2763
    pagel            = 0xD7;
2764
    bs2              = 0xA0;
2765
    reset            = dedicated;
2766
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
2767
                       "x x x x  x x x x    x x x x  x x x x";
2768
 
2769
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
2770
                       "x x x x  x x x x    x x x x  x x x x";
2771
 
2772
    timeout		= 200;
2773
    stabdelay		= 100;
2774
    cmdexedelay		= 25;
2775
    synchloops		= 32;
2776
    bytedelay		= 0;
2777
    pollindex		= 3;
2778
    pollvalue		= 0x53;
2779
    predelay		= 1;
2780
    postdelay		= 1;
2781
    pollmethod		= 0;
2782
 
2783
    pp_controlstack     =
2784
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
2785
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
2786
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
2787
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
2788
    hventerstabdelay    = 100;
2789
    progmodedelay       = 0;
2790
    latchcycles         = 6;
2791
    togglevtg           = 0;
2792
    poweroffdelay       = 0;
2793
    resetdelayms        = 0;
2794
    resetdelayus        = 0;
2795
    hvleavestabdelay    = 15;
2796
    chiperasepulsewidth = 0;
2797
    chiperasepolltimeout = 10;
2798
    programfusepulsewidth = 0;
2799
    programfusepolltimeout = 5;
2800
    programlockpulsewidth = 0;
2801
    programlockpolltimeout = 5;
2802
 
2803
    idr                 = 0x22;
2804
    spmcr               = 0x68;
2805
    rampz               = 0x3b;
2806
    allowfullpagebitstream = yes;
2807
 
2808
    memory "eeprom"
2809
        paged           = no; /* leave this "no" */
2810
        page_size       = 8;  /* for parallel programming */
2811
        size            = 4096;
2812
        min_write_delay = 9000;
2813
        max_write_delay = 9000;
2814
        readback_p1     = 0xff;
2815
        readback_p2     = 0xff;
2816
        read            = "  1   0   1   0      0   0   0   0",
2817
                          "  x   x   x   x    a11 a10  a9  a8",
2818
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2819
                          "  o   o   o   o      o   o   o   o";
2820
 
2821
        write           = "  1   1   0   0      0   0   0   0",
2822
                          "  x   x   x   x    a11 a10  a9  a8",
2823
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2824
                          "  i   i   i   i      i   i   i   i";
2825
 
2826
	mode		= 0x04;
2827
	delay		= 12;
2828
	blocksize	= 64;
2829
	readsize	= 256;
2830
      ;
2831
 
2832
    memory "flash"
2833
        paged           = yes;
2834
        size            = 131072;
2835
        page_size       = 256;
2836
        num_pages       = 512;
2837
        min_write_delay = 4500;
2838
        max_write_delay = 4500;
2839
        readback_p1     = 0xff;
2840
        readback_p2     = 0xff;
2841
        read_lo         = "  0   0   1   0      0   0   0   0",
2842
                          "a15 a14 a13 a12    a11 a10  a9  a8",
2843
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2844
                          "  o   o   o   o      o   o   o   o";
2845
 
2846
        read_hi         = "  0   0   1   0      1   0   0   0",
2847
                          "a15 a14 a13 a12    a11 a10  a9  a8",
2848
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2849
                          "  o   o   o   o      o   o   o   o";
2850
 
2851
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
2852
                          "  x   x   x   x      x   x   x   x",
2853
                          "  x  a6  a5  a4     a3  a2  a1  a0",
2854
                          "  i   i   i   i      i   i   i   i";
2855
 
2856
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
2857
                          "  x   x   x   x      x   x   x   x",
2858
                          "  x  a6  a5  a4     a3  a2  a1  a0",
2859
                          "  i   i   i   i      i   i   i   i";
2860
 
2861
        writepage       = "  0   1   0   0      1   1   0   0",
2862
                          "a15 a14 a13 a12    a11 a10  a9  a8",
2863
                          " a7   x   x   x      x   x   x   x",
2864
                          "  x   x   x   x      x   x   x   x";
2865
 
2866
	mode		= 0x21;
2867
	delay		= 6;
2868
	blocksize	= 128;
2869
	readsize	= 256;
2870
      ;
2871
 
2872
    memory "lfuse"
2873
        size            = 1;
2874
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
2875
                          "x x x x  x x x x  i i i i  i i i i";
2876
 
2877
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
2878
                          "x x x x  x x x x  o o o o  o o o o";
2879
        min_write_delay = 9000;
2880
        max_write_delay = 9000;
2881
      ;
2882
 
2883
    memory "hfuse"
2884
        size            = 1;
2885
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
2886
                          "x x x x  x x x x  i i i i  i i i i";
2887
 
2888
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
2889
                          "x x x x  x x x x  o o o o  o o o o";
2890
        min_write_delay = 9000;
2891
        max_write_delay = 9000;
2892
      ;
2893
 
2894
    memory "efuse"
2895
        size            = 1;
2896
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
2897
                          "x x x x  x x x x  x x x x  x x i i";
2898
 
2899
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
2900
                          "x x x x  x x x x  o o o o  o o o o";
2901
        min_write_delay = 9000;
2902
        max_write_delay = 9000;
2903
      ;
2904
 
2905
    memory "lock"
2906
        size            = 1;
2907
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
2908
                          "x x x x  x x x x   x x o o  o o o o";
2909
 
2910
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
2911
                          "x x x x  x x x x   1 1 i i  i i i i";
2912
        min_write_delay = 9000;
2913
        max_write_delay = 9000;
2914
      ;
2915
 
2916
    memory "calibration"
2917
        size            = 4;
2918
        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
2919
                          "0 0 0 0  0 0 a1 a0  o o o o  o o o o";
2920
      ;
2921
 
2922
    memory "signature"
2923
        size            = 3;
2924
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
2925
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
2926
      ;
2927
  ;
2928
 
2929
#------------------------------------------------------------
2930
# AT90CAN128
2931
#------------------------------------------------------------
2932
 
2933
part
2934
    id               = "c128";
2935
    desc             = "AT90CAN128";
2936
    has_jtag         = yes;
2937
    stk500_devcode   = 0xB3;
2938
#    avr910_devcode   = 0x43;
2939
    signature        = 0x1e 0x97 0x81;
2940
    chip_erase_delay = 9000;
2941
    pagel            = 0xD7;
2942
    bs2              = 0xA0;
2943
    reset            = dedicated;
2944
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
2945
                       "x x x x  x x x x    x x x x  x x x x";
2946
 
2947
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
2948
                       "x x x x  x x x x    x x x x  x x x x";
2949
 
2950
    timeout		= 200;
2951
    stabdelay		= 100;
2952
    cmdexedelay		= 25;
2953
    synchloops		= 32;
2954
    bytedelay		= 0;
2955
    pollindex		= 3;
2956
    pollvalue		= 0x53;
2957
    predelay		= 1;
2958
    postdelay		= 1;
2959
    pollmethod		= 1;
2960
 
2961
    pp_controlstack     =
2962
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
2963
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
2964
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
2965
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01;
2966
    hventerstabdelay    = 100;
2967
    progmodedelay       = 0;
2968
    latchcycles         = 6;
2969
    togglevtg           = 0;
2970
    poweroffdelay       = 0;
2971
    resetdelayms        = 0;
2972
    resetdelayus        = 0;
2973
    hvleavestabdelay    = 15;
2974
    chiperasepulsewidth = 0;
2975
    chiperasepolltimeout = 10;
2976
    programfusepulsewidth = 0;
2977
    programfusepolltimeout = 5;
2978
    programlockpulsewidth = 0;
2979
    programlockpolltimeout = 5;
2980
 
2981
    idr                 = 0x31;
2982
    spmcr               = 0x57;
2983
    rampz               = 0x3b;
2984
    eecr                = 0x3f;
2985
    allowfullpagebitstream = no;
2986
 
2987
    memory "eeprom"
2988
        paged           = no; /* leave this "no" */
2989
        page_size       = 8;  /* for parallel programming */
2990
        size            = 4096;
2991
        min_write_delay = 9000;
2992
        max_write_delay = 9000;
2993
        readback_p1     = 0xff;
2994
        readback_p2     = 0xff;
2995
	read            = "  1   0   1   0      0   0   0   0",
2996
                          "  0   0   0   x    a11 a10  a9  a8",
2997
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2998
                          "  o   o   o   o      o   o   o   o";
2999
 
3000
	write           = "  1   1   0   0      0   0   0   0",
3001
                          "  0   0   0   x    a11 a10  a9  a8",
3002
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3003
                          "  i   i   i   i      i   i   i   i";
3004
 
3005
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
3006
			  "  0   0   0   0      0   0   0   0",
3007
			  "  0   0   0   0      0  a2  a1  a0",
3008
			  "  i   i   i   i      i   i   i   i";
3009
 
3010
	writepage	= "  1   1   0   0      0   0   1   0",
3011
			  "  0   0   x   x    a11 a10  a9  a8",
3012
			  " a7  a6  a5  a4     a3   0   0   0",
3013
			  "  x   x   x   x      x   x   x   x";
3014
 
3015
 
3016
	mode		= 0x41;
3017
	delay		= 20;
3018
	blocksize	= 8;
3019
	readsize	= 256;
3020
      ;
3021
 
3022
    memory "flash"
3023
        paged           = yes;
3024
        size            = 131072;
3025
        page_size       = 256;
3026
        num_pages       = 512;
3027
        min_write_delay = 4500;
3028
        max_write_delay = 4500;
3029
        readback_p1     = 0xff;
3030
        readback_p2     = 0xff;
3031
        read_lo         = "  0   0   1   0      0   0   0   0",
3032
                          "a15 a14 a13 a12    a11 a10  a9  a8",
3033
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3034
                          "  o   o   o   o      o   o   o   o";
3035
 
3036
        read_hi         = "  0   0   1   0      1   0   0   0",
3037
                          "a15 a14 a13 a12    a11 a10  a9  a8",
3038
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3039
                          "  o   o   o   o      o   o   o   o";
3040
 
3041
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
3042
                          "  0   0   0   x      x   x   x   x",
3043
                          "  x  a6  a5  a4     a3  a2  a1  a0",
3044
                          "  i   i   i   i      i   i   i   i";
3045
 
3046
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
3047
                          "  0   0   0   x      x   x   x   x",
3048
                          "  x  a6  a5  a4     a3  a2  a1  a0",
3049
                          "  i   i   i   i      i   i   i   i";
3050
 
3051
        writepage       = "  0   1   0   0      1   1   0   0",
3052
                          "a15 a14 a13 a12    a11 a10  a9  a8",
3053
                          " a7   x   x   x      x   x   x   x",
3054
                          "  x   x   x   x      x   x   x   x";
3055
 
3056
	mode		= 0x41;
3057
	delay		= 6;
3058
	blocksize	= 256;
3059
	readsize	= 256;
3060
      ;
3061
 
3062
    memory "lfuse"
3063
        size            = 1;
3064
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
3065
                          "x x x x  x x x x  i i i i  i i i i";
3066
 
3067
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
3068
                          "x x x x  x x x x  o o o o  o o o o";
3069
        min_write_delay = 9000;
3070
        max_write_delay = 9000;
3071
      ;
3072
 
3073
    memory "hfuse"
3074
        size            = 1;
3075
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
3076
                          "x x x x  x x x x  i i i i  i i i i";
3077
 
3078
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
3079
                          "x x x x  x x x x  o o o o  o o o o";
3080
        min_write_delay = 9000;
3081
        max_write_delay = 9000;
3082
      ;
3083
 
3084
    memory "efuse"
3085
        size            = 1;
3086
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
3087
                          "x x x x  x x x x  x x x x  i i i i";
3088
 
3089
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
3090
                          "x x x x  x x x x  o o o o  o o o o";
3091
        min_write_delay = 9000;
3092
        max_write_delay = 9000;
3093
      ;
3094
 
3095
    memory "lock"
3096
        size            = 1;
3097
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
3098
                          "x x x x  x x x x   x x o o  o o o o";
3099
 
3100
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
3101
                          "x x x x  x x x x   1 1 i i  i i i i";
3102
        min_write_delay = 9000;
3103
        max_write_delay = 9000;
3104
      ;
3105
 
3106
    memory "calibration"
3107
        size            = 1;
3108
        read            = "0 0 1 1  1 0 0 0  0 0 0 x  x x x x",
3109
                          "0 0 0 0  0 0 0 0  o o o o  o o o o";
3110
      ;
3111
 
3112
    memory "signature"
3113
        size            = 3;
3114
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
3115
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
3116
      ;
3117
  ;
3118
 
3119
#------------------------------------------------------------
3120
# AT90CAN64
3121
#------------------------------------------------------------
3122
 
3123
part
3124
    id               = "c64";
3125
    desc             = "AT90CAN64";
3126
    has_jtag         = yes;
3127
    stk500_devcode   = 0xB3;
3128
#    avr910_devcode   = 0x43;
3129
    signature        = 0x1e 0x96 0x81;
3130
    chip_erase_delay = 9000;
3131
    pagel            = 0xD7;
3132
    bs2              = 0xA0;
3133
    reset            = dedicated;
3134
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
3135
                       "x x x x  x x x x    x x x x  x x x x";
3136
 
3137
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
3138
                       "x x x x  x x x x    x x x x  x x x x";
3139
 
3140
    timeout		= 200;
3141
    stabdelay		= 100;
3142
    cmdexedelay		= 25;
3143
    synchloops		= 32;
3144
    bytedelay		= 0;
3145
    pollindex		= 3;
3146
    pollvalue		= 0x53;
3147
    predelay		= 1;
3148
    postdelay		= 1;
3149
    pollmethod		= 1;
3150
 
3151
    pp_controlstack     =
3152
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
3153
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
3154
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
3155
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01;
3156
    hventerstabdelay    = 100;
3157
    progmodedelay       = 0;
3158
    latchcycles         = 6;
3159
    togglevtg           = 0;
3160
    poweroffdelay       = 0;
3161
    resetdelayms        = 0;
3162
    resetdelayus        = 0;
3163
    hvleavestabdelay    = 15;
3164
    chiperasepulsewidth = 0;
3165
    chiperasepolltimeout = 10;
3166
    programfusepulsewidth = 0;
3167
    programfusepolltimeout = 5;
3168
    programlockpulsewidth = 0;
3169
    programlockpolltimeout = 5;
3170
 
3171
    idr                 = 0x31;
3172
    spmcr               = 0x57;
3173
    rampz               = 0x3b;
3174
    eecr                = 0x3f;
3175
    allowfullpagebitstream = no;
3176
 
3177
    memory "eeprom"
3178
        paged           = no; /* leave this "no" */
3179
        page_size       = 8;  /* for parallel programming */
3180
        size            = 2048;
3181
        min_write_delay = 9000;
3182
        max_write_delay = 9000;
3183
        readback_p1     = 0xff;
3184
        readback_p2     = 0xff;
3185
	read            = "  1   0   1   0      0   0   0   0",
3186
                          "  0   0   0   x      x a10  a9  a8",
3187
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3188
                          "  o   o   o   o      o   o   o   o";
3189
 
3190
	write           = "  1   1   0   0      0   0   0   0",
3191
                          "  0   0   0   x      x a10  a9  a8",
3192
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3193
                          "  i   i   i   i      i   i   i   i";
3194
 
3195
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
3196
			  "  0   0   0   0      0   0   0   0",
3197
			  "  0   0   0   0      0  a2  a1  a0",
3198
			  "  i   i   i   i      i   i   i   i";
3199
 
3200
	writepage	= "  1   1   0   0      0   0   1   0",
3201
			  "  0   0   x   x      x a10  a9  a8",
3202
			  " a7  a6  a5  a4     a3   0   0   0",
3203
			  "  x   x   x   x      x   x   x   x";
3204
 
3205
 
3206
	mode		= 0x41;
3207
	delay		= 20;
3208
	blocksize	= 8;
3209
	readsize	= 256;
3210
      ;
3211
 
3212
    memory "flash"
3213
        paged           = yes;
3214
        size            = 65536;
3215
        page_size       = 256;
3216
        num_pages       = 256;
3217
        min_write_delay = 4500;
3218
        max_write_delay = 4500;
3219
        readback_p1     = 0xff;
3220
        readback_p2     = 0xff;
3221
        read_lo         = "  0   0   1   0      0   0   0   0",
3222
                          "a15 a14 a13 a12    a11 a10  a9  a8",
3223
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3224
                          "  o   o   o   o      o   o   o   o";
3225
 
3226
        read_hi         = "  0   0   1   0      1   0   0   0",
3227
                          "a15 a14 a13 a12    a11 a10  a9  a8",
3228
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3229
                          "  o   o   o   o      o   o   o   o";
3230
 
3231
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
3232
                          "  0   0   0   x      x   x   x   x",
3233
                          "  x  a6  a5  a4     a3  a2  a1  a0",
3234
                          "  i   i   i   i      i   i   i   i";
3235
 
3236
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
3237
                          "  0   0   0   x      x   x   x   x",
3238
                          "  x  a6  a5  a4     a3  a2  a1  a0",
3239
                          "  i   i   i   i      i   i   i   i";
3240
 
3241
        writepage       = "  0   1   0   0      1   1   0   0",
3242
                          "a15 a14 a13 a12    a11 a10  a9  a8",
3243
                          " a7   x   x   x      x   x   x   x",
3244
                          "  x   x   x   x      x   x   x   x";
3245
 
3246
	mode		= 0x41;
3247
	delay		= 6;
3248
	blocksize	= 256;
3249
	readsize	= 256;
3250
      ;
3251
 
3252
    memory "lfuse"
3253
        size            = 1;
3254
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
3255
                          "x x x x  x x x x  i i i i  i i i i";
3256
 
3257
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
3258
                          "x x x x  x x x x  o o o o  o o o o";
3259
        min_write_delay = 9000;
3260
        max_write_delay = 9000;
3261
      ;
3262
 
3263
    memory "hfuse"
3264
        size            = 1;
3265
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
3266
                          "x x x x  x x x x  i i i i  i i i i";
3267
 
3268
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
3269
                          "x x x x  x x x x  o o o o  o o o o";
3270
        min_write_delay = 9000;
3271
        max_write_delay = 9000;
3272
      ;
3273
 
3274
    memory "efuse"
3275
        size            = 1;
3276
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
3277
                          "x x x x  x x x x  x x x x  i i i i";
3278
 
3279
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
3280
                          "x x x x  x x x x  o o o o  o o o o";
3281
        min_write_delay = 9000;
3282
        max_write_delay = 9000;
3283
      ;
3284
 
3285
    memory "lock"
3286
        size            = 1;
3287
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
3288
                          "x x x x  x x x x   x x o o  o o o o";
3289
 
3290
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
3291
                          "x x x x  x x x x   1 1 i i  i i i i";
3292
        min_write_delay = 9000;
3293
        max_write_delay = 9000;
3294
      ;
3295
 
3296
    memory "calibration"
3297
        size            = 1;
3298
        read            = "0 0 1 1  1 0 0 0  0 0 0 x  x x x x",
3299
                          "0 0 0 0  0 0 0 0  o o o o  o o o o";
3300
      ;
3301
 
3302
    memory "signature"
3303
        size            = 3;
3304
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
3305
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
3306
      ;
3307
  ;
3308
 
3309
#------------------------------------------------------------
3310
# AT90CAN32
3311
#------------------------------------------------------------
3312
 
3313
part
3314
    id               = "c32";
3315
    desc             = "AT90CAN32";
3316
    has_jtag         = yes;
3317
    stk500_devcode   = 0xB3;
3318
#    avr910_devcode   = 0x43;
3319
    signature        = 0x1e 0x95 0x81;
3320
    chip_erase_delay = 9000;
3321
    pagel            = 0xD7;
3322
    bs2              = 0xA0;
3323
    reset            = dedicated;
3324
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
3325
                       "x x x x  x x x x    x x x x  x x x x";
3326
 
3327
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
3328
                       "x x x x  x x x x    x x x x  x x x x";
3329
 
3330
    timeout		= 200;
3331
    stabdelay		= 100;
3332
    cmdexedelay		= 25;
3333
    synchloops		= 32;
3334
    bytedelay		= 0;
3335
    pollindex		= 3;
3336
    pollvalue		= 0x53;
3337
    predelay		= 1;
3338
    postdelay		= 1;
3339
    pollmethod		= 1;
3340
 
3341
    pp_controlstack     =
3342
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
3343
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
3344
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
3345
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01;
3346
    hventerstabdelay    = 100;
3347
    progmodedelay       = 0;
3348
    latchcycles         = 6;
3349
    togglevtg           = 0;
3350
    poweroffdelay       = 0;
3351
    resetdelayms        = 0;
3352
    resetdelayus        = 0;
3353
    hvleavestabdelay    = 15;
3354
    chiperasepulsewidth = 0;
3355
    chiperasepolltimeout = 10;
3356
    programfusepulsewidth = 0;
3357
    programfusepolltimeout = 5;
3358
    programlockpulsewidth = 0;
3359
    programlockpolltimeout = 5;
3360
 
3361
    idr                 = 0x31;
3362
    spmcr               = 0x57;
3363
    rampz               = 0x3b;
3364
    eecr                = 0x3f;
3365
    allowfullpagebitstream = no;
3366
 
3367
    memory "eeprom"
3368
        paged           = no; /* leave this "no" */
3369
        page_size       = 8;  /* for parallel programming */
3370
        size            = 1024;
3371
        min_write_delay = 9000;
3372
        max_write_delay = 9000;
3373
        readback_p1     = 0xff;
3374
        readback_p2     = 0xff;
3375
	read            = "  1   0   1   0      0   0   0   0",
3376
                          "  0   0   0   x      x   x  a9  a8",
3377
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3378
                          "  o   o   o   o      o   o   o   o";
3379
 
3380
	write           = "  1   1   0   0      0   0   0   0",
3381
                          "  0   0   0   x      x   x  a9  a8",
3382
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3383
                          "  i   i   i   i      i   i   i   i";
3384
 
3385
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
3386
			  "  0   0   0   0      0   0   0   0",
3387
			  "  0   0   0   0      0  a2  a1  a0",
3388
			  "  i   i   i   i      i   i   i   i";
3389
 
3390
	writepage	= "  1   1   0   0      0   0   1   0",
3391
			  "  0   0   x   x      x   x  a9  a8",
3392
			  " a7  a6  a5  a4     a3   0   0   0",
3393
			  "  x   x   x   x      x   x   x   x";
3394
 
3395
 
3396
	mode		= 0x41;
3397
	delay		= 20;
3398
	blocksize	= 8;
3399
	readsize	= 256;
3400
      ;
3401
 
3402
    memory "flash"
3403
        paged           = yes;
3404
        size            = 32768;
3405
        page_size       = 256;
3406
        num_pages       = 128;
3407
        min_write_delay = 4500;
3408
        max_write_delay = 4500;
3409
        readback_p1     = 0xff;
3410
        readback_p2     = 0xff;
3411
        read_lo         = "  0   0   1   0      0   0   0   0",
3412
                          "a15 a14 a13 a12    a11 a10  a9  a8",
3413
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3414
                          "  o   o   o   o      o   o   o   o";
3415
 
3416
        read_hi         = "  0   0   1   0      1   0   0   0",
3417
                          "a15 a14 a13 a12    a11 a10  a9  a8",
3418
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3419
                          "  o   o   o   o      o   o   o   o";
3420
 
3421
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
3422
                          "  0   0   0   x      x   x   x   x",
3423
                          "  x  a6  a5  a4     a3  a2  a1  a0",
3424
                          "  i   i   i   i      i   i   i   i";
3425
 
3426
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
3427
                          "  0   0   0   x      x   x   x   x",
3428
                          "  x  a6  a5  a4     a3  a2  a1  a0",
3429
                          "  i   i   i   i      i   i   i   i";
3430
 
3431
        writepage       = "  0   1   0   0      1   1   0   0",
3432
                          "a15 a14 a13 a12    a11 a10  a9  a8",
3433
                          " a7   x   x   x      x   x   x   x",
3434
                          "  x   x   x   x      x   x   x   x";
3435
 
3436
	mode		= 0x41;
3437
	delay		= 6;
3438
	blocksize	= 256;
3439
	readsize	= 256;
3440
      ;
3441
 
3442
    memory "lfuse"
3443
        size            = 1;
3444
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
3445
                          "x x x x  x x x x  i i i i  i i i i";
3446
 
3447
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
3448
                          "x x x x  x x x x  o o o o  o o o o";
3449
        min_write_delay = 9000;
3450
        max_write_delay = 9000;
3451
      ;
3452
 
3453
    memory "hfuse"
3454
        size            = 1;
3455
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
3456
                          "x x x x  x x x x  i i i i  i i i i";
3457
 
3458
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
3459
                          "x x x x  x x x x  o o o o  o o o o";
3460
        min_write_delay = 9000;
3461
        max_write_delay = 9000;
3462
      ;
3463
 
3464
    memory "efuse"
3465
        size            = 1;
3466
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
3467
                          "x x x x  x x x x  x x x x  i i i i";
3468
 
3469
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
3470
                          "x x x x  x x x x  o o o o  o o o o";
3471
        min_write_delay = 9000;
3472
        max_write_delay = 9000;
3473
      ;
3474
 
3475
    memory "lock"
3476
        size            = 1;
3477
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
3478
                          "x x x x  x x x x   x x o o  o o o o";
3479
 
3480
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
3481
                          "x x x x  x x x x   1 1 i i  i i i i";
3482
        min_write_delay = 9000;
3483
        max_write_delay = 9000;
3484
      ;
3485
 
3486
    memory "calibration"
3487
        size            = 1;
3488
        read            = "0 0 1 1  1 0 0 0  0 0 0 x  x x x x",
3489
                          "0 0 0 0  0 0 0 0  o o o o  o o o o";
3490
      ;
3491
 
3492
    memory "signature"
3493
        size            = 3;
3494
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
3495
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
3496
      ;
3497
  ;
3498
 
3499
 
3500
#------------------------------------------------------------
3501
# ATmega16
3502
#------------------------------------------------------------
3503
 
3504
part
3505
    id               = "m16";
3506
    desc             = "ATMEGA16";
3507
    has_jtag         = yes;
3508
    stk500_devcode   = 0x82;
3509
    avr910_devcode   = 0x74;
3510
    signature        = 0x1e 0x94 0x03;
3511
    pagel            = 0xd7;
3512
    bs2              = 0xa0;
3513
    chip_erase_delay = 9000;
3514
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
3515
                       "x x x x  x x x x    x x x x  x x x x";
3516
 
3517
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
3518
                       "x x x x  x x x x    x x x x  x x x x";
3519
 
3520
    timeout		= 200;
3521
    stabdelay		= 100;
3522
    cmdexedelay		= 25;
3523
    synchloops		= 32;
3524
    bytedelay		= 0;
3525
    pollindex		= 3;
3526
    pollvalue		= 0x53;
3527
    predelay		= 1;
3528
    postdelay		= 1;
3529
    pollmethod		= 0;
3530
 
3531
    pp_controlstack     =
3532
	0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
3533
	0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
3534
	0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
3535
	0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
3536
    hventerstabdelay    = 100;
3537
    progmodedelay       = 100;
3538
    latchcycles         = 6;
3539
    togglevtg           = 0;
3540
    poweroffdelay       = 0;
3541
    resetdelayms        = 0;
3542
    resetdelayus        = 0;
3543
    hvleavestabdelay    = 15;
3544
    resetdelay          = 15;
3545
    chiperasepulsewidth = 0;
3546
    chiperasepolltimeout = 10;
3547
    programfusepulsewidth = 0;
3548
    programfusepolltimeout = 5;
3549
    programlockpulsewidth = 0;
3550
    programlockpolltimeout = 5;
3551
 
3552
    idr                 = 0x31;
3553
    spmcr               = 0x57;
3554
    allowfullpagebitstream = yes;
3555
 
3556
    memory "eeprom"
3557
        paged           = no; /* leave this "no" */
3558
        page_size       = 4;  /* for parallel programming */
3559
        size            = 512;
3560
        min_write_delay = 9000;
3561
        max_write_delay = 9000;
3562
        readback_p1     = 0xff;
3563
        readback_p2     = 0xff;
3564
	read            = "  1   0   1   0      0   0   0   0",
3565
                          "  0   0   x   x      x   x  a9  a8",
3566
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3567
                          "  o   o   o   o      o   o   o   o";
3568
 
3569
	write           = "  1   1   0   0      0   0   0   0",
3570
                          "  0   0   x   x      x   x  a9  a8",
3571
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3572
                          "  i   i   i   i      i   i   i   i";
3573
 
3574
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
3575
			  "  0   0   0   0      0   0   0   0",
3576
			  "  0   0   0   0      0   0  a1  a0",
3577
			  "  i   i   i   i      i   i   i   i";
3578
 
3579
	writepage	= "  1   1   0   0      0   0   1   0",
3580
			  "  0   0   x   x      x   x  a9  a8",
3581
			  " a7  a6  a5  a4     a3  a2   0   0",
3582
			  "  x   x   x   x      x   x   x   x";
3583
 
3584
	mode		= 0x04;
3585
	delay		= 10;
3586
	blocksize	= 128;
3587
	readsize	= 256;
3588
      ;
3589
 
3590
    memory "flash"
3591
        paged           = yes;
3592
        size            = 16384;
3593
        page_size       = 128;
3594
        num_pages       = 128;
3595
        min_write_delay = 4500;
3596
        max_write_delay = 4500;
3597
        readback_p1     = 0xff;
3598
        readback_p2     = 0xff;
3599
        read_lo         = "  0   0   1   0      0   0   0   0",
3600
                          "  0   0 a13 a12    a11 a10  a9  a8",
3601
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3602
                          "  o   o   o   o      o   o   o   o";
3603
 
3604
        read_hi         = "  0   0   1   0      1   0   0   0",
3605
                          "  0   0 a13 a12    a11 a10  a9  a8",
3606
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3607
                          "  o   o   o   o      o   o   o   o";
3608
 
3609
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
3610
                          "  0   0   x   x      x   x   x   x",
3611
                          "  x   x  a5  a4     a3  a2  a1  a0",
3612
                          "  i   i   i   i      i   i   i   i";
3613
 
3614
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
3615
                          "  0   0   x   x      x   x   x   x",
3616
                          "  x   x  a5  a4     a3  a2  a1  a0",
3617
                          "  i   i   i   i      i   i   i   i";
3618
 
3619
        writepage       = "  0   1   0   0      1   1   0   0",
3620
                          "  0   0 a13 a12    a11 a10  a9  a8",
3621
                          " a7  a6   x   x      x   x   x   x",
3622
                          "  x   x   x   x      x   x   x   x";
3623
 
3624
	mode		= 0x21;
3625
	delay		= 6;
3626
	blocksize	= 128;
3627
	readsize	= 256;
3628
      ;
3629
 
3630
    memory "lock"
3631
        size            = 1;
3632
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
3633
                          "x x x x  x x x x   x x o o  o o o o";
3634
 
3635
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
3636
                          "x x x x  x x x x   1 1 i i  i i i i";
3637
        min_write_delay = 9000;
3638
        max_write_delay = 9000;
3639
      ;
3640
 
3641
    memory "lfuse"
3642
        size            = 1;
3643
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
3644
                          "x x x x  x x x x   o o o o  o o o o";
3645
 
3646
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
3647
                          "x x x x  x x x x   i i i i  i i i i";
3648
        min_write_delay = 9000;
3649
        max_write_delay = 9000;
3650
      ;
3651
 
3652
    memory "hfuse"
3653
        size            = 1;
3654
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
3655
                          "x x x x  x x x x   o o o o  o o o o";
3656
 
3657
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
3658
                          "x x x x  x x x x   i i i i  i i i i";
3659
        min_write_delay = 9000;
3660
        max_write_delay = 9000;
3661
      ;
3662
    memory "signature"
3663
        size            = 3;
3664
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
3665
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
3666
      ;
3667
    memory "calibration"
3668
        size            = 4;
3669
 
3670
        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
3671
                          "0 0 0 0  0 0 a1 a0 o o o o  o o o o";
3672
        ;
3673
  ;
3674
 
3675
 
3676
#------------------------------------------------------------
3677
# ATmega164P
3678
#------------------------------------------------------------
3679
 
3680
# close to ATmega16
3681
 
3682
part
3683
    id               = "m164p";
3684
    desc             = "ATMEGA164P";
3685
    has_jtag         = yes;
3686
    stk500_devcode   = 0x82; # no STK500v1 support, use the ATmega16 one
3687
    avr910_devcode   = 0x74;
3688
    signature        = 0x1e 0x94 0x0a;
3689
    pagel            = 0xd7;
3690
    bs2              = 0xa0;
3691
    chip_erase_delay = 9000;
3692
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
3693
                       "x x x x  x x x x    x x x x  x x x x";
3694
 
3695
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
3696
                       "x x x x  x x x x    x x x x  x x x x";
3697
 
3698
    timeout		= 200;
3699
    stabdelay		= 100;
3700
    cmdexedelay		= 25;
3701
    synchloops		= 32;
3702
    bytedelay		= 0;
3703
    pollindex		= 3;
3704
    pollvalue		= 0x53;
3705
    predelay		= 1;
3706
    postdelay		= 1;
3707
    pollmethod		= 0;
3708
 
3709
    pp_controlstack     =
3710
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
3711
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
3712
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
3713
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
3714
    hventerstabdelay    = 100;
3715
    progmodedelay       = 0;
3716
    latchcycles         = 5;
3717
    togglevtg           = 1;
3718
    poweroffdelay       = 15;
3719
    resetdelayms        = 1;
3720
    resetdelayus        = 0;
3721
    hvleavestabdelay    = 15;
3722
    chiperasepulsewidth = 0;
3723
    chiperasepolltimeout = 10;
3724
    programfusepulsewidth = 0;
3725
    programfusepolltimeout = 5;
3726
    programlockpulsewidth = 0;
3727
    programlockpolltimeout = 5;
3728
 
3729
    idr                 = 0x31;
3730
    spmcr               = 0x57;
3731
    allowfullpagebitstream = no;
3732
 
3733
    memory "eeprom"
3734
        paged           = no; /* leave this "no" */
3735
        page_size       = 4;  /* for parallel programming */
3736
        size            = 512;
3737
        min_write_delay = 9000;
3738
        max_write_delay = 9000;
3739
        readback_p1     = 0xff;
3740
        readback_p2     = 0xff;
3741
	read            = "  1   0   1   0      0   0   0   0",
3742
                          "  0   0   x   x      x   x  a9  a8",
3743
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3744
                          "  o   o   o   o      o   o   o   o";
3745
 
3746
	write           = "  1   1   0   0      0   0   0   0",
3747
                          "  0   0   x   x      x   x  a9  a8",
3748
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3749
                          "  i   i   i   i      i   i   i   i";
3750
 
3751
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
3752
			  "  0   0   0   0      0   0   0   0",
3753
			  "  0   0   0   0      0   0  a1  a0",
3754
			  "  i   i   i   i      i   i   i   i";
3755
 
3756
	writepage	= "  1   1   0   0      0   0   1   0",
3757
			  "  0   0   x   x      x   x  a9  a8",
3758
			  " a7  a6  a5  a4     a3  a2   0   0",
3759
			  "  x   x   x   x      x   x   x   x";
3760
 
3761
	mode		= 0x41;
3762
	delay		= 10;
3763
	blocksize	= 128;
3764
	readsize	= 256;
3765
      ;
3766
 
3767
    memory "flash"
3768
        paged           = yes;
3769
        size            = 16384;
3770
        page_size       = 128;
3771
        num_pages       = 128;
3772
        min_write_delay = 4500;
3773
        max_write_delay = 4500;
3774
        readback_p1     = 0xff;
3775
        readback_p2     = 0xff;
3776
        read_lo         = "  0   0   1   0      0   0   0   0",
3777
                          "  0   0 a13 a12    a11 a10  a9  a8",
3778
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3779
                          "  o   o   o   o      o   o   o   o";
3780
 
3781
        read_hi         = "  0   0   1   0      1   0   0   0",
3782
                          "  0   0 a13 a12    a11 a10  a9  a8",
3783
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3784
                          "  o   o   o   o      o   o   o   o";
3785
 
3786
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
3787
                          "  0   0   x   x      x   x   x   x",
3788
                          "  x   x  a5  a4     a3  a2  a1  a0",
3789
                          "  i   i   i   i      i   i   i   i";
3790
 
3791
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
3792
                          "  0   0   x   x      x   x   x   x",
3793
                          "  x   x  a5  a4     a3  a2  a1  a0",
3794
                          "  i   i   i   i      i   i   i   i";
3795
 
3796
        writepage       = "  0   1   0   0      1   1   0   0",
3797
                          "  0   0 a13 a12    a11 a10  a9  a8",
3798
                          " a7  a6   x   x      x   x   x   x",
3799
                          "  x   x   x   x      x   x   x   x";
3800
 
3801
	mode		= 0x21;
3802
	delay		= 6;
3803
	blocksize	= 128;
3804
	readsize	= 256;
3805
      ;
3806
 
3807
    memory "lock"
3808
        size            = 1;
3809
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
3810
                          "x x x x  x x x x   x x o o  o o o o";
3811
 
3812
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
3813
                          "x x x x  x x x x   1 1 i i  i i i i";
3814
        min_write_delay = 9000;
3815
        max_write_delay = 9000;
3816
      ;
3817
 
3818
    memory "lfuse"
3819
        size            = 1;
3820
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
3821
                          "x x x x  x x x x   o o o o  o o o o";
3822
 
3823
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
3824
                          "x x x x  x x x x   i i i i  i i i i";
3825
        min_write_delay = 9000;
3826
        max_write_delay = 9000;
3827
      ;
3828
 
3829
    memory "hfuse"
3830
        size            = 1;
3831
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
3832
                          "x x x x  x x x x   o o o o  o o o o";
3833
 
3834
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
3835
                          "x x x x  x x x x   i i i i  i i i i";
3836
        min_write_delay = 9000;
3837
        max_write_delay = 9000;
3838
      ;
3839
 
3840
    memory "efuse"
3841
        size            = 1;
3842
 
3843
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
3844
                          "x x x x  x x x x  o o o o  o o o o";
3845
 
3846
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
3847
                          "x x x x  x x x x  1 1 1 1  1 i i i";
3848
        min_write_delay = 9000;
3849
        max_write_delay = 9000;
3850
      ;
3851
 
3852
    memory "signature"
3853
        size            = 3;
3854
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
3855
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
3856
      ;
3857
 
3858
    memory "calibration"
3859
        size            = 1;
3860
 
3861
        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
3862
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
3863
        ;
3864
  ;
3865
 
3866
 
3867
#------------------------------------------------------------
3868
# ATmega324P
3869
#------------------------------------------------------------
3870
 
3871
# similar to ATmega164P
3872
 
3873
part
3874
    id               = "m324p";
3875
    desc             = "ATMEGA324P";
3876
    has_jtag         = yes;
3877
    stk500_devcode   = 0x82; # no STK500v1 support, use the ATmega16 one
3878
    avr910_devcode   = 0x74;
3879
    signature        = 0x1e 0x95 0x08;
3880
    pagel            = 0xd7;
3881
    bs2              = 0xa0;
3882
    chip_erase_delay = 9000;
3883
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
3884
                       "x x x x  x x x x    x x x x  x x x x";
3885
 
3886
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
3887
                       "x x x x  x x x x    x x x x  x x x x";
3888
 
3889
    timeout		= 200;
3890
    stabdelay		= 100;
3891
    cmdexedelay		= 25;
3892
    synchloops		= 32;
3893
    bytedelay		= 0;
3894
    pollindex		= 3;
3895
    pollvalue		= 0x53;
3896
    predelay		= 1;
3897
    postdelay		= 1;
3898
    pollmethod		= 0;
3899
 
3900
    pp_controlstack     =
3901
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
3902
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
3903
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
3904
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
3905
    hventerstabdelay    = 100;
3906
    progmodedelay       = 0;
3907
    latchcycles         = 5;
3908
    togglevtg           = 1;
3909
    poweroffdelay       = 15;
3910
    resetdelayms        = 1;
3911
    resetdelayus        = 0;
3912
    hvleavestabdelay    = 15;
3913
    chiperasepulsewidth = 0;
3914
    chiperasepolltimeout = 10;
3915
    programfusepulsewidth = 0;
3916
    programfusepolltimeout = 5;
3917
    programlockpulsewidth = 0;
3918
    programlockpolltimeout = 5;
3919
 
3920
    idr                 = 0x31;
3921
    spmcr               = 0x57;
3922
    allowfullpagebitstream = no;
3923
 
3924
    memory "eeprom"
3925
        paged           = no; /* leave this "no" */
3926
        page_size       = 4;  /* for parallel programming */
3927
        size            = 1024;
3928
        min_write_delay = 9000;
3929
        max_write_delay = 9000;
3930
        readback_p1     = 0xff;
3931
        readback_p2     = 0xff;
3932
	read            = "  1   0   1   0      0   0   0   0",
3933
                          "  0   0   x   x      x a10  a9  a8",
3934
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3935
                          "  o   o   o   o      o   o   o   o";
3936
 
3937
	write           = "  1   1   0   0      0   0   0   0",
3938
                          "  0   0   x   x      x a10  a9  a8",
3939
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3940
                          "  i   i   i   i      i   i   i   i";
3941
 
3942
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
3943
			  "  0   0   0   0      0   0   0   0",
3944
			  "  0   0   0   0      0   0  a1  a0",
3945
			  "  i   i   i   i      i   i   i   i";
3946
 
3947
	writepage	= "  1   1   0   0      0   0   1   0",
3948
			  "  0   0   x   x      x a10  a9  a8",
3949
			  " a7  a6  a5  a4     a3  a2   0   0",
3950
			  "  x   x   x   x      x   x   x   x";
3951
 
3952
	mode		= 0x41;
3953
	delay		= 10;
3954
	blocksize	= 128;
3955
	readsize	= 256;
3956
      ;
3957
 
3958
    memory "flash"
3959
        paged           = yes;
3960
        size            = 32768;
3961
        page_size       = 128;
3962
        num_pages       = 256;
3963
        min_write_delay = 4500;
3964
        max_write_delay = 4500;
3965
        readback_p1     = 0xff;
3966
        readback_p2     = 0xff;
3967
        read_lo         = "  0   0   1   0      0   0   0   0",
3968
                          "  0 a14 a13 a12    a11 a10  a9  a8",
3969
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3970
                          "  o   o   o   o      o   o   o   o";
3971
 
3972
        read_hi         = "  0   0   1   0      1   0   0   0",
3973
                          "  0 a14 a13 a12    a11 a10  a9  a8",
3974
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3975
                          "  o   o   o   o      o   o   o   o";
3976
 
3977
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
3978
                          "  0   0   x   x      x   x   x   x",
3979
                          "  x   x  a5  a4     a3  a2  a1  a0",
3980
                          "  i   i   i   i      i   i   i   i";
3981
 
3982
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
3983
                          "  0   0   x   x      x   x   x   x",
3984
                          "  x   x  a5  a4     a3  a2  a1  a0",
3985
                          "  i   i   i   i      i   i   i   i";
3986
 
3987
        writepage       = "  0   1   0   0      1   1   0   0",
3988
                          "  0 a14 a13 a12    a11 a10  a9  a8",
3989
                          " a7  a6   x   x      x   x   x   x",
3990
                          "  x   x   x   x      x   x   x   x";
3991
 
3992
	mode		= 0x21;
3993
	delay		= 6;
3994
	blocksize	= 256;
3995
	readsize	= 256;
3996
      ;
3997
 
3998
    memory "lock"
3999
        size            = 1;
4000
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
4001
                          "x x x x  x x x x   x x o o  o o o o";
4002
 
4003
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
4004
                          "x x x x  x x x x   1 1 i i  i i i i";
4005
        min_write_delay = 9000;
4006
        max_write_delay = 9000;
4007
      ;
4008
 
4009
    memory "lfuse"
4010
        size            = 1;
4011
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
4012
                          "x x x x  x x x x   o o o o  o o o o";
4013
 
4014
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
4015
                          "x x x x  x x x x   i i i i  i i i i";
4016
        min_write_delay = 9000;
4017
        max_write_delay = 9000;
4018
      ;
4019
 
4020
    memory "hfuse"
4021
        size            = 1;
4022
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
4023
                          "x x x x  x x x x   o o o o  o o o o";
4024
 
4025
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
4026
                          "x x x x  x x x x   i i i i  i i i i";
4027
        min_write_delay = 9000;
4028
        max_write_delay = 9000;
4029
      ;
4030
 
4031
    memory "efuse"
4032
        size            = 1;
4033
 
4034
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
4035
                          "x x x x  x x x x  o o o o  o o o o";
4036
 
4037
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
4038
                          "x x x x  x x x x  1 1 1 1  1 i i i";
4039
        min_write_delay = 9000;
4040
        max_write_delay = 9000;
4041
      ;
4042
 
4043
    memory "signature"
4044
        size            = 3;
4045
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
4046
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
4047
      ;
4048
 
4049
    memory "calibration"
4050
        size            = 1;
4051
 
4052
        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
4053
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
4054
        ;
4055
  ;
4056
 
4057
 
4058
#------------------------------------------------------------
4059
# ATmega644
4060
#------------------------------------------------------------
4061
 
4062
# similar to ATmega164
4063
 
4064
part
4065
    id               = "m644";
4066
    desc             = "ATMEGA644";
4067
    has_jtag         = yes;
4068
    stk500_devcode   = 0x82; # no STK500v1 support, use the ATmega16 one
4069
    avr910_devcode   = 0x74;
4070
    signature        = 0x1e 0x96 0x09;
4071
    pagel            = 0xd7;
4072
    bs2              = 0xa0;
4073
    chip_erase_delay = 9000;
4074
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
4075
                       "x x x x  x x x x    x x x x  x x x x";
4076
 
4077
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
4078
                       "x x x x  x x x x    x x x x  x x x x";
4079
 
4080
    timeout		= 200;
4081
    stabdelay		= 100;
4082
    cmdexedelay		= 25;
4083
    synchloops		= 32;
4084
    bytedelay		= 0;
4085
    pollindex		= 3;
4086
    pollvalue		= 0x53;
4087
    predelay		= 1;
4088
    postdelay		= 1;
4089
    pollmethod		= 0;
4090
 
4091
    pp_controlstack     =
4092
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
4093
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
4094
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
4095
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
4096
    hventerstabdelay    = 100;
4097
    progmodedelay       = 0;
4098
    latchcycles         = 6;
4099
    togglevtg           = 0;
4100
    poweroffdelay       = 0;
4101
    resetdelayms        = 0;
4102
    resetdelayus        = 0;
4103
    hvleavestabdelay    = 15;
4104
    chiperasepulsewidth = 0;
4105
    chiperasepolltimeout = 10;
4106
    programfusepulsewidth = 0;
4107
    programfusepolltimeout = 5;
4108
    programlockpulsewidth = 0;
4109
    programlockpolltimeout = 5;
4110
 
4111
    idr                 = 0x31;
4112
    spmcr               = 0x57;
4113
    allowfullpagebitstream = no;
4114
 
4115
    memory "eeprom"
4116
        paged           = no; /* leave this "no" */
4117
        page_size       = 8;  /* for parallel programming */
4118
        size            = 2048;
4119
        min_write_delay = 9000;
4120
        max_write_delay = 9000;
4121
        readback_p1     = 0xff;
4122
        readback_p2     = 0xff;
4123
	read            = "  1   0   1   0      0   0   0   0",
4124
                          "  0   0   x   x    a11 a10  a9  a8",
4125
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4126
                          "  o   o   o   o      o   o   o   o";
4127
 
4128
	write           = "  1   1   0   0      0   0   0   0",
4129
                          "  0   0   x   x    a11 a10  a9  a8",
4130
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4131
                          "  i   i   i   i      i   i   i   i";
4132
 
4133
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
4134
			  "  0   0   0   0      0   0   0   0",
4135
			  "  0   0   0   0      0  a2  a1  a0",
4136
			  "  i   i   i   i      i   i   i   i";
4137
 
4138
	writepage	= "  1   1   0   0      0   0   1   0",
4139
			  "  0   0   x   x    a11 a10  a9  a8",
4140
			  " a7  a6  a5  a4     a3   0   0   0",
4141
			  "  x   x   x   x      x   x   x   x";
4142
 
4143
	mode		= 0x41;
4144
	delay		= 10;
4145
	blocksize	= 128;
4146
	readsize	= 256;
4147
      ;
4148
 
4149
    memory "flash"
4150
        paged           = yes;
4151
        size            = 65536;
4152
        page_size       = 256;
4153
        num_pages       = 256;
4154
        min_write_delay = 4500;
4155
        max_write_delay = 4500;
4156
        readback_p1     = 0xff;
4157
        readback_p2     = 0xff;
4158
        read_lo         = "  0   0   1   0      0   0   0   0",
4159
                          "a15 a14 a13 a12    a11 a10  a9  a8",
4160
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4161
                          "  o   o   o   o      o   o   o   o";
4162
 
4163
        read_hi         = "  0   0   1   0      1   0   0   0",
4164
                          "a15 a14 a13 a12    a11 a10  a9  a8",
4165
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4166
                          "  o   o   o   o      o   o   o   o";
4167
 
4168
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
4169
                          "  0   0   x   x      x   x   x   x",
4170
                          "  x  a6  a5  a4     a3  a2  a1  a0",
4171
                          "  i   i   i   i      i   i   i   i";
4172
 
4173
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
4174
                          "  0   0   x   x      x   x   x   x",
4175
                          "  x  a6  a5  a4     a3  a2  a1  a0",
4176
                          "  i   i   i   i      i   i   i   i";
4177
 
4178
        writepage       = "  0   1   0   0      1   1   0   0",
4179
                          "a15 a14 a13 a12    a11 a10  a9  a8",
4180
                          " a7   x   x   x      x   x   x   x",
4181
                          "  x   x   x   x      x   x   x   x";
4182
 
4183
	mode		= 0x21;
4184
	delay		= 6;
4185
	blocksize	= 256;
4186
	readsize	= 256;
4187
      ;
4188
 
4189
    memory "lock"
4190
        size            = 1;
4191
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
4192
                          "x x x x  x x x x   x x o o  o o o o";
4193
 
4194
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
4195
                          "x x x x  x x x x   1 1 i i  i i i i";
4196
        min_write_delay = 9000;
4197
        max_write_delay = 9000;
4198
      ;
4199
 
4200
    memory "lfuse"
4201
        size            = 1;
4202
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
4203
                          "x x x x  x x x x   o o o o  o o o o";
4204
 
4205
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
4206
                          "x x x x  x x x x   i i i i  i i i i";
4207
        min_write_delay = 9000;
4208
        max_write_delay = 9000;
4209
      ;
4210
 
4211
    memory "hfuse"
4212
        size            = 1;
4213
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
4214
                          "x x x x  x x x x   o o o o  o o o o";
4215
 
4216
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
4217
                          "x x x x  x x x x   i i i i  i i i i";
4218
        min_write_delay = 9000;
4219
        max_write_delay = 9000;
4220
      ;
4221
 
4222
    memory "efuse"
4223
        size            = 1;
4224
 
4225
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
4226
                          "x x x x  x x x x  o o o o  o o o o";
4227
 
4228
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
4229
                          "x x x x  x x x x  1 1 1 1  1 i i i";
4230
        min_write_delay = 9000;
4231
        max_write_delay = 9000;
4232
      ;
4233
 
4234
    memory "signature"
4235
        size            = 3;
4236
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
4237
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
4238
      ;
4239
 
4240
    memory "calibration"
4241
        size            = 1;
4242
 
4243
        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
4244
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
4245
        ;
4246
  ;
4247
 
4248
#------------------------------------------------------------
4249
# ATmega644P
4250
#------------------------------------------------------------
4251
 
4252
# similar to ATmega164p
4253
 
4254
part
4255
    id               = "m644p";
4256
    desc             = "ATMEGA644P";
4257
    has_jtag         = yes;
4258
    stk500_devcode   = 0x82; # no STK500v1 support, use the ATmega16 one
4259
    avr910_devcode   = 0x74;
4260
    signature        = 0x1e 0x96 0x0a;
4261
    pagel            = 0xd7;
4262
    bs2              = 0xa0;
4263
    chip_erase_delay = 9000;
4264
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
4265
                       "x x x x  x x x x    x x x x  x x x x";
4266
 
4267
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
4268
                       "x x x x  x x x x    x x x x  x x x x";
4269
 
4270
    timeout		= 200;
4271
    stabdelay		= 100;
4272
    cmdexedelay		= 25;
4273
    synchloops		= 32;
4274
    bytedelay		= 0;
4275
    pollindex		= 3;
4276
    pollvalue		= 0x53;
4277
    predelay		= 1;
4278
    postdelay		= 1;
4279
    pollmethod		= 0;
4280
 
4281
    pp_controlstack     =
4282
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
4283
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
4284
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
4285
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
4286
    hventerstabdelay    = 100;
4287
    progmodedelay       = 0;
4288
    latchcycles         = 6;
4289
    togglevtg           = 0;
4290
    poweroffdelay       = 0;
4291
    resetdelayms        = 0;
4292
    resetdelayus        = 0;
4293
    hvleavestabdelay    = 15;
4294
    chiperasepulsewidth = 0;
4295
    chiperasepolltimeout = 10;
4296
    programfusepulsewidth = 0;
4297
    programfusepolltimeout = 5;
4298
    programlockpulsewidth = 0;
4299
    programlockpolltimeout = 5;
4300
 
4301
    idr                 = 0x31;
4302
    spmcr               = 0x57;
4303
    allowfullpagebitstream = no;
4304
 
4305
    memory "eeprom"
4306
        paged           = no; /* leave this "no" */
4307
        page_size       = 8;  /* for parallel programming */
4308
        size            = 2048;
4309
        min_write_delay = 9000;
4310
        max_write_delay = 9000;
4311
        readback_p1     = 0xff;
4312
        readback_p2     = 0xff;
4313
	read            = "  1   0   1   0      0   0   0   0",
4314
                          "  0   0   x   x    a11 a10  a9  a8",
4315
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4316
                          "  o   o   o   o      o   o   o   o";
4317
 
4318
	write           = "  1   1   0   0      0   0   0   0",
4319
                          "  0   0   x   x    a11 a10  a9  a8",
4320
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4321
                          "  i   i   i   i      i   i   i   i";
4322
 
4323
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
4324
			  "  0   0   0   0      0   0   0   0",
4325
			  "  0   0   0   0      0  a2  a1  a0",
4326
			  "  i   i   i   i      i   i   i   i";
4327
 
4328
	writepage	= "  1   1   0   0      0   0   1   0",
4329
			  "  0   0   x   x    a11 a10  a9  a8",
4330
			  " a7  a6  a5  a4     a3   0   0   0",
4331
			  "  x   x   x   x      x   x   x   x";
4332
 
4333
	mode		= 0x41;
4334
	delay		= 10;
4335
	blocksize	= 128;
4336
	readsize	= 256;
4337
      ;
4338
 
4339
    memory "flash"
4340
        paged           = yes;
4341
        size            = 65536;
4342
        page_size       = 256;
4343
        num_pages       = 256;
4344
        min_write_delay = 4500;
4345
        max_write_delay = 4500;
4346
        readback_p1     = 0xff;
4347
        readback_p2     = 0xff;
4348
        read_lo         = "  0   0   1   0      0   0   0   0",
4349
                          "a15 a14 a13 a12    a11 a10  a9  a8",
4350
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4351
                          "  o   o   o   o      o   o   o   o";
4352
 
4353
        read_hi         = "  0   0   1   0      1   0   0   0",
4354
                          "a15 a14 a13 a12    a11 a10  a9  a8",
4355
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4356
                          "  o   o   o   o      o   o   o   o";
4357
 
4358
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
4359
                          "  0   0   x   x      x   x   x   x",
4360
                          "  x  a6  a5  a4     a3  a2  a1  a0",
4361
                          "  i   i   i   i      i   i   i   i";
4362
 
4363
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
4364
                          "  0   0   x   x      x   x   x   x",
4365
                          "  x  a6  a5  a4     a3  a2  a1  a0",
4366
                          "  i   i   i   i      i   i   i   i";
4367
 
4368
        writepage       = "  0   1   0   0      1   1   0   0",
4369
                          "a15 a14 a13 a12    a11 a10  a9  a8",
4370
                          " a7   x   x   x      x   x   x   x",
4371
                          "  x   x   x   x      x   x   x   x";
4372
 
4373
	mode		= 0x21;
4374
	delay		= 6;
4375
	blocksize	= 256;
4376
	readsize	= 256;
4377
      ;
4378
 
4379
    memory "lock"
4380
        size            = 1;
4381
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
4382
                          "x x x x  x x x x   x x o o  o o o o";
4383
 
4384
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
4385
                          "x x x x  x x x x   1 1 i i  i i i i";
4386
        min_write_delay = 9000;
4387
        max_write_delay = 9000;
4388
      ;
4389
 
4390
    memory "lfuse"
4391
        size            = 1;
4392
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
4393
                          "x x x x  x x x x   o o o o  o o o o";
4394
 
4395
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
4396
                          "x x x x  x x x x   i i i i  i i i i";
4397
        min_write_delay = 9000;
4398
        max_write_delay = 9000;
4399
      ;
4400
 
4401
    memory "hfuse"
4402
        size            = 1;
4403
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
4404
                          "x x x x  x x x x   o o o o  o o o o";
4405
 
4406
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
4407
                          "x x x x  x x x x   i i i i  i i i i";
4408
        min_write_delay = 9000;
4409
        max_write_delay = 9000;
4410
      ;
4411
 
4412
    memory "efuse"
4413
        size            = 1;
4414
 
4415
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
4416
                          "x x x x  x x x x  o o o o  o o o o";
4417
 
4418
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
4419
                          "x x x x  x x x x  1 1 1 1  1 i i i";
4420
        min_write_delay = 9000;
4421
        max_write_delay = 9000;
4422
      ;
4423
 
4424
    memory "signature"
4425
        size            = 3;
4426
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
4427
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
4428
      ;
4429
 
4430
    memory "calibration"
4431
        size            = 1;
4432
 
4433
        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
4434
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
4435
        ;
4436
  ;
4437
 
4438
 
4439
 
4440
#------------------------------------------------------------
4441
# ATmega1284P
4442
#------------------------------------------------------------
4443
 
4444
# similar to ATmega164p
4445
 
4446
part
4447
    id               = "m1284p";
4448
    desc             = "ATMEGA1284P";
4449
    has_jtag         = yes;
4450
    stk500_devcode   = 0x82; # no STK500v1 support, use the ATmega16 one
4451
    avr910_devcode   = 0x74;
4452
    signature        = 0x1e 0x97 0x05;
4453
    pagel            = 0xd7;
4454
    bs2              = 0xa0;
4455
    chip_erase_delay = 9000;
4456
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
4457
                       "x x x x  x x x x    x x x x  x x x x";
4458
 
4459
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
4460
                       "x x x x  x x x x    x x x x  x x x x";
4461
 
4462
    timeout		= 200;
4463
    stabdelay		= 100;
4464
    cmdexedelay		= 25;
4465
    synchloops		= 32;
4466
    bytedelay		= 0;
4467
    pollindex		= 3;
4468
    pollvalue		= 0x53;
4469
    predelay		= 1;
4470
    postdelay		= 1;
4471
    pollmethod		= 1;
4472
 
4473
    pp_controlstack     =
4474
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
4475
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
4476
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
4477
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
4478
    hventerstabdelay    = 100;
4479
    progmodedelay       = 0;
4480
    latchcycles         = 6;
4481
    togglevtg           = 1;
4482
    poweroffdelay       = 15;
4483
    resetdelayms        = 1;
4484
    resetdelayus        = 0;
4485
    hvleavestabdelay    = 15;
4486
    chiperasepulsewidth = 0;
4487
    chiperasepolltimeout = 10;
4488
    programfusepulsewidth = 0;
4489
    programfusepolltimeout = 5;
4490
    programlockpulsewidth = 0;
4491
    programlockpolltimeout = 5;
4492
 
4493
    idr                 = 0x31;
4494
    spmcr               = 0x57;
4495
    allowfullpagebitstream = no;
4496
 
4497
    memory "eeprom"
4498
        paged           = no; /* leave this "no" */
4499
        page_size       = 8;  /* for parallel programming */
4500
        size            = 4096;
4501
        min_write_delay = 9000;
4502
        max_write_delay = 9000;
4503
        readback_p1     = 0xff;
4504
        readback_p2     = 0xff;
4505
	read            = "  1   0   1   0      0   0   0   0",
4506
                          "  0   0   x   x    a11 a10  a9  a8",
4507
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4508
                          "  o   o   o   o      o   o   o   o";
4509
 
4510
	write           = "  1   1   0   0      0   0   0   0",
4511
                          "  0   0   x   x    a11 a10  a9  a8",
4512
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4513
                          "  i   i   i   i      i   i   i   i";
4514
 
4515
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
4516
			  "  0   0   0   0      0   0   0   0",
4517
			  "  0   0   0   0      0  a2  a1  a0",
4518
			  "  i   i   i   i      i   i   i   i";
4519
 
4520
	writepage	= "  1   1   0   0      0   0   1   0",
4521
			  "  0   0   x   x    a11 a10  a9  a8",
4522
			  " a7  a6  a5  a4     a3   0   0   0",
4523
			  "  x   x   x   x      x   x   x   x";
4524
 
4525
	mode		= 0x41;
4526
	delay		= 10;
4527
	blocksize	= 128;
4528
	readsize	= 256;
4529
      ;
4530
 
4531
    memory "flash"
4532
        paged           = yes;
4533
        size            = 131072;
4534
        page_size       = 256;
4535
        num_pages       = 512;
4536
        min_write_delay = 4500;
4537
        max_write_delay = 4500;
4538
        readback_p1     = 0xff;
4539
        readback_p2     = 0xff;
4540
        read_lo         = "  0   0   1   0      0   0   0   0",
4541
                          "a15 a14 a13 a12    a11 a10  a9  a8",
4542
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4543
                          "  o   o   o   o      o   o   o   o";
4544
 
4545
        read_hi         = "  0   0   1   0      1   0   0   0",
4546
                          "a15 a14 a13 a12    a11 a10  a9  a8",
4547
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4548
                          "  o   o   o   o      o   o   o   o";
4549
 
4550
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
4551
                          "  0   0   x   x      x   x   x   x",
4552
                          "  x  a6  a5  a4     a3  a2  a1  a0",
4553
                          "  i   i   i   i      i   i   i   i";
4554
 
4555
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
4556
                          "  0   0   x   x      x   x   x   x",
4557
                          "  x  a6  a5  a4     a3  a2  a1  a0",
4558
                          "  i   i   i   i      i   i   i   i";
4559
 
4560
        writepage       = "  0   1   0   0      1   1   0   0",
4561
                          "a15 a14 a13 a12    a11 a10  a9  a8",
4562
                          " a7   x   x   x      x   x   x   x",
4563
                          "  x   x   x   x      x   x   x   x";
4564
 
4565
	mode		= 0x41;
4566
	delay		= 10;
4567
	blocksize	= 256;
4568
	readsize	= 256;
4569
      ;
4570
 
4571
    memory "lock"
4572
        size            = 1;
4573
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
4574
                          "x x x x  x x x x   x x o o  o o o o";
4575
 
4576
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
4577
                          "x x x x  x x x x   1 1 i i  i i i i";
4578
        min_write_delay = 9000;
4579
        max_write_delay = 9000;
4580
      ;
4581
 
4582
    memory "lfuse"
4583
        size            = 1;
4584
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
4585
                          "x x x x  x x x x   o o o o  o o o o";
4586
 
4587
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
4588
                          "x x x x  x x x x   i i i i  i i i i";
4589
        min_write_delay = 9000;
4590
        max_write_delay = 9000;
4591
      ;
4592
 
4593
    memory "hfuse"
4594
        size            = 1;
4595
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
4596
                          "x x x x  x x x x   o o o o  o o o o";
4597
 
4598
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
4599
                          "x x x x  x x x x   i i i i  i i i i";
4600
        min_write_delay = 9000;
4601
        max_write_delay = 9000;
4602
      ;
4603
 
4604
    memory "efuse"
4605
        size            = 1;
4606
 
4607
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
4608
                          "x x x x  x x x x  o o o o  o o o o";
4609
 
4610
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
4611
                          "x x x x  x x x x  1 1 1 1  1 i i i";
4612
        min_write_delay = 9000;
4613
        max_write_delay = 9000;
4614
      ;
4615
 
4616
    memory "signature"
4617
        size            = 3;
4618
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
4619
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
4620
      ;
4621
 
4622
    memory "calibration"
4623
        size            = 1;
4624
 
4625
        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
4626
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
4627
        ;
4628
  ;
4629
 
4630
 
4631
 
4632
#------------------------------------------------------------
4633
# ATmega162
4634
#------------------------------------------------------------
4635
 
4636
part
4637
    id               = "m162";
4638
    desc             = "ATMEGA162";
4639
    has_jtag         = yes;
4640
    stk500_devcode   = 0x83;
4641
    avr910_devcode   = 0x63;
4642
    signature        = 0x1e 0x94 0x04;
4643
    chip_erase_delay = 9000;
4644
    pagel            = 0xd7;
4645
    bs2              = 0xa0;
4646
 
4647
    idr              = 0x04;
4648
    spmcr            = 0x57;
4649
    allowfullpagebitstream = yes;
4650
 
4651
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
4652
                       "x x x x  x x x x    x x x x  x x x x";
4653
 
4654
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
4655
                       "x x x x  x x x x    x x x x  x x x x";
4656
 
4657
    memory "flash"
4658
        paged           = yes;
4659
        size            = 16384;
4660
        page_size       = 128;
4661
        num_pages       = 128;
4662
        min_write_delay = 4500;
4663
        max_write_delay = 4500;
4664
        readback_p1     = 0xff;
4665
        readback_p2     = 0xff;
4666
 
4667
        read_lo         = "  0   0   1   0      0   0   0   0",
4668
                          "  0   0 a13 a12    a11 a10  a9  a8",
4669
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4670
                          "  o   o   o   o      o   o   o   o";
4671
 
4672
        read_hi         = "  0   0   1   0      1   0   0   0",
4673
                          "  0   0 a13 a12    a11 a10  a9  a8",
4674
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4675
                          "  o   o   o   o      o   o   o   o";
4676
 
4677
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
4678
                          "  0   0   x   x      x   x   x   x",
4679
                          "  x   x  a5  a4     a3  a2  a1  a0",
4680
                          "  i   i   i   i      i   i   i   i";
4681
 
4682
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
4683
                          "  0   0   x   x      x   x   x   x",
4684
                          "  x   x  a5  a4     a3  a2  a1  a0",
4685
                          "  i   i   i   i      i   i   i   i";
4686
 
4687
        writepage       = "  0   1   0   0      1   1   0   0",
4688
                          "  0   0 a13 a12    a11 a10  a9  a8",
4689
                          " a7  a6   x   x      x   x   x   x",
4690
                          "  x   x   x   x      x   x   x   x";
4691
       mode        = 0x41;
4692
    delay       = 10;
4693
    blocksize   = 128;
4694
    readsize    = 256;
4695
 
4696
        ;
4697
 
4698
    timeout		= 200;
4699
    stabdelay		= 100;
4700
    cmdexedelay		= 25;
4701
    synchloops		= 32;
4702
    bytedelay		= 0;
4703
    pollindex		= 3;
4704
    pollvalue		= 0x53;
4705
    predelay		= 1;
4706
    postdelay		= 1;
4707
    pollmethod		= 0;
4708
 
4709
    pp_controlstack     =
4710
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
4711
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
4712
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
4713
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
4714
    hventerstabdelay    = 100;
4715
    progmodedelay       = 0;
4716
    latchcycles         = 6;
4717
    togglevtg           = 0;
4718
    poweroffdelay       = 0;
4719
    resetdelayms        = 0;
4720
    resetdelayus        = 0;
4721
    hvleavestabdelay    = 15;
4722
    chiperasepulsewidth = 0;
4723
    chiperasepolltimeout = 10;
4724
    programfusepulsewidth = 0;
4725
    programfusepolltimeout = 5;
4726
    programlockpulsewidth = 0;
4727
    programlockpolltimeout = 5;
4728
 
4729
    memory "eeprom"
4730
        paged           = no; /* leave this "no" */
4731
        page_size       = 4;  /* for parallel programming */
4732
        size            = 512;
4733
        min_write_delay = 9000;
4734
        max_write_delay = 9000;
4735
        readback_p1     = 0xff;
4736
        readback_p2     = 0xff;
4737
 
4738
                read            = "  1   0   1   0      0   0   0   0",
4739
                          "  0   0   x   x      x   x  a9  a8",
4740
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4741
                          "  o   o   o   o      o   o   o   o";
4742
 
4743
                write           = "  1   1   0   0      0   0   0   0",
4744
                          "  0   0   x   x      x   x  a9  a8",
4745
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4746
                          "  i   i   i   i      i   i   i   i";
4747
 
4748
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
4749
			  "  0   0   0   0      0   0   0   0",
4750
			  "  0   0   0   0      0   0  a1  a0",
4751
			  "  i   i   i   i      i   i   i   i";
4752
 
4753
	writepage	= "  1   1   0   0      0   0   1   0",
4754
			  "  0   0   x   x      x   x  a9  a8",
4755
			  " a7  a6  a5  a4     a3  a2   0   0",
4756
			  "  x   x   x   x      x   x   x   x";
4757
 
4758
	mode		= 0x41;
4759
	delay		= 20;
4760
	blocksize	= 4;
4761
	readsize	= 256;
4762
        ;
4763
 
4764
    memory "lfuse"
4765
        size            = 1;
4766
        min_write_delay = 16000;
4767
        max_write_delay = 16000;
4768
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
4769
                          "x x x x  x x x x   o o o o  o o o o";
4770
 
4771
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
4772
                          "x x x x  x x x x   i i i i  i i i i";
4773
        ;
4774
 
4775
    memory "hfuse"
4776
        size            = 1;
4777
        min_write_delay = 16000;
4778
        max_write_delay = 16000;
4779
 
4780
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
4781
                          "x x x x  x x x x   o o o o  o o o o";
4782
 
4783
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
4784
                          "x x x x  x x x x   i i i i  i i i i";
4785
        ;
4786
 
4787
    memory "efuse"
4788
        size            = 1;
4789
        min_write_delay = 16000;
4790
        max_write_delay = 16000;
4791
 
4792
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
4793
                          "x x x x  x x x x  o o o o  o o o o";
4794
 
4795
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
4796
                          "x x x x  x x x x  1 1 1 1  1 i i i";
4797
      ;
4798
 
4799
    memory "lock"
4800
        size            = 1;
4801
        min_write_delay = 16000;
4802
        max_write_delay = 16000;
4803
 
4804
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
4805
                          "x x x x  x x x x   x x o o  o o o o";
4806
 
4807
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
4808
                          "x x x x  x x x x   1 1 i i  i i i i";
4809
        ;
4810
 
4811
    memory "signature"
4812
        size            = 3;
4813
 
4814
        read            = "0  0  1  1   0  0  0  0   0  0  x  x   x  x  x  x",
4815
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
4816
        ;
4817
 
4818
    memory "calibration"
4819
        size            = 1;
4820
 
4821
        read            = "0 0 1 1  1 0 0 0   0 0 x x  x x x x",
4822
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
4823
        ;
4824
;
4825
 
4826
 
4827
 
4828
#------------------------------------------------------------
4829
# ATmega163
4830
#------------------------------------------------------------
4831
 
4832
part
4833
    id               = "m163";
4834
    desc             = "ATMEGA163";
4835
    stk500_devcode   = 0x81;
4836
    avr910_devcode   = 0x64;
4837
    signature        = 0x1e 0x94 0x02;
4838
    chip_erase_delay = 32000;
4839
    pagel            = 0xd7;
4840
    bs2              = 0xa0;
4841
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
4842
                       "x x x x  x x x x    x x x x  x x x x";
4843
 
4844
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
4845
                       "x x x x  x x x x    x x x x  x x x x";
4846
 
4847
    timeout             = 200;
4848
    stabdelay           = 100;
4849
    cmdexedelay         = 25;
4850
    synchloops          = 32;
4851
    bytedelay           = 0;
4852
    pollindex           = 3;
4853
    pollvalue           = 0x53;
4854
    predelay            = 1;
4855
    postdelay           = 1;
4856
    pollmethod          = 0;
4857
 
4858
    pp_controlstack     =
4859
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
4860
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
4861
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
4862
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
4863
    hventerstabdelay    = 100;
4864
    progmodedelay       = 0;
4865
    latchcycles         = 0;
4866
    togglevtg           = 0;
4867
    poweroffdelay       = 0;
4868
    resetdelayms        = 0;
4869
    resetdelayus        = 0;
4870
    hvleavestabdelay    = 15;
4871
    chiperasepulsewidth = 0;
4872
    chiperasepolltimeout = 30;
4873
    programfusepulsewidth = 0;
4874
    programfusepolltimeout = 2;
4875
    programlockpulsewidth = 0;
4876
    programlockpolltimeout = 2;
4877
 
4878
 
4879
   memory "eeprom"
4880
        size            = 512;
4881
        min_write_delay = 4000;
4882
        max_write_delay = 4000;
4883
        readback_p1     = 0xff;
4884
        readback_p2     = 0xff;
4885
	read            = "  1   0   1   0      0   0   0   0",
4886
                          "  x   x   x   x      x   x   x  a8",
4887
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4888
                          "  o   o   o   o      o   o   o   o";
4889
 
4890
	write           = "  1   1   0   0      0   0   0   0",
4891
                          "  x   x   x   x      x   x   x  a8",
4892
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4893
                          "  i   i   i   i      i   i   i   i";
4894
        mode            = 0x41;
4895
        delay           = 20;
4896
        blocksize       = 4;
4897
        readsize        = 256;
4898
      ;
4899
 
4900
    memory "flash"
4901
        paged           = yes;
4902
        size            = 16384;
4903
        page_size       = 128;
4904
        num_pages       = 128;
4905
        min_write_delay = 16000;
4906
        max_write_delay = 16000;
4907
        readback_p1     = 0xff;
4908
        readback_p2     = 0xff;
4909
        read_lo         = "  0   0   1   0      0   0   0   0",
4910
                          "  x   x   x a12    a11 a10  a9  a8",
4911
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4912
                          "  o   o   o   o      o   o   o   o";
4913
 
4914
        read_hi         = "  0   0   1   0      1   0   0   0",
4915
                          "  x   x   x a12    a11 a10  a9  a8",
4916
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4917
                          "  o   o   o   o      o   o   o   o";
4918
 
4919
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
4920
                          "  x   x   x   x      x   x   x   x",
4921
                          "  x   x  a5  a4     a3  a2  a1  a0",
4922
                          "  i   i   i   i      i   i   i   i";
4923
 
4924
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
4925
                          "  x   x   x   x      x   x   x   x",
4926
                          "  x   x  a5  a4     a3  a2  a1  a0",
4927
                          "  i   i   i   i      i   i   i   i";
4928
 
4929
        writepage       = "  0   1   0   0      1   1   0   0",
4930
                          "  x   x   x a12    a11 a10  a9  a8",
4931
                          " a7  a6   x   x      x   x   x   x",
4932
                          "  x   x   x   x      x   x   x   x";
4933
 
4934
	mode		= 0x11;
4935
	delay		= 20;
4936
	blocksize	= 128;
4937
	readsize	= 256;
4938
      ;
4939
 
4940
    memory "lfuse"
4941
        size            = 1;
4942
        min_write_delay = 2000;
4943
        max_write_delay = 2000;
4944
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
4945
                          "x x x x  x x x x   o o x x  o o o o";
4946
 
4947
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
4948
                          "x x x x  x x x x   i i 1 1  i i i i";
4949
      ;
4950
 
4951
    memory "hfuse"
4952
        size            = 1;
4953
        min_write_delay = 2000;
4954
        max_write_delay = 2000;
4955
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
4956
                          "x x x x  x x x x   x x x x  1 o o o";
4957
 
4958
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
4959
                          "x x x x  x x x x   1 1 1 1  1 i i i";
4960
      ;
4961
 
4962
    memory "lock"
4963
        size            = 1;
4964
        min_write_delay = 2000;
4965
        max_write_delay = 2000;
4966
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
4967
                          "x x x x  0 x x x   x x o o  o o o o";
4968
 
4969
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
4970
                          "x x x x  x x x x   1 1 i i  i i i i";
4971
      ;
4972
 
4973
    memory "signature"
4974
        size            = 3;
4975
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
4976
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
4977
      ;
4978
 
4979
    memory "calibration"
4980
        size            = 1;
4981
        read            = "0 0 1 1  1 0 0 0   x x x x  x x x x",
4982
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
4983
      ;
4984
  ;
4985
 
4986
#------------------------------------------------------------
4987
# ATmega169
4988
#------------------------------------------------------------
4989
 
4990
part
4991
    id               = "m169";
4992
    desc             = "ATMEGA169";
4993
    has_jtag         = yes;
4994
    stk500_devcode   = 0x85;
4995
    avr910_devcode   = 0x78;
4996
    signature        = 0x1e 0x94 0x05;
4997
    chip_erase_delay = 9000;
4998
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
4999
                       "x x x x  x x x x    x x x x  x x x x";
5000
 
5001
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
5002
                       "x x x x  x x x x    x x x x  x x x x";
5003
    timeout		= 200;
5004
    stabdelay		= 100;
5005
    cmdexedelay		= 25;
5006
    synchloops		= 32;
5007
    bytedelay		= 0;
5008
    pollindex		= 3;
5009
    pollvalue		= 0x53;
5010
    predelay		= 1;
5011
    postdelay		= 1;
5012
    pollmethod		= 1;
5013
 
5014
    pp_controlstack     =
5015
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
5016
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
5017
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
5018
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
5019
    hventerstabdelay    = 100;
5020
    progmodedelay       = 0;
5021
    latchcycles         = 5;
5022
    togglevtg           = 1;
5023
    poweroffdelay       = 15;
5024
    resetdelayms        = 1;
5025
    resetdelayus        = 0;
5026
    hvleavestabdelay    = 15;
5027
    chiperasepulsewidth = 0;
5028
    chiperasepolltimeout = 10;
5029
    programfusepulsewidth = 0;
5030
    programfusepolltimeout = 5;
5031
    programlockpulsewidth = 0;
5032
    programlockpolltimeout = 5;
5033
 
5034
    idr                 = 0x31;
5035
    spmcr               = 0x57;
5036
 
5037
   memory "eeprom"
5038
        paged           = no; /* leave this "no" */
5039
        page_size       = 4;  /* for parallel programming */
5040
        size            = 512;
5041
        min_write_delay = 9000;
5042
        max_write_delay = 9000;
5043
        readback_p1     = 0xff;
5044
        readback_p2     = 0xff;
5045
	read            = "  1   0   1   0      0   0   0   0",
5046
                          "  x   x   x   x      x   x   x  a8",
5047
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5048
                          "  o   o   o   o      o   o   o   o";
5049
 
5050
	write           = "  1   1   0   0      0   0   0   0",
5051
                          "  x   x   x   x      x   x   x  a8",
5052
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5053
                          "  i   i   i   i      i   i   i   i";
5054
 
5055
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
5056
			  "  0   0   0   0      0   0   0   0",
5057
			  "  0   0   0   0      0   0  a1  a0",
5058
			  "  i   i   i   i      i   i   i   i";
5059
 
5060
	writepage	= "  1   1   0   0      0   0   1   0",
5061
			  "  0   0   x   x      x   x   x  a8",
5062
			  " a7  a6  a5  a4     a3  a2   0   0",
5063
			  "  x   x   x   x      x   x   x   x";
5064
 
5065
	mode		= 0x41;
5066
	delay		= 20;
5067
	blocksize	= 4;
5068
	readsize	= 256;
5069
      ;
5070
 
5071
    memory "flash"
5072
        paged           = yes;
5073
        size            = 16384;
5074
        page_size       = 128;
5075
        num_pages       = 128;
5076
        min_write_delay = 4500;
5077
        max_write_delay = 4500;
5078
        readback_p1     = 0xff;
5079
        readback_p2     = 0xff;
5080
        read_lo         = "  0   0   1   0      0   0   0   0",
5081
                          "  x   x   x a12    a11 a10  a9  a8",
5082
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5083
                          "  o   o   o   o      o   o   o   o";
5084
 
5085
        read_hi         = "  0   0   1   0      1   0   0   0",
5086
                          "  x   x   x a12    a11 a10  a9  a8",
5087
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5088
                          "  o   o   o   o      o   o   o   o";
5089
 
5090
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
5091
                          "  x   x   x   x      x   x   x   x",
5092
                          "  x   x  a5  a4     a3  a2  a1  a0",
5093
                          "  i   i   i   i      i   i   i   i";
5094
 
5095
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
5096
                          "  x   x   x   x      x   x   x   x",
5097
                          "  x   x  a5  a4     a3  a2  a1  a0",
5098
                          "  i   i   i   i      i   i   i   i";
5099
 
5100
        writepage       = "  0   1   0   0      1   1   0   0",
5101
                          "  x   x   x a12    a11 a10  a9  a8",
5102
                          " a7  a6   x   x      x   x   x   x",
5103
                          "  x   x   x   x      x   x   x   x";
5104
 
5105
	mode		= 0x41;
5106
	delay		= 6;
5107
	blocksize	= 128;
5108
	readsize	= 256;
5109
      ;
5110
 
5111
    memory "lfuse"
5112
        size            = 1;
5113
        min_write_delay = 2000;
5114
        max_write_delay = 2000;
5115
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
5116
                          "x x x x  x x x x   o o o o  o o o o";
5117
 
5118
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
5119
                          "x x x x  x x x x   i i i i  i i i i";
5120
      ;
5121
 
5122
    memory "hfuse"
5123
        size            = 1;
5124
        min_write_delay = 2000;
5125
        max_write_delay = 2000;
5126
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
5127
                          "x x x x  x x x x   o o o o  o o o o";
5128
 
5129
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
5130
                          "x x x x  x x x x   i i i i  i i i i";
5131
      ;
5132
 
5133
    memory "efuse"
5134
        size            = 1;
5135
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
5136
                          "x x x x  x x x x  x x x x  i i i i";
5137
 
5138
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
5139
                          "x x x x  x x x x  o o o o  o o o o";
5140
      ;
5141
 
5142
    memory "lock"
5143
        size            = 1;
5144
        min_write_delay = 2000;
5145
        max_write_delay = 2000;
5146
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
5147
                          "x x x x  x x x x   x x o o  o o o o";
5148
 
5149
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
5150
                          "x x x x  x x x x   1 1 i i  i i i i";
5151
      ;
5152
 
5153
    memory "signature"
5154
        size            = 3;
5155
        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
5156
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
5157
      ;
5158
 
5159
    memory "calibration"
5160
        size            = 1;
5161
        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
5162
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
5163
      ;
5164
  ;
5165
 
5166
#------------------------------------------------------------
5167
# ATmega329
5168
#------------------------------------------------------------
5169
 
5170
part
5171
    id               = "m329";
5172
    desc             = "ATMEGA329";
5173
    has_jtag         = yes;
5174
#    stk500_devcode   = 0x85; # no STK500 support, only STK500v2
5175
#    avr910_devcode   = 0x?;  # try the ATmega169 one:
5176
    avr910_devcode   = 0x75;
5177
    signature        = 0x1e 0x95 0x03;
5178
    chip_erase_delay = 9000;
5179
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
5180
                       "x x x x  x x x x    x x x x  x x x x";
5181
 
5182
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
5183
                       "x x x x  x x x x    x x x x  x x x x";
5184
    timeout		= 200;
5185
    stabdelay		= 100;
5186
    cmdexedelay		= 25;
5187
    synchloops		= 32;
5188
    bytedelay		= 0;
5189
    pollindex		= 3;
5190
    pollvalue		= 0x53;
5191
    predelay		= 1;
5192
    postdelay		= 1;
5193
    pollmethod		= 1;
5194
 
5195
    pp_controlstack     =
5196
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
5197
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
5198
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
5199
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
5200
    hventerstabdelay    = 100;
5201
    progmodedelay       = 0;
5202
    latchcycles         = 5;
5203
    togglevtg           = 1;
5204
    poweroffdelay       = 15;
5205
    resetdelayms        = 1;
5206
    resetdelayus        = 0;
5207
    hvleavestabdelay    = 15;
5208
    chiperasepulsewidth = 0;
5209
    chiperasepolltimeout = 10;
5210
    programfusepulsewidth = 0;
5211
    programfusepolltimeout = 5;
5212
    programlockpulsewidth = 0;
5213
    programlockpolltimeout = 5;
5214
 
5215
    idr                 = 0x31;
5216
    spmcr               = 0x57;
5217
 
5218
   memory "eeprom"
5219
        paged           = no; /* leave this "no" */
5220
        page_size       = 4;  /* for parallel programming */
5221
        size            = 1024;
5222
        min_write_delay = 9000;
5223
        max_write_delay = 9000;
5224
        readback_p1     = 0xff;
5225
        readback_p2     = 0xff;
5226
	read            = "  1   0   1   0      0   0   0   0",
5227
                          "  x   x   x   x      x   x  a9  a8",
5228
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5229
                          "  o   o   o   o      o   o   o   o";
5230
 
5231
	write           = "  1   1   0   0      0   0   0   0",
5232
                          "  x   x   x   x      x   x  a9  a8",
5233
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5234
                          "  i   i   i   i      i   i   i   i";
5235
 
5236
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
5237
			  "  0   0   0   0      0   0   0   0",
5238
			  "  0   0   0   0      0   0  a1  a0",
5239
			  "  i   i   i   i      i   i   i   i";
5240
 
5241
	writepage	= "  1   1   0   0      0   0   1   0",
5242
			  "  0   0   x   x      x   x  a9  a8",
5243
			  " a7  a6  a5  a4     a3  a2   0   0",
5244
			  "  x   x   x   x      x   x   x   x";
5245
 
5246
	mode		= 0x41;
5247
	delay		= 20;
5248
	blocksize	= 8;
5249
	readsize	= 256;
5250
      ;
5251
 
5252
    memory "flash"
5253
        paged           = yes;
5254
        size            = 32768;
5255
        page_size       = 128;
5256
        num_pages       = 256;
5257
        min_write_delay = 4500;
5258
        max_write_delay = 4500;
5259
        readback_p1     = 0xff;
5260
        readback_p2     = 0xff;
5261
        read_lo         = "  0   0   1   0      0   0   0   0",
5262
                          "  x a14 a13 a12    a11 a10  a9  a8",
5263
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5264
                          "  o   o   o   o      o   o   o   o";
5265
 
5266
        read_hi         = "  0   0   1   0      1   0   0   0",
5267
                          "  x a14 a13 a12    a11 a10  a9  a8",
5268
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5269
                          "  o   o   o   o      o   o   o   o";
5270
 
5271
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
5272
                          "  x   x   x   x      x   x   x   x",
5273
                          "  x   x  a5  a4     a3  a2  a1  a0",
5274
                          "  i   i   i   i      i   i   i   i";
5275
 
5276
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
5277
                          "  x   x   x   x      x   x   x   x",
5278
                          "  x   x  a5  a4     a3  a2  a1  a0",
5279
                          "  i   i   i   i      i   i   i   i";
5280
 
5281
        writepage       = "  0   1   0   0      1   1   0   0",
5282
                          "  x   x   x a12    a11 a10  a9  a8",
5283
                          " a7  a6   x   x      x   x   x   x",
5284
                          "  x   x   x   x      x   x   x   x";
5285
 
5286
	mode		= 0x41;
5287
	delay		= 6;
5288
	blocksize	= 256;
5289
	readsize	= 256;
5290
      ;
5291
 
5292
    memory "lfuse"
5293
        size            = 1;
5294
        min_write_delay = 4500;
5295
        max_write_delay = 4500;
5296
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
5297
                          "x x x x  x x x x   o o o o  o o o o";
5298
 
5299
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
5300
                          "x x x x  x x x x   i i i i  i i i i";
5301
      ;
5302
 
5303
    memory "hfuse"
5304
        size            = 1;
5305
        min_write_delay = 4500;
5306
        max_write_delay = 4500;
5307
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
5308
                          "x x x x  x x x x   o o o o  o o o o";
5309
 
5310
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
5311
                          "x x x x  x x x x   i i i i  i i i i";
5312
      ;
5313
 
5314
    memory "efuse"
5315
        size            = 1;
5316
        min_write_delay = 4500;
5317
        max_write_delay = 4500;
5318
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
5319
                          "x x x x  x x x x   o o o o  o o o o";
5320
 
5321
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
5322
                          "x x x x  x x x x   x x x x  x i i i";
5323
      ;
5324
 
5325
    memory "lock"
5326
        size            = 1;
5327
        min_write_delay = 4500;
5328
        max_write_delay = 4500;
5329
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
5330
                          "x x x x  x x x x   x x o o  o o o o";
5331
 
5332
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
5333
                          "x x x x  x x x x   1 1 i i  i i i i";
5334
      ;
5335
 
5336
    memory "signature"
5337
        size            = 3;
5338
        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
5339
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
5340
      ;
5341
 
5342
    memory "calibration"
5343
        size            = 1;
5344
        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
5345
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
5346
      ;
5347
  ;
5348
 
5349
#------------------------------------------------------------
5350
# ATmega329P
5351
#------------------------------------------------------------
5352
# Identical to ATmega329 except of the signature
5353
 
5354
part
5355
    id               = "m329p";
5356
    desc             = "ATMEGA329P";
5357
    has_jtag         = yes;
5358
#    stk500_devcode   = 0x85; # no STK500 support, only STK500v2
5359
#    avr910_devcode   = 0x?;  # try the ATmega169 one:
5360
    avr910_devcode   = 0x75;
5361
    signature        = 0x1e 0x95 0x0b;
5362
    chip_erase_delay = 9000;
5363
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
5364
                       "x x x x  x x x x    x x x x  x x x x";
5365
 
5366
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
5367
                       "x x x x  x x x x    x x x x  x x x x";
5368
    timeout		= 200;
5369
    stabdelay		= 100;
5370
    cmdexedelay		= 25;
5371
    synchloops		= 32;
5372
    bytedelay		= 0;
5373
    pollindex		= 3;
5374
    pollvalue		= 0x53;
5375
    predelay		= 1;
5376
    postdelay		= 1;
5377
    pollmethod		= 1;
5378
 
5379
    pp_controlstack     =
5380
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
5381
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
5382
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
5383
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
5384
    hventerstabdelay    = 100;
5385
    progmodedelay       = 0;
5386
    latchcycles         = 5;
5387
    togglevtg           = 1;
5388
    poweroffdelay       = 15;
5389
    resetdelayms        = 1;
5390
    resetdelayus        = 0;
5391
    hvleavestabdelay    = 15;
5392
    chiperasepulsewidth = 0;
5393
    chiperasepolltimeout = 10;
5394
    programfusepulsewidth = 0;
5395
    programfusepolltimeout = 5;
5396
    programlockpulsewidth = 0;
5397
    programlockpolltimeout = 5;
5398
 
5399
    idr                 = 0x31;
5400
    spmcr               = 0x57;
5401
 
5402
   memory "eeprom"
5403
        paged           = no; /* leave this "no" */
5404
        page_size       = 4;  /* for parallel programming */
5405
        size            = 1024;
5406
        min_write_delay = 9000;
5407
        max_write_delay = 9000;
5408
        readback_p1     = 0xff;
5409
        readback_p2     = 0xff;
5410
	read            = "  1   0   1   0      0   0   0   0",
5411
                          "  x   x   x   x      x   x  a9  a8",
5412
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5413
                          "  o   o   o   o      o   o   o   o";
5414
 
5415
	write           = "  1   1   0   0      0   0   0   0",
5416
                          "  x   x   x   x      x   x  a9  a8",
5417
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5418
                          "  i   i   i   i      i   i   i   i";
5419
 
5420
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
5421
			  "  0   0   0   0      0   0   0   0",
5422
			  "  0   0   0   0      0   0  a1  a0",
5423
			  "  i   i   i   i      i   i   i   i";
5424
 
5425
	writepage	= "  1   1   0   0      0   0   1   0",
5426
			  "  0   0   x   x      x   x  a9  a8",
5427
			  " a7  a6  a5  a4     a3  a2   0   0",
5428
			  "  x   x   x   x      x   x   x   x";
5429
 
5430
	mode		= 0x41;
5431
	delay		= 20;
5432
	blocksize	= 8;
5433
	readsize	= 256;
5434
      ;
5435
 
5436
    memory "flash"
5437
        paged           = yes;
5438
        size            = 32768;
5439
        page_size       = 128;
5440
        num_pages       = 256;
5441
        min_write_delay = 4500;
5442
        max_write_delay = 4500;
5443
        readback_p1     = 0xff;
5444
        readback_p2     = 0xff;
5445
        read_lo         = "  0   0   1   0      0   0   0   0",
5446
                          "  x a14 a13 a12    a11 a10  a9  a8",
5447
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5448
                          "  o   o   o   o      o   o   o   o";
5449
 
5450
        read_hi         = "  0   0   1   0      1   0   0   0",
5451
                          "  x a14 a13 a12    a11 a10  a9  a8",
5452
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5453
                          "  o   o   o   o      o   o   o   o";
5454
 
5455
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
5456
                          "  x   x   x   x      x   x   x   x",
5457
                          "  x   x  a5  a4     a3  a2  a1  a0",
5458
                          "  i   i   i   i      i   i   i   i";
5459
 
5460
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
5461
                          "  x   x   x   x      x   x   x   x",
5462
                          "  x   x  a5  a4     a3  a2  a1  a0",
5463
                          "  i   i   i   i      i   i   i   i";
5464
 
5465
        writepage       = "  0   1   0   0      1   1   0   0",
5466
                          "  x   x   x a12    a11 a10  a9  a8",
5467
                          " a7  a6   x   x      x   x   x   x",
5468
                          "  x   x   x   x      x   x   x   x";
5469
 
5470
	mode		= 0x41;
5471
	delay		= 6;
5472
	blocksize	= 256;
5473
	readsize	= 256;
5474
      ;
5475
 
5476
    memory "lfuse"
5477
        size            = 1;
5478
        min_write_delay = 4500;
5479
        max_write_delay = 4500;
5480
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
5481
                          "x x x x  x x x x   o o o o  o o o o";
5482
 
5483
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
5484
                          "x x x x  x x x x   i i i i  i i i i";
5485
      ;
5486
 
5487
    memory "hfuse"
5488
        size            = 1;
5489
        min_write_delay = 4500;
5490
        max_write_delay = 4500;
5491
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
5492
                          "x x x x  x x x x   o o o o  o o o o";
5493
 
5494
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
5495
                          "x x x x  x x x x   i i i i  i i i i";
5496
      ;
5497
 
5498
    memory "efuse"
5499
        size            = 1;
5500
        min_write_delay = 4500;
5501
        max_write_delay = 4500;
5502
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
5503
                          "x x x x  x x x x   o o o o  o o o o";
5504
 
5505
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
5506
                          "x x x x  x x x x   x x x x  x i i i";
5507
      ;
5508
 
5509
    memory "lock"
5510
        size            = 1;
5511
        min_write_delay = 4500;
5512
        max_write_delay = 4500;
5513
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
5514
                          "x x x x  x x x x   x x o o  o o o o";
5515
 
5516
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
5517
                          "x x x x  x x x x   1 1 i i  i i i i";
5518
      ;
5519
 
5520
    memory "signature"
5521
        size            = 3;
5522
        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
5523
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
5524
      ;
5525
 
5526
    memory "calibration"
5527
        size            = 1;
5528
        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
5529
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
5530
      ;
5531
  ;
5532
 
5533
#------------------------------------------------------------
5534
# ATmega3290
5535
#------------------------------------------------------------
5536
 
5537
# identical to ATmega329
5538
 
5539
part
5540
    id               = "m3290";
5541
    desc             = "ATMEGA3290";
5542
    has_jtag         = yes;
5543
#    stk500_devcode   = 0x85; # no STK500 support, only STK500v2
5544
#    avr910_devcode   = 0x?;  # try the ATmega169 one:
5545
    avr910_devcode   = 0x75;
5546
    signature        = 0x1e 0x95 0x04;
5547
    chip_erase_delay = 9000;
5548
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
5549
                       "x x x x  x x x x    x x x x  x x x x";
5550
 
5551
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
5552
                       "x x x x  x x x x    x x x x  x x x x";
5553
    timeout		= 200;
5554
    stabdelay		= 100;
5555
    cmdexedelay		= 25;
5556
    synchloops		= 32;
5557
    bytedelay		= 0;
5558
    pollindex		= 3;
5559
    pollvalue		= 0x53;
5560
    predelay		= 1;
5561
    postdelay		= 1;
5562
    pollmethod		= 1;
5563
 
5564
    pp_controlstack     =
5565
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
5566
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
5567
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
5568
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
5569
    hventerstabdelay    = 100;
5570
    progmodedelay       = 0;
5571
    latchcycles         = 5;
5572
    togglevtg           = 1;
5573
    poweroffdelay       = 15;
5574
    resetdelayms        = 1;
5575
    resetdelayus        = 0;
5576
    hvleavestabdelay    = 15;
5577
    chiperasepulsewidth = 0;
5578
    chiperasepolltimeout = 10;
5579
    programfusepulsewidth = 0;
5580
    programfusepolltimeout = 5;
5581
    programlockpulsewidth = 0;
5582
    programlockpolltimeout = 5;
5583
 
5584
    idr                 = 0x31;
5585
    spmcr               = 0x57;
5586
 
5587
   memory "eeprom"
5588
        paged           = no; /* leave this "no" */
5589
        page_size       = 4;  /* for parallel programming */
5590
        size            = 1024;
5591
        min_write_delay = 9000;
5592
        max_write_delay = 9000;
5593
        readback_p1     = 0xff;
5594
        readback_p2     = 0xff;
5595
	read            = "  1   0   1   0      0   0   0   0",
5596
                          "  x   x   x   x      x   x  a9  a8",
5597
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5598
                          "  o   o   o   o      o   o   o   o";
5599
 
5600
	write           = "  1   1   0   0      0   0   0   0",
5601
                          "  x   x   x   x      x   x  a9  a8",
5602
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5603
                          "  i   i   i   i      i   i   i   i";
5604
 
5605
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
5606
			  "  0   0   0   0      0   0   0   0",
5607
			  "  0   0   0   0      0   0  a1  a0",
5608
			  "  i   i   i   i      i   i   i   i";
5609
 
5610
	writepage	= "  1   1   0   0      0   0   1   0",
5611
			  "  0   0   x   x      x   x  a9  a8",
5612
			  " a7  a6  a5  a4     a3  a3   0   0",
5613
			  "  x   x   x   x      x   x   x   x";
5614
 
5615
	mode		= 0x41;
5616
	delay		= 20;
5617
	blocksize	= 8;
5618
	readsize	= 256;
5619
      ;
5620
 
5621
    memory "flash"
5622
        paged           = yes;
5623
        size            = 32768;
5624
        page_size       = 128;
5625
        num_pages       = 256;
5626
        min_write_delay = 4500;
5627
        max_write_delay = 4500;
5628
        readback_p1     = 0xff;
5629
        readback_p2     = 0xff;
5630
        read_lo         = "  0   0   1   0      0   0   0   0",
5631
                          "  x a14 a13 a12    a11 a10  a9  a8",
5632
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5633
                          "  o   o   o   o      o   o   o   o";
5634
 
5635
        read_hi         = "  0   0   1   0      1   0   0   0",
5636
                          "  x a14 a13 a12    a11 a10  a9  a8",
5637
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5638
                          "  o   o   o   o      o   o   o   o";
5639
 
5640
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
5641
                          "  x   x   x   x      x   x   x   x",
5642
                          "  x   x  a5  a4     a3  a2  a1  a0",
5643
                          "  i   i   i   i      i   i   i   i";
5644
 
5645
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
5646
                          "  x   x   x   x      x   x   x   x",
5647
                          "  x   x  a5  a4     a3  a2  a1  a0",
5648
                          "  i   i   i   i      i   i   i   i";
5649
 
5650
        writepage       = "  0   1   0   0      1   1   0   0",
5651
                          "  x   x   x a12    a11 a10  a9  a8",
5652
                          " a7  a6   x   x      x   x   x   x",
5653
                          "  x   x   x   x      x   x   x   x";
5654
 
5655
	mode		= 0x41;
5656
	delay		= 6;
5657
	blocksize	= 256;
5658
	readsize	= 256;
5659
      ;
5660
 
5661
    memory "lfuse"
5662
        size            = 1;
5663
        min_write_delay = 4500;
5664
        max_write_delay = 4500;
5665
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
5666
                          "x x x x  x x x x   o o o o  o o o o";
5667
 
5668
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
5669
                          "x x x x  x x x x   i i i i  i i i i";
5670
      ;
5671
 
5672
    memory "hfuse"
5673
        size            = 1;
5674
        min_write_delay = 4500;
5675
        max_write_delay = 4500;
5676
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
5677
                          "x x x x  x x x x   o o o o  o o o o";
5678
 
5679
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
5680
                          "x x x x  x x x x   i i i i  i i i i";
5681
      ;
5682
 
5683
    memory "efuse"
5684
        size            = 1;
5685
        min_write_delay = 4500;
5686
        max_write_delay = 4500;
5687
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
5688
                          "x x x x  x x x x   o o o o  o o o o";
5689
 
5690
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
5691
                          "x x x x  x x x x   x x x x  x i i i";
5692
      ;
5693
 
5694
    memory "lock"
5695
        size            = 1;
5696
        min_write_delay = 4500;
5697
        max_write_delay = 4500;
5698
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
5699
                          "x x x x  x x x x   x x o o  o o o o";
5700
 
5701
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
5702
                          "x x x x  x x x x   1 1 i i  i i i i";
5703
      ;
5704
 
5705
    memory "signature"
5706
        size            = 3;
5707
        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
5708
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
5709
      ;
5710
 
5711
    memory "calibration"
5712
        size            = 1;
5713
        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
5714
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
5715
      ;
5716
  ;
5717
 
5718
#------------------------------------------------------------
5719
# ATmega3290P
5720
#------------------------------------------------------------
5721
 
5722
# identical to ATmega3290 except of the signature
5723
 
5724
part
5725
    id               = "m3290p";
5726
    desc             = "ATMEGA3290P";
5727
    has_jtag         = yes;
5728
#    stk500_devcode   = 0x85; # no STK500 support, only STK500v2
5729
#    avr910_devcode   = 0x?;  # try the ATmega169 one:
5730
    avr910_devcode   = 0x75;
5731
    signature        = 0x1e 0x95 0x0c;
5732
    chip_erase_delay = 9000;
5733
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
5734
                       "x x x x  x x x x    x x x x  x x x x";
5735
 
5736
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
5737
                       "x x x x  x x x x    x x x x  x x x x";
5738
    timeout		= 200;
5739
    stabdelay		= 100;
5740
    cmdexedelay		= 25;
5741
    synchloops		= 32;
5742
    bytedelay		= 0;
5743
    pollindex		= 3;
5744
    pollvalue		= 0x53;
5745
    predelay		= 1;
5746
    postdelay		= 1;
5747
    pollmethod		= 1;
5748
 
5749
    pp_controlstack     =
5750
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
5751
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
5752
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
5753
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
5754
    hventerstabdelay    = 100;
5755
    progmodedelay       = 0;
5756
    latchcycles         = 5;
5757
    togglevtg           = 1;
5758
    poweroffdelay       = 15;
5759
    resetdelayms        = 1;
5760
    resetdelayus        = 0;
5761
    hvleavestabdelay    = 15;
5762
    chiperasepulsewidth = 0;
5763
    chiperasepolltimeout = 10;
5764
    programfusepulsewidth = 0;
5765
    programfusepolltimeout = 5;
5766
    programlockpulsewidth = 0;
5767
    programlockpolltimeout = 5;
5768
 
5769
    idr                 = 0x31;
5770
    spmcr               = 0x57;
5771
 
5772
   memory "eeprom"
5773
        paged           = no; /* leave this "no" */
5774
        page_size       = 4;  /* for parallel programming */
5775
        size            = 1024;
5776
        min_write_delay = 9000;
5777
        max_write_delay = 9000;
5778
        readback_p1     = 0xff;
5779
        readback_p2     = 0xff;
5780
	read            = "  1   0   1   0      0   0   0   0",
5781
                          "  x   x   x   x      x   x  a9  a8",
5782
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5783
                          "  o   o   o   o      o   o   o   o";
5784
 
5785
	write           = "  1   1   0   0      0   0   0   0",
5786
                          "  x   x   x   x      x   x  a9  a8",
5787
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5788
                          "  i   i   i   i      i   i   i   i";
5789
 
5790
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
5791
			  "  0   0   0   0      0   0   0   0",
5792
			  "  0   0   0   0      0   0  a1  a0",
5793
			  "  i   i   i   i      i   i   i   i";
5794
 
5795
	writepage	= "  1   1   0   0      0   0   1   0",
5796
			  "  0   0   x   x      x   x  a9  a8",
5797
			  " a7  a6  a5  a4     a3  a3   0   0",
5798
			  "  x   x   x   x      x   x   x   x";
5799
 
5800
	mode		= 0x41;
5801
	delay		= 20;
5802
	blocksize	= 8;
5803
	readsize	= 256;
5804
      ;
5805
 
5806
    memory "flash"
5807
        paged           = yes;
5808
        size            = 32768;
5809
        page_size       = 128;
5810
        num_pages       = 256;
5811
        min_write_delay = 4500;
5812
        max_write_delay = 4500;
5813
        readback_p1     = 0xff;
5814
        readback_p2     = 0xff;
5815
        read_lo         = "  0   0   1   0      0   0   0   0",
5816
                          "  x a14 a13 a12    a11 a10  a9  a8",
5817
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5818
                          "  o   o   o   o      o   o   o   o";
5819
 
5820
        read_hi         = "  0   0   1   0      1   0   0   0",
5821
                          "  x a14 a13 a12    a11 a10  a9  a8",
5822
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5823
                          "  o   o   o   o      o   o   o   o";
5824
 
5825
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
5826
                          "  x   x   x   x      x   x   x   x",
5827
                          "  x   x  a5  a4     a3  a2  a1  a0",
5828
                          "  i   i   i   i      i   i   i   i";
5829
 
5830
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
5831
                          "  x   x   x   x      x   x   x   x",
5832
                          "  x   x  a5  a4     a3  a2  a1  a0",
5833
                          "  i   i   i   i      i   i   i   i";
5834
 
5835
        writepage       = "  0   1   0   0      1   1   0   0",
5836
                          "  x   x   x a12    a11 a10  a9  a8",
5837
                          " a7  a6   x   x      x   x   x   x",
5838
                          "  x   x   x   x      x   x   x   x";
5839
 
5840
	mode		= 0x41;
5841
	delay		= 6;
5842
	blocksize	= 256;
5843
	readsize	= 256;
5844
      ;
5845
 
5846
    memory "lfuse"
5847
        size            = 1;
5848
        min_write_delay = 4500;
5849
        max_write_delay = 4500;
5850
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
5851
                          "x x x x  x x x x   o o o o  o o o o";
5852
 
5853
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
5854
                          "x x x x  x x x x   i i i i  i i i i";
5855
      ;
5856
 
5857
    memory "hfuse"
5858
        size            = 1;
5859
        min_write_delay = 4500;
5860
        max_write_delay = 4500;
5861
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
5862
                          "x x x x  x x x x   o o o o  o o o o";
5863
 
5864
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
5865
                          "x x x x  x x x x   i i i i  i i i i";
5866
      ;
5867
 
5868
    memory "efuse"
5869
        size            = 1;
5870
        min_write_delay = 4500;
5871
        max_write_delay = 4500;
5872
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
5873
                          "x x x x  x x x x   o o o o  o o o o";
5874
 
5875
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
5876
                          "x x x x  x x x x   x x x x  x i i i";
5877
      ;
5878
 
5879
    memory "lock"
5880
        size            = 1;
5881
        min_write_delay = 4500;
5882
        max_write_delay = 4500;
5883
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
5884
                          "x x x x  x x x x   x x o o  o o o o";
5885
 
5886
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
5887
                          "x x x x  x x x x   1 1 i i  i i i i";
5888
      ;
5889
 
5890
    memory "signature"
5891
        size            = 3;
5892
        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
5893
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
5894
      ;
5895
 
5896
    memory "calibration"
5897
        size            = 1;
5898
        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
5899
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
5900
      ;
5901
  ;
5902
 
5903
#------------------------------------------------------------
5904
# ATmega649
5905
#------------------------------------------------------------
5906
 
5907
part
5908
    id               = "m649";
5909
    desc             = "ATMEGA649";
5910
    has_jtag         = yes;
5911
#    stk500_devcode   = 0x85; # no STK500 support, only STK500v2
5912
#    avr910_devcode   = 0x?;  # try the ATmega169 one:
5913
    avr910_devcode   = 0x75;
5914
    signature        = 0x1e 0x96 0x03;
5915
    chip_erase_delay = 9000;
5916
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
5917
                       "x x x x  x x x x    x x x x  x x x x";
5918
 
5919
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
5920
                       "x x x x  x x x x    x x x x  x x x x";
5921
    timeout		= 200;
5922
    stabdelay		= 100;
5923
    cmdexedelay		= 25;
5924
    synchloops		= 32;
5925
    bytedelay		= 0;
5926
    pollindex		= 3;
5927
    pollvalue		= 0x53;
5928
    predelay		= 1;
5929
    postdelay		= 1;
5930
    pollmethod		= 1;
5931
 
5932
    pp_controlstack     =
5933
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
5934
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
5935
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
5936
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
5937
    hventerstabdelay    = 100;
5938
    progmodedelay       = 0;
5939
    latchcycles         = 5;
5940
    togglevtg           = 1;
5941
    poweroffdelay       = 15;
5942
    resetdelayms        = 1;
5943
    resetdelayus        = 0;
5944
    hvleavestabdelay    = 15;
5945
    chiperasepulsewidth = 0;
5946
    chiperasepolltimeout = 10;
5947
    programfusepulsewidth = 0;
5948
    programfusepolltimeout = 5;
5949
    programlockpulsewidth = 0;
5950
    programlockpolltimeout = 5;
5951
 
5952
    idr                 = 0x31;
5953
    spmcr               = 0x57;
5954
 
5955
   memory "eeprom"
5956
        paged           = no; /* leave this "no" */
5957
        page_size       = 8;  /* for parallel programming */
5958
        size            = 2048;
5959
        min_write_delay = 9000;
5960
        max_write_delay = 9000;
5961
        readback_p1     = 0xff;
5962
        readback_p2     = 0xff;
5963
	read            = "  1   0   1   0      0   0   0   0",
5964
                          "  x   x   x   x      x a10  a9  a8",
5965
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5966
                          "  o   o   o   o      o   o   o   o";
5967
 
5968
	write           = "  1   1   0   0      0   0   0   0",
5969
                          "  x   x   x   x      x a10  a9  a8",
5970
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5971
                          "  i   i   i   i      i   i   i   i";
5972
 
5973
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
5974
			  "  0   0   0   0      0   0   0   0",
5975
			  "  0   0   0   0      0  a2  a1  a0",
5976
			  "  i   i   i   i      i   i   i   i";
5977
 
5978
	writepage	= "  1   1   0   0      0   0   1   0",
5979
			  "  0   0   x   x      x a10  a9  a8",
5980
			  " a7  a6  a5  a4     a3   0   0   0",
5981
			  "  x   x   x   x      x   x   x   x";
5982
 
5983
	mode		= 0x41;
5984
	delay		= 20;
5985
	blocksize	= 8;
5986
	readsize	= 256;
5987
      ;
5988
 
5989
    memory "flash"
5990
        paged           = yes;
5991
        size            = 65536;
5992
        page_size       = 256;
5993
        num_pages       = 256;
5994
        min_write_delay = 4500;
5995
        max_write_delay = 4500;
5996
        readback_p1     = 0xff;
5997
        readback_p2     = 0xff;
5998
        read_lo         = "  0   0   1   0      0   0   0   0",
5999
                          "a15 a14 a13 a12    a11 a10  a9  a8",
6000
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6001
                          "  o   o   o   o      o   o   o   o";
6002
 
6003
        read_hi         = "  0   0   1   0      1   0   0   0",
6004
                          "a15 a14 a13 a12    a11 a10  a9  a8",
6005
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6006
                          "  o   o   o   o      o   o   o   o";
6007
 
6008
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
6009
                          "  x   x   x   x      x   x   x   x",
6010
                          "  x  a6  a5  a4     a3  a2  a1  a0",
6011
                          "  i   i   i   i      i   i   i   i";
6012
 
6013
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
6014
                          "  x   x   x   x      x   x   x   x",
6015
                          "  x  a6  a5  a4     a3  a2  a1  a0",
6016
                          "  i   i   i   i      i   i   i   i";
6017
 
6018
        writepage       = "  0   1   0   0      1   1   0   0",
6019
                          "  x   x   x a12    a11 a10  a9  a8",
6020
                          " a7   x   x   x      x   x   x   x",
6021
                          "  x   x   x   x      x   x   x   x";
6022
 
6023
	mode		= 0x41;
6024
	delay		= 6;
6025
	blocksize	= 256;
6026
	readsize	= 256;
6027
      ;
6028
 
6029
    memory "lfuse"
6030
        size            = 1;
6031
        min_write_delay = 4500;
6032
        max_write_delay = 4500;
6033
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
6034
                          "x x x x  x x x x   o o o o  o o o o";
6035
 
6036
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
6037
                          "x x x x  x x x x   i i i i  i i i i";
6038
      ;
6039
 
6040
    memory "hfuse"
6041
        size            = 1;
6042
        min_write_delay = 4500;
6043
        max_write_delay = 4500;
6044
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
6045
                          "x x x x  x x x x   o o o o  o o o o";
6046
 
6047
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
6048
                          "x x x x  x x x x   i i i i  i i i i";
6049
      ;
6050
 
6051
    memory "efuse"
6052
        size            = 1;
6053
        min_write_delay = 4500;
6054
        max_write_delay = 4500;
6055
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
6056
                          "x x x x  x x x x   o o o o  o o o o";
6057
 
6058
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
6059
                          "x x x x  x x x x   x x x x  x i i i";
6060
      ;
6061
 
6062
    memory "lock"
6063
        size            = 1;
6064
        min_write_delay = 4500;
6065
        max_write_delay = 4500;
6066
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
6067
                          "x x x x  x x x x   x x o o  o o o o";
6068
 
6069
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
6070
                          "x x x x  x x x x   1 1 i i  i i i i";
6071
      ;
6072
 
6073
    memory "signature"
6074
        size            = 3;
6075
        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
6076
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
6077
      ;
6078
 
6079
    memory "calibration"
6080
        size            = 1;
6081
        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
6082
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
6083
      ;
6084
  ;
6085
 
6086
#------------------------------------------------------------
6087
# ATmega6490
6088
#------------------------------------------------------------
6089
 
6090
# identical to ATmega649
6091
 
6092
part
6093
    id               = "m6490";
6094
    desc             = "ATMEGA6490";
6095
    has_jtag         = yes;
6096
#    stk500_devcode   = 0x85; # no STK500 support, only STK500v2
6097
#    avr910_devcode   = 0x?;  # try the ATmega169 one:
6098
    avr910_devcode   = 0x75;
6099
    signature        = 0x1e 0x96 0x04;
6100
    chip_erase_delay = 9000;
6101
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
6102
                       "x x x x  x x x x    x x x x  x x x x";
6103
 
6104
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
6105
                       "x x x x  x x x x    x x x x  x x x x";
6106
    timeout		= 200;
6107
    stabdelay		= 100;
6108
    cmdexedelay		= 25;
6109
    synchloops		= 32;
6110
    bytedelay		= 0;
6111
    pollindex		= 3;
6112
    pollvalue		= 0x53;
6113
    predelay		= 1;
6114
    postdelay		= 1;
6115
    pollmethod		= 1;
6116
 
6117
    pp_controlstack     =
6118
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
6119
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
6120
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
6121
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
6122
    hventerstabdelay    = 100;
6123
    progmodedelay       = 0;
6124
    latchcycles         = 5;
6125
    togglevtg           = 1;
6126
    poweroffdelay       = 15;
6127
    resetdelayms        = 1;
6128
    resetdelayus        = 0;
6129
    hvleavestabdelay    = 15;
6130
    chiperasepulsewidth = 0;
6131
    chiperasepolltimeout = 10;
6132
    programfusepulsewidth = 0;
6133
    programfusepolltimeout = 5;
6134
    programlockpulsewidth = 0;
6135
    programlockpolltimeout = 5;
6136
 
6137
    idr                 = 0x31;
6138
    spmcr               = 0x57;
6139
 
6140
   memory "eeprom"
6141
        paged           = no; /* leave this "no" */
6142
        page_size       = 8;  /* for parallel programming */
6143
        size            = 2048;
6144
        min_write_delay = 9000;
6145
        max_write_delay = 9000;
6146
        readback_p1     = 0xff;
6147
        readback_p2     = 0xff;
6148
	read            = "  1   0   1   0      0   0   0   0",
6149
                          "  x   x   x   x      x a10  a9  a8",
6150
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6151
                          "  o   o   o   o      o   o   o   o";
6152
 
6153
	write           = "  1   1   0   0      0   0   0   0",
6154
                          "  x   x   x   x      x a10  a9  a8",
6155
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6156
                          "  i   i   i   i      i   i   i   i";
6157
 
6158
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
6159
			  "  0   0   0   0      0   0   0   0",
6160
			  "  0   0   0   0      0  a2  a1  a0",
6161
			  "  i   i   i   i      i   i   i   i";
6162
 
6163
	writepage	= "  1   1   0   0      0   0   1   0",
6164
			  "  0   0   x   x      x   x   x  a8",
6165
			  " a7  a6  a5  a4     a3   0   0   0",
6166
			  "  x   x   x   x      x   x   x   x";
6167
 
6168
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
6169
			  "  0   0   0   0      0   0   0   0",
6170
			  "  0   0   0   0      0  a2  a1  a0",
6171
			  "  i   i   i   i      i   i   i   i";
6172
 
6173
	writepage	= "  1   1   0   0      0   0   1   0",
6174
			  "  0   0   x   x      x a10  a9  a8",
6175
			  " a7  a6  a5  a4     a3   0   0   0",
6176
			  "  x   x   x   x      x   x   x   x";
6177
 
6178
	mode		= 0x41;
6179
	delay		= 20;
6180
	blocksize	= 8;
6181
	readsize	= 256;
6182
      ;
6183
 
6184
    memory "flash"
6185
        paged           = yes;
6186
        size            = 65536;
6187
        page_size       = 256;
6188
        num_pages       = 256;
6189
        min_write_delay = 4500;
6190
        max_write_delay = 4500;
6191
        readback_p1     = 0xff;
6192
        readback_p2     = 0xff;
6193
        read_lo         = "  0   0   1   0      0   0   0   0",
6194
                          "a15 a14 a13 a12    a11 a10  a9  a8",
6195
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6196
                          "  o   o   o   o      o   o   o   o";
6197
 
6198
        read_hi         = "  0   0   1   0      1   0   0   0",
6199
                          "a15 a14 a13 a12    a11 a10  a9  a8",
6200
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6201
                          "  o   o   o   o      o   o   o   o";
6202
 
6203
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
6204
                          "  x   x   x   x      x   x   x   x",
6205
                          "  x  a6  a5  a4     a3  a2  a1  a0",
6206
                          "  i   i   i   i      i   i   i   i";
6207
 
6208
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
6209
                          "  x   x   x   x      x   x   x   x",
6210
                          "  x  a6  a5  a4     a3  a2  a1  a0",
6211
                          "  i   i   i   i      i   i   i   i";
6212
 
6213
        writepage       = "  0   1   0   0      1   1   0   0",
6214
                          "  x   x   x a12    a11 a10  a9  a8",
6215
                          " a7   x   x   x      x   x   x   x",
6216
                          "  x   x   x   x      x   x   x   x";
6217
 
6218
	mode		= 0x41;
6219
	delay		= 6;
6220
	blocksize	= 256;
6221
	readsize	= 256;
6222
      ;
6223
 
6224
    memory "lfuse"
6225
        size            = 1;
6226
        min_write_delay = 4500;
6227
        max_write_delay = 4500;
6228
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
6229
                          "x x x x  x x x x   o o o o  o o o o";
6230
 
6231
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
6232
                          "x x x x  x x x x   i i i i  i i i i";
6233
      ;
6234
 
6235
    memory "hfuse"
6236
        size            = 1;
6237
        min_write_delay = 4500;
6238
        max_write_delay = 4500;
6239
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
6240
                          "x x x x  x x x x   o o o o  o o o o";
6241
 
6242
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
6243
                          "x x x x  x x x x   i i i i  i i i i";
6244
      ;
6245
 
6246
    memory "efuse"
6247
        size            = 1;
6248
        min_write_delay = 4500;
6249
        max_write_delay = 4500;
6250
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
6251
                          "x x x x  x x x x   o o o o  o o o o";
6252
 
6253
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
6254
                          "x x x x  x x x x   x x x x  x i i i";
6255
      ;
6256
 
6257
    memory "lock"
6258
        size            = 1;
6259
        min_write_delay = 4500;
6260
        max_write_delay = 4500;
6261
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
6262
                          "x x x x  x x x x   x x o o  o o o o";
6263
 
6264
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
6265
                          "x x x x  x x x x   1 1 i i  i i i i";
6266
      ;
6267
 
6268
    memory "signature"
6269
        size            = 3;
6270
        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
6271
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
6272
      ;
6273
 
6274
    memory "calibration"
6275
        size            = 1;
6276
        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
6277
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
6278
      ;
6279
  ;
6280
 
6281
#------------------------------------------------------------
6282
# ATmega32
6283
#------------------------------------------------------------
6284
 
6285
part
6286
    id               = "m32";
6287
    desc             = "ATMEGA32";
6288
    has_jtag         = yes;
6289
    stk500_devcode   = 0x91;
6290
    avr910_devcode   = 0x72;
6291
    signature        = 0x1e 0x95 0x02;
6292
    chip_erase_delay = 9000;
6293
    pagel            = 0xd7;
6294
    bs2              = 0xa0;
6295
    reset            = dedicated;
6296
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
6297
                       "x x x x  x x x x    x x x x  x x x x";
6298
 
6299
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
6300
                       "x x x x  x x x x    x x x x  x x x x";
6301
    timeout		= 200;
6302
    stabdelay		= 100;
6303
    cmdexedelay		= 25;
6304
    synchloops		= 32;
6305
    bytedelay		= 0;
6306
    pollindex		= 3;
6307
    pollvalue		= 0x53;
6308
    predelay		= 1;
6309
    postdelay		= 1;
6310
    pollmethod		= 0;
6311
 
6312
    pp_controlstack     =
6313
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
6314
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
6315
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
6316
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
6317
    hventerstabdelay    = 100;
6318
    progmodedelay       = 0;
6319
    latchcycles         = 6;
6320
    togglevtg           = 0;
6321
    poweroffdelay       = 0;
6322
    resetdelayms        = 0;
6323
    resetdelayus        = 0;
6324
    hvleavestabdelay    = 15;
6325
    chiperasepulsewidth = 0;
6326
    chiperasepolltimeout = 10;
6327
    programfusepulsewidth = 0;
6328
    programfusepolltimeout = 5;
6329
    programlockpulsewidth = 0;
6330
    programlockpolltimeout = 5;
6331
 
6332
    idr                 = 0x31;
6333
    spmcr               = 0x57;
6334
    allowfullpagebitstream = yes;
6335
 
6336
   memory "eeprom"
6337
        paged           = no;   /* leave this "no" */
6338
        page_size       = 4;    /* for parallel programming */
6339
        size            = 1024;
6340
        min_write_delay = 9000;
6341
        max_write_delay = 9000;
6342
        readback_p1     = 0xff;
6343
        readback_p2     = 0xff;
6344
        read            = "  1   0   1   0      0   0   0   0",
6345
                          "  0   0   x   x      x   x  a9  a8",
6346
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6347
                          "  o   o   o   o      o   o   o   o";
6348
 
6349
        write           = "  1   1   0   0      0   0   0   0",
6350
                          "  0   0   x   x      x   x  a9  a8",
6351
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6352
                          "  i   i   i   i      i   i   i   i";
6353
 
6354
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
6355
			  "  0   0   0   0      0   0   0   0",
6356
			  "  0   0   0   0      0   0  a1  a0",
6357
			  "  i   i   i   i      i   i   i   i";
6358
 
6359
	writepage	= "  1   1   0   0      0   0   1   0",
6360
			  "  0   0   x   x      x   x  a9  a8",
6361
			  " a7  a6  a5  a4     a3  a2   0   0",
6362
			  "  x   x   x   x      x   x   x   x";
6363
 
6364
	mode		= 0x04;
6365
	delay		= 10;
6366
	blocksize	= 64;
6367
	readsize	= 256;
6368
      ;
6369
 
6370
    memory "flash"
6371
        paged           = yes;
6372
        size            = 32768;
6373
        page_size       = 128;
6374
        num_pages       = 256;
6375
        min_write_delay = 4500;
6376
        max_write_delay = 4500;
6377
        readback_p1     = 0xff;
6378
        readback_p2     = 0xff;
6379
        read_lo         = "  0   0   1   0      0   0   0   0",
6380
                          "  0   0 a13 a12    a11 a10  a9  a8",
6381
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6382
                          "  o   o   o   o      o   o   o   o";
6383
 
6384
        read_hi         = "  0   0   1   0      1   0   0   0",
6385
                          "  0   0 a13 a12    a11 a10  a9  a8",
6386
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6387
                          "  o   o   o   o      o   o   o   o";
6388
 
6389
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
6390
                          "  0   0   x   x      x   x   x   x",
6391
                          "  x   x  a5  a4     a3  a2  a1  a0",
6392
                          "  i   i   i   i      i   i   i   i";
6393
 
6394
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
6395
                          "  0   0   x   x      x   x   x   x",
6396
                          "  x   x  a5  a4     a3  a2  a1  a0",
6397
                          "  i   i   i   i      i   i   i   i";
6398
 
6399
        writepage       = "  0   1   0   0      1   1   0   0",
6400
                          "  0   0 a13 a12    a11 a10  a9  a8",
6401
                          " a7  a6   x   x      x   x   x   x",
6402
                          "  x   x   x   x      x   x   x   x";
6403
 
6404
	mode		= 0x21;
6405
	delay		= 6;
6406
	blocksize	= 64;
6407
	readsize	= 256;
6408
      ;
6409
 
6410
    memory "lfuse"
6411
        size            = 1;
6412
        min_write_delay = 2000;
6413
        max_write_delay = 2000;
6414
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
6415
                          "x x x x  x x x x   o o o o  o o o o";
6416
 
6417
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
6418
                          "x x x x  x x x x   i i i i  i i i i";
6419
      ;
6420
 
6421
    memory "hfuse"
6422
        size            = 1;
6423
        min_write_delay = 2000;
6424
        max_write_delay = 2000;
6425
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
6426
                          "x x x x  x x x x   o o o o  o o o o";
6427
 
6428
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
6429
                          "x x x x  x x x x   i i i i  i i i i";
6430
      ;
6431
 
6432
    memory "lock"
6433
        size            = 1;
6434
        min_write_delay = 2000;
6435
        max_write_delay = 2000;
6436
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
6437
                          "x x x x  x x x x   x x o o  o o o o";
6438
 
6439
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
6440
                          "x x x x  x x x x   1 1 i i  i i i i";
6441
      ;
6442
 
6443
    memory "signature"
6444
        size            = 3;
6445
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x x",
6446
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o o";
6447
      ;
6448
 
6449
    memory "calibration"
6450
        size            = 4;
6451
        read            = "0 0 1 1  1 0 0 0    0 0 x x  x x x x",
6452
                          "0 0 0 0  0 0 a1 a0  o o o o  o o o o";
6453
      ;
6454
  ;
6455
 
6456
#------------------------------------------------------------
6457
# ATmega161
6458
#------------------------------------------------------------
6459
 
6460
part
6461
    id               = "m161";
6462
    desc             = "ATMEGA161";
6463
    stk500_devcode   = 0x80;
6464
    avr910_devcode   = 0x60;
6465
    signature        = 0x1e 0x94 0x01;
6466
    chip_erase_delay = 28000;
6467
    pagel            = 0xd7;
6468
    bs2              = 0xa0;
6469
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
6470
                       "x x x x  x x x x    x x x x  x x x x";
6471
 
6472
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
6473
                       "x x x x  x x x x    x x x x  x x x x";
6474
    timeout		= 200;
6475
    stabdelay		= 100;
6476
    cmdexedelay		= 25;
6477
    synchloops		= 32;
6478
    bytedelay		= 0;
6479
    pollindex		= 3;
6480
    pollvalue		= 0x53;
6481
    predelay		= 1;
6482
    postdelay		= 1;
6483
    pollmethod		= 0;
6484
 
6485
    pp_controlstack     =
6486
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
6487
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
6488
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
6489
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
6490
    hventerstabdelay    = 100;
6491
    progmodedelay       = 0;
6492
    latchcycles         = 0;
6493
    togglevtg           = 0;
6494
    poweroffdelay       = 0;
6495
    resetdelayms        = 0;
6496
    resetdelayus        = 0;
6497
    hvleavestabdelay    = 15;
6498
    chiperasepulsewidth = 0;
6499
    chiperasepolltimeout = 30;
6500
    programfusepulsewidth = 0;
6501
    programfusepolltimeout = 2;
6502
    programlockpulsewidth = 0;
6503
    programlockpolltimeout = 2;
6504
 
6505
   memory "eeprom"
6506
        size            = 512;
6507
        min_write_delay = 3400;
6508
        max_write_delay = 3400;
6509
        readback_p1     = 0xff;
6510
        readback_p2     = 0xff;
6511
	read            = "  1   0   1   0      0   0   0   0",
6512
                          "  x   x   x   x      x   x   x  a8",
6513
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6514
                          "  o   o   o   o      o   o   o   o";
6515
 
6516
	write           = "  1   1   0   0      0   0   0   0",
6517
                          "  x   x   x   x      x   x   x  a8",
6518
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6519
                          "  i   i   i   i      i   i   i   i";
6520
 
6521
	mode		= 0x04;
6522
	delay		= 5;
6523
	blocksize	= 128;
6524
	readsize	= 256;
6525
      ;
6526
 
6527
    memory "flash"
6528
        paged           = yes;
6529
        size            = 16384;
6530
        page_size       = 128;
6531
        num_pages       = 128;
6532
        min_write_delay = 14000;
6533
        max_write_delay = 14000;
6534
        readback_p1     = 0xff;
6535
        readback_p2     = 0xff;
6536
        read_lo         = "  0   0   1   0      0   0   0   0",
6537
                          "  x   x   x a12    a11 a10  a9  a8",
6538
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6539
                          "  o   o   o   o      o   o   o   o";
6540
 
6541
        read_hi         = "  0   0   1   0      1   0   0   0",
6542
                          "  x   x   x a12    a11 a10  a9  a8",
6543
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6544
                          "  o   o   o   o      o   o   o   o";
6545
 
6546
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
6547
                          "  x   x   x   x      x   x   x   x",
6548
                          "  x   x  a5  a4     a3  a2  a1  a0",
6549
                          "  i   i   i   i      i   i   i   i";
6550
 
6551
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
6552
                          "  x   x   x   x      x   x   x   x",
6553
                          "  x   x  a5  a4     a3  a2  a1  a0",
6554
                          "  i   i   i   i      i   i   i   i";
6555
 
6556
        writepage       = "  0   1   0   0      1   1   0   0",
6557
                          "  x   x   x a12    a11 a10  a9  a8",
6558
                          " a7  a6   x   x      x   x   x   x",
6559
                          "  x   x   x   x      x   x   x   x";
6560
 
6561
	mode		= 0x21;
6562
	delay		= 16;
6563
	blocksize	= 128;
6564
	readsize	= 256;
6565
      ;
6566
 
6567
    memory "fuse"
6568
        size            = 1;
6569
        min_write_delay = 2000;
6570
        max_write_delay = 2000;
6571
        read            = "0 1 0 1  0 0 0 0   x x x x  x x x x",
6572
                          "x x x x  x x x x   x o x o  o o o o";
6573
 
6574
        write           = "1 0 1 0  1 1 0 0   1 0 1 x  x x x x",
6575
                          "x x x x  x x x x   1 i 1 i  i i i i";
6576
      ;
6577
 
6578
    memory "lock"
6579
        size            = 1;
6580
        min_write_delay = 2000;
6581
        max_write_delay = 2000;
6582
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
6583
                          "x x x x  x x x x   x x o o  o o o o";
6584
 
6585
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
6586
                          "x x x x  x x x x   1 1 i i  i i i i";
6587
      ;
6588
    memory "signature"
6589
        size            = 3;
6590
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
6591
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
6592
      ;
6593
  ;
6594
 
6595
 
6596
#------------------------------------------------------------
6597
# ATmega8
6598
#------------------------------------------------------------
6599
 
6600
part
6601
    id               = "m8";
6602
    desc             = "ATMEGA8";
6603
    stk500_devcode   = 0x70;
6604
    avr910_devcode   = 0x76;
6605
    signature        = 0x1e 0x93 0x07;
6606
    pagel            = 0xd7;
6607
    bs2              = 0xc2;
6608
    chip_erase_delay = 10000;
6609
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
6610
                       "x x x x  x x x x    x x x x  x x x x";
6611
 
6612
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
6613
                       "x x x x  x x x x    x x x x  x x x x";
6614
 
6615
    timeout		= 200;
6616
    stabdelay		= 100;
6617
    cmdexedelay		= 25;
6618
    synchloops		= 32;
6619
    bytedelay		= 0;
6620
    pollindex		= 3;
6621
    pollvalue		= 0x53;
6622
    predelay		= 1;
6623
    postdelay		= 1;
6624
    pollmethod		= 0;
6625
 
6626
    pp_controlstack     =
6627
	0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
6628
	0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
6629
	0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
6630
	0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
6631
    hventerstabdelay    = 100;
6632
    progmodedelay       = 0;
6633
    latchcycles         = 5;
6634
    togglevtg           = 1;
6635
    poweroffdelay       = 15;
6636
    resetdelayms        = 2;
6637
    resetdelayus        = 0;
6638
    hvleavestabdelay    = 15;
6639
    resetdelay          = 15;
6640
    chiperasepulsewidth = 0;
6641
    chiperasepolltimeout = 10;
6642
    programfusepulsewidth = 0;
6643
    programfusepolltimeout = 5;
6644
    programlockpulsewidth = 0;
6645
    programlockpolltimeout = 5;
6646
 
6647
    memory "eeprom"
6648
        size            = 512;
6649
        page_size       = 4;
6650
        min_write_delay = 9000;
6651
        max_write_delay = 9000;
6652
        readback_p1     = 0xff;
6653
        readback_p2     = 0xff;
6654
	read            = "  1   0   1   0      0   0   0   0",
6655
                          "  0   0   x   x      x   x   x  a8",
6656
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6657
                          "  o   o   o   o      o   o   o   o";
6658
 
6659
	write           = "  1   1   0   0      0   0   0   0",
6660
                          "  0   0   x   x      x   x   x  a8",
6661
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6662
                          "  i   i   i   i      i   i   i   i";
6663
 
6664
	mode		= 0x04;
6665
	delay		= 20;
6666
	blocksize	= 128;
6667
	readsize	= 256;
6668
      ;
6669
    memory "flash"
6670
        paged           = yes;
6671
        size            = 8192;
6672
        page_size       = 64;
6673
        num_pages       = 128;
6674
        min_write_delay = 4500;
6675
        max_write_delay = 4500;
6676
        readback_p1     = 0xff;
6677
        readback_p2     = 0x00;
6678
        read_lo         = "  0   0   1   0    0   0   0   0",
6679
                          "  0   0   0   0  a11 a10  a9  a8",
6680
                          " a7  a6  a5  a4   a3  a2  a1  a0",
6681
                          "  o   o   o   o    o   o   o   o";
6682
 
6683
        read_hi         = "  0   0   1   0    1   0   0   0",
6684
                          "  0   0   0   0  a11 a10  a9  a8",
6685
                          " a7  a6  a5  a4   a3  a2  a1  a0",
6686
                          "  o   o   o   o    o   o   o   o";
6687
 
6688
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
6689
                          "  0   0   0   0      x   x   x   x",
6690
                          "  x   x   x  a4     a3  a2  a1  a0",
6691
                          "  i   i   i   i      i   i   i   i";
6692
 
6693
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
6694
                          "  0   0   0   0      x   x   x   x",
6695
                          "  x   x   x  a4     a3  a2  a1  a0",
6696
                          "  i   i   i   i      i   i   i   i";
6697
 
6698
        writepage       = "  0   1   0   0      1   1   0   0",
6699
                          "  0   0   0   0    a11 a10  a9  a8",
6700
                          " a7  a6  a5   x      x   x   x   x",
6701
                          "  x   x   x   x      x   x   x   x";
6702
 
6703
	mode		= 0x21;
6704
	delay		= 10;
6705
	blocksize	= 64;
6706
	readsize	= 256;
6707
      ;
6708
 
6709
    memory "lfuse"
6710
        size            = 1;
6711
        min_write_delay = 2000;
6712
        max_write_delay = 2000;
6713
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
6714
                          "x x x x  x x x x   o o o o  o o o o";
6715
 
6716
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
6717
                          "x x x x  x x x x   i i i i  i i i i";
6718
      ;
6719
 
6720
    memory "hfuse"
6721
        size            = 1;
6722
        min_write_delay = 2000;
6723
        max_write_delay = 2000;
6724
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
6725
                          "x x x x  x x x x   o o o o  o o o o";
6726
 
6727
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
6728
                          "x x x x  x x x x   i i i i  i i i i";
6729
      ;
6730
 
6731
    memory "lock"
6732
        size            = 1;
6733
        min_write_delay = 2000;
6734
        max_write_delay = 2000;
6735
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
6736
                          "x x x x  x x x x   x x o o  o o o o";
6737
 
6738
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
6739
                          "x x x x  x x x x   1 1 i i  i i i i";
6740
      ;
6741
 
6742
    memory "calibration"
6743
        size            = 4;
6744
        read            = "0  0  1  1   1  0  0  0   0  0  x  x   x  x  x  x",
6745
                          "0  0  0  0   0  0 a1 a0   o  o  o  o   o  o  o  o";
6746
      ;
6747
 
6748
    memory "signature"
6749
        size            = 3;
6750
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
6751
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
6752
      ;
6753
  ;
6754
 
6755
 
6756
 
6757
#------------------------------------------------------------
6758
# ATmega8515
6759
#------------------------------------------------------------
6760
 
6761
part
6762
    id               = "m8515";
6763
    desc             = "ATMEGA8515";
6764
    stk500_devcode   = 0x63;
6765
    avr910_devcode   = 0x3A;
6766
    signature        = 0x1e 0x93 0x06;
6767
    chip_erase_delay = 9000;
6768
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
6769
                       "x x x x  x x x x    x x x x  x x x x";
6770
 
6771
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
6772
                       "x x x x  x x x x    x x x x  x x x x";
6773
 
6774
    timeout		= 200;
6775
    stabdelay		= 100;
6776
    cmdexedelay		= 25;
6777
    synchloops		= 32;
6778
    bytedelay		= 0;
6779
    pollindex		= 3;
6780
    pollvalue		= 0x53;
6781
    predelay		= 1;
6782
    postdelay		= 1;
6783
    pollmethod		= 0;
6784
 
6785
    pp_controlstack     =
6786
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
6787
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
6788
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
6789
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
6790
    hventerstabdelay    = 100;
6791
    progmodedelay       = 0;
6792
    latchcycles         = 6;
6793
    togglevtg           = 0;
6794
    poweroffdelay       = 0;
6795
    resetdelayms        = 0;
6796
    resetdelayus        = 0;
6797
    hvleavestabdelay    = 15;
6798
    chiperasepulsewidth = 0;
6799
    chiperasepolltimeout = 10;
6800
    programfusepulsewidth = 0;
6801
    programfusepolltimeout = 5;
6802
    programlockpulsewidth = 0;
6803
    programlockpolltimeout = 5;
6804
 
6805
    memory "eeprom"
6806
        size            = 512;
6807
        min_write_delay = 9000;
6808
        max_write_delay = 9000;
6809
        readback_p1     = 0xff;
6810
        readback_p2     = 0xff;
6811
 read            = "  1   0   1   0      0   0   0   0",
6812
                          "  0   0   x   x      x   x   x  a8",
6813
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6814
                          "  o   o   o   o      o   o   o   o";
6815
 
6816
 write           = "  1   1   0   0      0   0   0   0",
6817
                          "  0   0   x   x      x   x   x  a8",
6818
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6819
                          "  i   i   i   i      i   i   i   i";
6820
 
6821
	mode		= 0x04;
6822
	delay		= 10;
6823
	blocksize	= 128;
6824
	readsize	= 256;
6825
      ;
6826
    memory "flash"
6827
        paged           = yes;
6828
        size            = 8192;
6829
        page_size       = 64;
6830
        num_pages       = 128;
6831
        min_write_delay = 4500;
6832
        max_write_delay = 4500;
6833
        readback_p1     = 0xff;
6834
        readback_p2     = 0xff;
6835
        read_lo         = "  0   0   1   0    0   0   0   0",
6836
                          "  0   0   0   0  a11 a10  a9  a8",
6837
                          " a7  a6  a5  a4   a3  a2  a1  a0",
6838
                          "  o   o   o   o    o   o   o   o";
6839
 
6840
        read_hi         = "  0   0   1   0    1   0   0   0",
6841
                          "  0   0   0   0  a11 a10  a9  a8",
6842
                          " a7  a6  a5  a4   a3  a2  a1  a0",
6843
                          "  o   o   o   o    o   o   o   o";
6844
 
6845
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
6846
                          "  0   0   0   0      x   x   x   x",
6847
                          "  x   x   x  a4     a3  a2  a1  a0",
6848
                          "  i   i   i   i      i   i   i   i";
6849
 
6850
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
6851
                          "  0   0   0   0      x   x   x   x",
6852
                          "  x   x   x  a4     a3  a2  a1  a0",
6853
                          "  i   i   i   i      i   i   i   i";
6854
 
6855
        writepage       = "  0   1   0   0      1   1   0   0",
6856
                          "  0   0   0   0    a11 a10  a9  a8",
6857
                          " a7  a6  a5   x      x   x   x   x",
6858
                          "  x   x   x   x      x   x   x   x";
6859
 
6860
	mode		= 0x21;
6861
	delay		= 6;
6862
	blocksize	= 64;
6863
	readsize	= 256;
6864
      ;
6865
 
6866
    memory "lfuse"
6867
        size            = 1;
6868
        min_write_delay = 4500;
6869
        max_write_delay = 4500;
6870
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
6871
                          "x x x x  x x x x   o o o o  o o o o";
6872
 
6873
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
6874
                          "x x x x  x x x x   i i i i  i i i i";
6875
      ;
6876
 
6877
    memory "hfuse"
6878
        size            = 1;
6879
        min_write_delay = 4500;
6880
        max_write_delay = 4500;
6881
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
6882
                          "x x x x  x x x x   o o o o  o o o o";
6883
 
6884
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
6885
                          "x x x x  x x x x   i i i i  i i i i";
6886
      ;
6887
 
6888
    memory "lock"
6889
        size            = 1;
6890
        min_write_delay = 4500;
6891
        max_write_delay = 4500;
6892
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
6893
                          "x x x x  x x x x   x x o o  o o o o";
6894
 
6895
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
6896
                          "x x x x  x x x x   1 1 i i  i i i i";
6897
      ;
6898
 
6899
    memory "calibration"
6900
        size            = 4;
6901
        read            = "0 0 1 1  1 0 0 0     0 0 x x  x x x x",
6902
                          "0 0 0 0  0 0 a1 a0   o o o o  o o o o";
6903
      ;
6904
 
6905
    memory "signature"
6906
        size            = 3;
6907
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
6908
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
6909
      ;
6910
  ;
6911
 
6912
 
6913
 
6914
 
6915
#------------------------------------------------------------
6916
# ATmega8535
6917
#------------------------------------------------------------
6918
 
6919
part
6920
    id               = "m8535";
6921
    desc             = "ATMEGA8535";
6922
    stk500_devcode   = 0x64;
6923
    avr910_devcode   = 0x69;
6924
    signature        = 0x1e 0x93 0x08;
6925
    pagel            = 0xd7;
6926
    bs2              = 0xa0;
6927
    chip_erase_delay = 9000;
6928
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
6929
                       "x x x x  x x x x    x x x x  x x x x";
6930
 
6931
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
6932
                       "x x x x  x x x x    x x x x  x x x x";
6933
 
6934
    timeout		= 200;
6935
    stabdelay		= 100;
6936
    cmdexedelay		= 25;
6937
    synchloops		= 32;
6938
    bytedelay		= 0;
6939
    pollindex		= 3;
6940
    pollvalue		= 0x53;
6941
    predelay		= 1;
6942
    postdelay		= 1;
6943
    pollmethod		= 0;
6944
 
6945
    pp_controlstack     =
6946
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
6947
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
6948
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
6949
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
6950
    hventerstabdelay    = 100;
6951
    progmodedelay       = 0;
6952
    latchcycles         = 6;
6953
    togglevtg           = 0;
6954
    poweroffdelay       = 0;
6955
    resetdelayms        = 0;
6956
    resetdelayus        = 0;
6957
    hvleavestabdelay    = 15;
6958
    chiperasepulsewidth = 0;
6959
    chiperasepolltimeout = 10;
6960
    programfusepulsewidth = 0;
6961
    programfusepolltimeout = 5;
6962
    programlockpulsewidth = 0;
6963
    programlockpolltimeout = 5;
6964
 
6965
    memory "eeprom"
6966
        size            = 512;
6967
        min_write_delay = 9000;
6968
        max_write_delay = 9000;
6969
        readback_p1     = 0xff;
6970
        readback_p2     = 0xff;
6971
	read            = "  1   0   1   0      0   0   0   0",
6972
                          "  0   0   x   x      x   x   x  a8",
6973
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6974
                          "  o   o   o   o      o   o   o   o";
6975
 
6976
	write           = "  1   1   0   0      0   0   0   0",
6977
                          "  0   0   x   x      x   x   x  a8",
6978
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6979
                          "  i   i   i   i      i   i   i   i";
6980
 
6981
	mode		= 0x04;
6982
	delay		= 10;
6983
	blocksize	= 128;
6984
	readsize	= 256;
6985
      ;
6986
    memory "flash"
6987
        paged           = yes;
6988
        size            = 8192;
6989
        page_size       = 64;
6990
        num_pages       = 128;
6991
        min_write_delay = 4500;
6992
        max_write_delay = 4500;
6993
        readback_p1     = 0xff;
6994
        readback_p2     = 0xff;
6995
        read_lo         = "  0   0   1   0    0   0   0   0",
6996
                          "  0   0   0   0  a11 a10  a9  a8",
6997
                          " a7  a6  a5  a4   a3  a2  a1  a0",
6998
                          "  o   o   o   o    o   o   o   o";
6999
 
7000
        read_hi         = "  0   0   1   0    1   0   0   0",
7001
                          "  0   0   0   0  a11 a10  a9  a8",
7002
                          " a7  a6  a5  a4   a3  a2  a1  a0",
7003
                          "  o   o   o   o    o   o   o   o";
7004
 
7005
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
7006
                          "  0   0   0   0      x   x   x   x",
7007
                          "  x   x   x  a4     a3  a2  a1  a0",
7008
                          "  i   i   i   i      i   i   i   i";
7009
 
7010
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
7011
                          "  0   0   0   0      x   x   x   x",
7012
                          "  x   x   x  a4     a3  a2  a1  a0",
7013
                          "  i   i   i   i      i   i   i   i";
7014
 
7015
        writepage       = "  0   1   0   0      1   1   0   0",
7016
                          "  0   0   0   0    a11 a10  a9  a8",
7017
                          " a7  a6  a5   x      x   x   x   x",
7018
                          "  x   x   x   x      x   x   x   x";
7019
 
7020
	mode		= 0x21;
7021
	delay		= 6;
7022
	blocksize	= 64;
7023
	readsize	= 256;
7024
      ;
7025
 
7026
    memory "lfuse"
7027
        size            = 1;
7028
        min_write_delay = 2000;
7029
        max_write_delay = 2000;
7030
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
7031
                          "x x x x  x x x x   o o o o  o o o o";
7032
 
7033
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
7034
                          "x x x x  x x x x   i i i i  i i i i";
7035
      ;
7036
 
7037
    memory "hfuse"
7038
        size            = 1;
7039
        min_write_delay = 2000;
7040
        max_write_delay = 2000;
7041
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
7042
                          "x x x x  x x x x   o o o o  o o o o";
7043
 
7044
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
7045
                          "x x x x  x x x x   i i i i  i i i i";
7046
      ;
7047
 
7048
    memory "lock"
7049
        size            = 1;
7050
        min_write_delay = 2000;
7051
        max_write_delay = 2000;
7052
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
7053
                          "x x x x  x x x x   x x o o  o o o o";
7054
 
7055
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
7056
                          "x x x x  x x x x   1 1 i i  i i i i";
7057
      ;
7058
 
7059
    memory "calibration"
7060
        size            = 4;
7061
        read            = "0 0 1 1  1 0 0 0   0 0 x x  x x x x",
7062
                          "0 0 0 0  0 0 a1 a0 o o o o  o o o o";
7063
      ;
7064
 
7065
    memory "signature"
7066
        size            = 3;
7067
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
7068
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
7069
      ;
7070
  ;
7071
 
7072
 
7073
#------------------------------------------------------------
7074
# ATtiny26
7075
#------------------------------------------------------------
7076
 
7077
part
7078
    id                  = "t26";
7079
    desc                = "ATTINY26";
7080
    stk500_devcode      = 0x21;
7081
    avr910_devcode      = 0x5e;
7082
    signature           = 0x1e 0x91 0x09;
7083
    pagel               = 0xb3;
7084
    bs2                 = 0xb2;
7085
    chip_erase_delay    = 9000;
7086
    pgm_enable          = "1 0 1 0  1 1 0 0   0 1 0 1  0 0 1 1",
7087
                          "x x x x  x x x x   x x x x  x x x x";
7088
 
7089
    chip_erase          = "1 0 1 0  1 1 0 0   1 0 0 x  x x x x",
7090
                          "x x x x  x x x x   x x x x  x x x x";
7091
 
7092
    timeout		= 200;
7093
    stabdelay		= 100;
7094
    cmdexedelay		= 25;
7095
    synchloops		= 32;
7096
    bytedelay		= 0;
7097
    pollindex		= 3;
7098
    pollvalue		= 0x53;
7099
    predelay		= 1;
7100
    postdelay		= 1;
7101
    pollmethod		= 0;
7102
 
7103
    pp_controlstack     =
7104
        0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC,
7105
        0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC,
7106
        0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C,
7107
        0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00;
7108
    hventerstabdelay    = 100;
7109
    progmodedelay       = 0;
7110
    latchcycles         = 5;
7111
    togglevtg           = 1;
7112
    poweroffdelay       = 15;
7113
    resetdelayms        = 2;
7114
    resetdelayus        = 0;
7115
    hvleavestabdelay    = 15;
7116
    chiperasepulsewidth = 0;
7117
    chiperasepolltimeout = 10;
7118
    programfusepulsewidth = 0;
7119
    programfusepolltimeout = 5;
7120
    programlockpulsewidth = 0;
7121
    programlockpolltimeout = 5;
7122
 
7123
    memory "eeprom"
7124
        size            = 128;
7125
        min_write_delay = 9000;
7126
        max_write_delay = 9000;
7127
        readback_p1     = 0xff;
7128
        readback_p2     = 0xff;
7129
        read            = "1  0  1  0   0  0  0  0    x x x x  x x x x",
7130
                          "x a6 a5 a4  a3 a2 a1 a0    o o o o  o o o o";
7131
 
7132
        write           = "1  1  0  0   0  0  0  0    x x x x  x x x x",
7133
                          "x a6 a5 a4  a3 a2 a1 a0    i i i i  i i i i";
7134
 
7135
	mode		= 0x04;
7136
	delay		= 10;
7137
	blocksize	= 64;
7138
	readsize	= 256;
7139
    ;
7140
 
7141
    memory "flash"
7142
        paged           = yes;
7143
        size            = 2048;
7144
        page_size       = 32;
7145
        num_pages       = 64;
7146
        min_write_delay = 4500;
7147
        max_write_delay = 4500;
7148
        readback_p1     = 0xff;
7149
        readback_p2     = 0xff;
7150
        read_lo         = "  0  0  1  0   0  0  0  0",
7151
                          "  x  x  x  x   x  x a9 a8",
7152
                          " a7 a6 a5 a4  a3 a2 a1 a0",
7153
                          "  o  o  o  o   o  o  o  o";
7154
 
7155
        read_hi         = "  0  0  1  0   1  0  0  0",
7156
                          "  x  x  x  x   x  x a9 a8",
7157
                          " a7 a6 a5 a4  a3 a2 a1 a0",
7158
                          "  o  o  o  o   o  o  o  o";
7159
 
7160
        loadpage_lo     = "  0  1  0  0   0  0  0  0",
7161
                          "  x  x  x  x   x  x  x  x",
7162
                          "  x  x  x  x  a3 a2 a1 a0",
7163
                          "  i  i  i  i   i  i  i  i";
7164
 
7165
        loadpage_hi     = "  0  1  0  0   1  0  0  0",
7166
                          "  x  x  x  x   x  x  x  x",
7167
                          "  x  x  x  x  a3 a2 a1 a0",
7168
                          "  i  i  i  i   i  i  i  i";
7169
 
7170
        writepage       = "  0  1  0  0   1  1  0  0",
7171
                          "  x  x  x  x   x  x a9 a8",
7172
                          " a7 a6 a5 a4   x  x  x  x",
7173
                          "  x  x  x  x   x  x  x  x";
7174
 
7175
	mode		= 0x21;
7176
	delay		= 6;
7177
	blocksize	= 16;
7178
	readsize	= 256;
7179
    ;
7180
 
7181
    memory "signature"
7182
        size            = 3;
7183
        read            = "0  0  1  1   0  0  0  0    x x x x  x x x x",
7184
                          "0  0  0  0   0  0 a1 a0    o o o o  o o o o";
7185
    ;
7186
 
7187
    memory "lock"
7188
        size            = 1;
7189
        read            = "0  1  0  1   1  0  0  0    x x x x  x x x x",
7190
                          "x  x  x  x   x  x  x  x    x x x x  x x o o";
7191
 
7192
        write           = "1  0  1  0   1  1  0  0    1 1 1 1  1 1 i i",
7193
                          "x  x  x  x   x  x  x  x    x x x x  x x x x";
7194
        min_write_delay = 9000;
7195
        max_write_delay = 9000;
7196
    ;
7197
 
7198
    memory "lfuse"
7199
        size            = 1;
7200
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
7201
                          "x x x x  x x x x  i i i i  i i i i";
7202
 
7203
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
7204
                          "x x x x  x x x x  o o o o  o o o o";
7205
        min_write_delay = 9000;
7206
        max_write_delay = 9000;
7207
      ;
7208
 
7209
    memory "hfuse"
7210
        size            = 1;
7211
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
7212
                          "x x x x  x x x x  x x x i  i i i i";
7213
 
7214
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
7215
                          "x x x x  x x x x  x x x o  o o o o";
7216
        min_write_delay = 9000;
7217
        max_write_delay = 9000;
7218
      ;
7219
 
7220
    memory "calibration"
7221
        size            = 4;
7222
        read            = "0  0  1  1   1  0  0  0    x x x x  x x x x",
7223
                          "0  0  0  0   0  0 a1 a0    o o o o  o o o o";
7224
    ;
7225
 
7226
;
7227
 
7228
 
7229
#------------------------------------------------------------
7230
# ATtiny261
7231
#------------------------------------------------------------
7232
# Close to ATtiny26
7233
 
7234
part
7235
    id                  = "t261";
7236
    desc                = "ATTINY261";
7237
     has_debugwire = yes;
7238
     flash_instr   = 0xB4, 0x00, 0x10;
7239
     eeprom_instr  = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
7240
	             0xBC, 0x00, 0xB4, 0x00, 0xBA, 0x0D, 0xBB, 0xBC,
7241
	             0x99, 0xE1, 0xBB, 0xAC;
7242
#    stk500_devcode      = 0x21;
7243
#    avr910_devcode      = 0x5e;
7244
    signature           = 0x1e 0x91 0x0c;
7245
    pagel               = 0xb3;
7246
    bs2                 = 0xb2;
7247
    chip_erase_delay    = 4000;
7248
 
7249
    pgm_enable          = "1 0 1 0  1 1 0 0   0 1 0 1  0 0 1 1",
7250
                          "x x x x  x x x x   x x x x  x x x x";
7251
 
7252
    chip_erase          = "1 0 1 0  1 1 0 0   1 0 0 x  x x x x",
7253
                          "x x x x  x x x x   x x x x  x x x x";
7254
 
7255
    timeout		= 200;
7256
    stabdelay		= 100;
7257
    cmdexedelay		= 25;
7258
    synchloops		= 32;
7259
    bytedelay		= 0;
7260
    pollindex		= 3;
7261
    pollvalue		= 0x53;
7262
    predelay		= 1;
7263
    postdelay		= 1;
7264
    pollmethod		= 0;
7265
 
7266
    pp_controlstack     =
7267
        0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC,
7268
        0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC,
7269
        0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C,
7270
        0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00;
7271
    hventerstabdelay    = 100;
7272
    progmodedelay       = 0;
7273
    latchcycles         = 5;
7274
    togglevtg           = 1;
7275
    poweroffdelay       = 15;
7276
    resetdelayms        = 2;
7277
    resetdelayus        = 0;
7278
    hvleavestabdelay    = 15;
7279
    chiperasepulsewidth = 0;
7280
    chiperasepolltimeout = 10;
7281
    programfusepulsewidth = 0;
7282
    programfusepolltimeout = 5;
7283
    programlockpulsewidth = 0;
7284
    programlockpolltimeout = 5;
7285
 
7286
    memory "eeprom"
7287
        paged           = no;
7288
        size            = 128;
7289
        page_size       = 4;
7290
        num_pages       = 32;
7291
        min_write_delay = 4000;
7292
        max_write_delay = 4000;
7293
        readback_p1     = 0xff;
7294
        readback_p2     = 0xff;
7295
 
7296
        read            = "1  0  1  0   0  0  0  0    x x x x  x x x x",
7297
                          "x a6 a5 a4  a3 a2 a1 a0    o o o o  o o o o";
7298
 
7299
        write           = "1  1  0  0   0  0  0  0    x x x x  x x x x",
7300
                          "x a6 a5 a4  a3 a2 a1 a0    i i i i  i i i i";
7301
 
7302
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
7303
			  "  0   0   0   0      0   0   0   0",
7304
			  "  0   0   0   0      0   0  a1  a0",
7305
			  "  i   i   i   i      i   i   i   i";
7306
 
7307
	writepage	= "  1   1   0   0      0   0   1   0",
7308
			  "  0   0   x   x      x   x   x   x",
7309
			  "  x  a6  a5  a4     a3  a2   0   0",
7310
			  "  x   x   x   x      x   x   x   x";
7311
 
7312
	mode		= 0x41;
7313
	delay		= 10;
7314
	blocksize	= 4;
7315
	readsize	= 256;
7316
    ;
7317
 
7318
    memory "flash"
7319
        paged           = yes;
7320
        size            = 2048;
7321
        page_size       = 32;
7322
        num_pages       = 64;
7323
        min_write_delay = 4500;
7324
        max_write_delay = 4500;
7325
        readback_p1     = 0xff;
7326
        readback_p2     = 0xff;
7327
 
7328
        read_lo         = "  0  0  1  0   0  0  0  0",
7329
                          "  x  x  x  x   x  x a9 a8",
7330
                          " a7 a6 a5 a4  a3 a2 a1 a0",
7331
                          "  o  o  o  o   o  o  o  o";
7332
 
7333
        read_hi         = "  0  0  1  0   1  0  0  0",
7334
                          "  x  x  x  x   x  x a9 a8",
7335
                          " a7 a6 a5 a4  a3 a2 a1 a0",
7336
                          "  o  o  o  o   o  o  o  o";
7337
 
7338
        loadpage_lo     = "  0  1  0  0   0  0  0  0",
7339
                          "  x  x  x  x   x  x  x  x",
7340
                          "  x  x  x  x  a3 a2 a1 a0",
7341
                          "  i  i  i  i   i  i  i  i";
7342
 
7343
        loadpage_hi     = "  0  1  0  0   1  0  0  0",
7344
                          "  x  x  x  x   x  x  x  x",
7345
                          "  x  x  x  x  a3 a2 a1 a0",
7346
                          "  i  i  i  i   i  i  i  i";
7347
 
7348
        writepage       = "  0  1  0  0   1  1  0  0",
7349
                          "  x  x  x  x   x  x a9 a8",
7350
                          " a7 a6 a5 a4   x  x  x  x",
7351
                          "  x  x  x  x   x  x  x  x";
7352
 
7353
	mode		= 0x41;
7354
	delay		= 6;
7355
	blocksize	= 32;
7356
	readsize	= 256;
7357
    ;
7358
 
7359
    memory "signature"
7360
        size            = 3;
7361
        read            = "0  0  1  1   0  0  0  0    x x x x  x x x x",
7362
                          "0  0  0  0   0  0 a1 a0    o o o o  o o o o";
7363
    ;
7364
 
7365
    memory "lock"
7366
        size            = 1;
7367
        read            = "0  1  0  1   1  0  0  0    x x x x  x x x x",
7368
                          "x  x  x  x   x  x  x  x    x x x x  x x o o";
7369
 
7370
        write           = "1  0  1  0   1  1  0  0    1 1 1 1  1 1 i i",
7371
                          "x  x  x  x   x  x  x  x    x x x x  x x x x";
7372
        min_write_delay = 4500;
7373
        max_write_delay = 4500;
7374
    ;
7375
 
7376
    memory "lfuse"
7377
        size            = 1;
7378
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
7379
                          "x x x x  x x x x  i i i i  i i i i";
7380
 
7381
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
7382
                          "x x x x  x x x x  o o o o  o o o o";
7383
        min_write_delay = 4500;
7384
        max_write_delay = 4500;
7385
      ;
7386
 
7387
    memory "hfuse"
7388
        size            = 1;
7389
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
7390
                          "x x x x  x x x x  i i i i  i i i i";
7391
 
7392
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
7393
                          "x x x x  x x x x  o o o o  o o o o";
7394
        min_write_delay = 4500;
7395
        max_write_delay = 4500;
7396
      ;
7397
 
7398
    memory "efuse"
7399
        size            = 1;
7400
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
7401
                          "x x x x  x x x x   x x x x  x x x i";
7402
 
7403
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
7404
                          "x x x x  x x x x   x x x x  x x x o";
7405
        min_write_delay = 4500;
7406
        max_write_delay = 4500;
7407
      ;
7408
 
7409
    memory "calibration"
7410
        size            = 1;
7411
        read            = "0  0  1  1   1  0  0  0    x x x x  x x x x",
7412
                          "0  0  0  0   0  0  0  0    o o o o  o o o o";
7413
    ;
7414
 
7415
;
7416
 
7417
 
7418
#------------------------------------------------------------
7419
# ATtiny461
7420
#------------------------------------------------------------
7421
# Close to ATtiny261
7422
 
7423
part
7424
    id                  = "t461";
7425
    desc                = "ATTINY461";
7426
     has_debugwire = yes;
7427
     flash_instr   = 0xB4, 0x00, 0x10;
7428
     eeprom_instr  = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
7429
	             0xBC, 0x00, 0xB4, 0x00, 0xBA, 0x0D, 0xBB, 0xBC,
7430
	             0x99, 0xE1, 0xBB, 0xAC;
7431
#    stk500_devcode      = 0x21;
7432
#    avr910_devcode      = 0x5e;
7433
    signature           = 0x1e 0x92 0x08;
7434
    pagel               = 0xb3;
7435
    bs2                 = 0xb2;
7436
    chip_erase_delay    = 4000;
7437
 
7438
    pgm_enable          = "1 0 1 0  1 1 0 0   0 1 0 1  0 0 1 1",
7439
                          "x x x x  x x x x   x x x x  x x x x";
7440
 
7441
    chip_erase          = "1 0 1 0  1 1 0 0   1 0 0 x  x x x x",
7442
                          "x x x x  x x x x   x x x x  x x x x";
7443
 
7444
    timeout		= 200;
7445
    stabdelay		= 100;
7446
    cmdexedelay		= 25;
7447
    synchloops		= 32;
7448
    bytedelay		= 0;
7449
    pollindex		= 3;
7450
    pollvalue		= 0x53;
7451
    predelay		= 1;
7452
    postdelay		= 1;
7453
    pollmethod		= 0;
7454
 
7455
    pp_controlstack     =
7456
        0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC,
7457
        0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC,
7458
        0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C,
7459
        0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00;
7460
    hventerstabdelay    = 100;
7461
    progmodedelay       = 0;
7462
    latchcycles         = 5;
7463
    togglevtg           = 1;
7464
    poweroffdelay       = 15;
7465
    resetdelayms        = 2;
7466
    resetdelayus        = 0;
7467
    hvleavestabdelay    = 15;
7468
    chiperasepulsewidth = 0;
7469
    chiperasepolltimeout = 10;
7470
    programfusepulsewidth = 0;
7471
    programfusepolltimeout = 5;
7472
    programlockpulsewidth = 0;
7473
    programlockpolltimeout = 5;
7474
 
7475
    memory "eeprom"
7476
        paged           = no;
7477
        size            = 256;
7478
        page_size       = 4;
7479
        num_pages       = 64;
7480
        min_write_delay = 4000;
7481
        max_write_delay = 4000;
7482
        readback_p1     = 0xff;
7483
        readback_p2     = 0xff;
7484
 
7485
        read            = " 1  0  1  0   0  0  0  0    x x x x  x x x x",
7486
                          "a7 a6 a5 a4  a3 a2 a1 a0    o o o o  o o o o";
7487
 
7488
        write           = " 1  1  0  0   0  0  0  0    x x x x  x x x x",
7489
                          "a7 a6 a5 a4  a3 a2 a1 a0    i i i i  i i i i";
7490
 
7491
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
7492
			  "  0   0   0   0      0   0   0   0",
7493
			  "  0   0   0   0      0   0  a1  a0",
7494
			  "  i   i   i   i      i   i   i   i";
7495
 
7496
	writepage	= "  1   1   0   0      0   0   1   0",
7497
			  "  0   0   x   x      x   x   x   x",
7498
			  " a7  a6  a5  a4     a3  a2   0   0",
7499
			  "  x   x   x   x      x   x   x   x";
7500
 
7501
	mode		= 0x41;
7502
	delay		= 10;
7503
	blocksize	= 4;
7504
	readsize	= 256;
7505
    ;
7506
 
7507
    memory "flash"
7508
        paged           = yes;
7509
        size            = 4096;
7510
        page_size       = 64;
7511
        num_pages       = 64;
7512
        min_write_delay = 4500;
7513
        max_write_delay = 4500;
7514
        readback_p1     = 0xff;
7515
        readback_p2     = 0xff;
7516
 
7517
        read_lo         = "  0  0  1  0   0   0  0  0",
7518
                          "  x  x  x  x   x a10 a9 a8",
7519
                          " a7 a6 a5 a4  a3  a2 a1 a0",
7520
                          "  o  o  o  o   o   o  o  o";
7521
 
7522
        read_hi         = "  0  0  1  0   1   0  0  0",
7523
                          "  x  x  x  x   x a10 a9 a8",
7524
                          " a7 a6 a5 a4  a3  a2 a1 a0",
7525
                          "  o  o  o  o   o   o  o  o";
7526
 
7527
        loadpage_lo     = "  0  1  0  0   0  0  0  0",
7528
                          "  x  x  x  x   x  x  x  x",
7529
                          "  x  x  x a4  a3 a2 a1 a0",
7530
                          "  i  i  i  i   i  i  i  i";
7531
 
7532
        loadpage_hi     = "  0  1  0  0   1  0  0  0",
7533
                          "  x  x  x  x   x  x  x  x",
7534
                          "  x  x  x a4  a3 a2 a1 a0",
7535
                          "  i  i  i  i   i  i  i  i";
7536
 
7537
        writepage       = "  0  1  0  0   1   1  0  0",
7538
                          "  x  x  x  x   x a10 a9 a8",
7539
                          " a7 a6 a5  x   x   x  x  x",
7540
                          "  x  x  x  x   x   x  x  x";
7541
 
7542
	mode		= 0x41;
7543
	delay		= 6;
7544
	blocksize	= 64;
7545
	readsize	= 256;
7546
    ;
7547
 
7548
    memory "signature"
7549
        size            = 3;
7550
        read            = "0  0  1  1   0  0  0  0    x x x x  x x x x",
7551
                          "0  0  0  0   0  0 a1 a0    o o o o  o o o o";
7552
    ;
7553
 
7554
    memory "lock"
7555
        size            = 1;
7556
        read            = "0  1  0  1   1  0  0  0    x x x x  x x x x",
7557
                          "x  x  x  x   x  x  x  x    x x x x  x x o o";
7558
 
7559
        write           = "1  0  1  0   1  1  0  0    1 1 1 1  1 1 i i",
7560
                          "x  x  x  x   x  x  x  x    x x x x  x x x x";
7561
        min_write_delay = 4500;
7562
        max_write_delay = 4500;
7563
    ;
7564
 
7565
    memory "lfuse"
7566
        size            = 1;
7567
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
7568
                          "x x x x  x x x x  i i i i  i i i i";
7569
 
7570
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
7571
                          "x x x x  x x x x  o o o o  o o o o";
7572
        min_write_delay = 4500;
7573
        max_write_delay = 4500;
7574
      ;
7575
 
7576
    memory "hfuse"
7577
        size            = 1;
7578
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
7579
                          "x x x x  x x x x  i i i i  i i i i";
7580
 
7581
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
7582
                          "x x x x  x x x x  o o o o  o o o o";
7583
        min_write_delay = 4500;
7584
        max_write_delay = 4500;
7585
      ;
7586
 
7587
    memory "efuse"
7588
        size            = 1;
7589
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
7590
                          "x x x x  x x x x   x x x x  x x x i";
7591
 
7592
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
7593
                          "x x x x  x x x x   x x x x  x x x o";
7594
        min_write_delay = 4500;
7595
        max_write_delay = 4500;
7596
      ;
7597
 
7598
    memory "calibration"
7599
        size            = 1;
7600
        read            = "0  0  1  1   1  0  0  0    x x x x  x x x x",
7601
                          "0  0  0  0   0  0  0  0    o o o o  o o o o";
7602
    ;
7603
 
7604
;
7605
 
7606
 
7607
#------------------------------------------------------------
7608
# ATtiny861
7609
#------------------------------------------------------------
7610
# Close to ATtiny461
7611
 
7612
part
7613
    id                  = "t861";
7614
    desc                = "ATTINY861";
7615
     has_debugwire = yes;
7616
     flash_instr   = 0xB4, 0x00, 0x10;
7617
     eeprom_instr  = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
7618
	             0xBC, 0x00, 0xB4, 0x00, 0xBA, 0x0D, 0xBB, 0xBC,
7619
	             0x99, 0xE1, 0xBB, 0xAC;
7620
#    stk500_devcode      = 0x21;
7621
#    avr910_devcode      = 0x5e;
7622
    signature           = 0x1e 0x93 0x0d;
7623
    pagel               = 0xb3;
7624
    bs2                 = 0xb2;
7625
    chip_erase_delay    = 4000;
7626
 
7627
    pgm_enable          = "1 0 1 0  1 1 0 0   0 1 0 1  0 0 1 1",
7628
                          "x x x x  x x x x   x x x x  x x x x";
7629
 
7630
    chip_erase          = "1 0 1 0  1 1 0 0   1 0 0 x  x x x x",
7631
                          "x x x x  x x x x   x x x x  x x x x";
7632
 
7633
    timeout		= 200;
7634
    stabdelay		= 100;
7635
    cmdexedelay		= 25;
7636
    synchloops		= 32;
7637
    bytedelay		= 0;
7638
    pollindex		= 3;
7639
    pollvalue		= 0x53;
7640
    predelay		= 1;
7641
    postdelay		= 1;
7642
    pollmethod		= 0;
7643
 
7644
    pp_controlstack     =
7645
        0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC,
7646
        0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC,
7647
        0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C,
7648
        0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00;
7649
    hventerstabdelay    = 100;
7650
    progmodedelay       = 0;
7651
    latchcycles         = 5;
7652
    togglevtg           = 1;
7653
    poweroffdelay       = 15;
7654
    resetdelayms        = 2;
7655
    resetdelayus        = 0;
7656
    hvleavestabdelay    = 15;
7657
    chiperasepulsewidth = 0;
7658
    chiperasepolltimeout = 10;
7659
    programfusepulsewidth = 0;
7660
    programfusepolltimeout = 5;
7661
    programlockpulsewidth = 0;
7662
    programlockpolltimeout = 5;
7663
 
7664
    memory "eeprom"
7665
        paged           = no;
7666
        size            = 512;
7667
        num_pages       = 128;
7668
        page_size       = 4;
7669
        min_write_delay = 4000;
7670
        max_write_delay = 4000;
7671
        readback_p1     = 0xff;
7672
        readback_p2     = 0xff;
7673
 
7674
        read            = " 1  0  1  0   0  0  0  0    x x x x  x x x a8",
7675
                          "a7 a6 a5 a4  a3 a2 a1 a0    o o o o  o o o  o";
7676
 
7677
        write           = " 1  1  0  0   0  0  0  0    x x x x  x x x a8",
7678
                          "a7 a6 a5 a4  a3 a2 a1 a0    i i i i  i i i  i";
7679
 
7680
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
7681
			  "  0   0   0   0      0   0   0   0",
7682
			  "  0   0   0   0      0   0  a1  a0",
7683
			  "  i   i   i   i      i   i   i   i";
7684
 
7685
	writepage	= "  1   1   0   0      0   0   1   0",
7686
			  "  0   0   x   x      x   x   x  a8",
7687
			  " a7  a6  a5  a4     a3  a2   0   0",
7688
			  "  x   x   x   x      x   x   x   x";
7689
 
7690
	mode		= 0x41;
7691
	delay		= 10;
7692
	blocksize	= 4;
7693
	readsize	= 256;
7694
    ;
7695
 
7696
    memory "flash"
7697
        paged           = yes;
7698
        size            = 8192;
7699
        page_size       = 64;
7700
        num_pages       = 128;
7701
        min_write_delay = 4500;
7702
        max_write_delay = 4500;
7703
        readback_p1     = 0xff;
7704
        readback_p2     = 0xff;
7705
 
7706
        read_lo         = "  0  0  1  0   0   0  0  0",
7707
                          "  x  x  x  x a11 a10 a9 a8",
7708
                          " a7 a6 a5 a4  a3  a2 a1 a0",
7709
                          "  o  o  o  o   o   o  o  o";
7710
 
7711
        read_hi         = "  0  0  1  0   1   0  0  0",
7712
                          "  x  x  x  x a11 a10 a9 a8",
7713
                          " a7 a6 a5 a4  a3  a2 a1 a0",
7714
                          "  o  o  o  o   o   o  o  o";
7715
 
7716
        loadpage_lo     = "  0  1  0  0   0  0  0  0",
7717
                          "  x  x  x  x   x  x  x  x",
7718
                          "  x  x  x a4  a3 a2 a1 a0",
7719
                          "  i  i  i  i   i  i  i  i";
7720
 
7721
        loadpage_hi     = "  0  1  0  0   1  0  0  0",
7722
                          "  x  x  x  x   x  x  x  x",
7723
                          "  x  x  x a4  a3 a2 a1 a0",
7724
                          "  i  i  i  i   i  i  i  i";
7725
 
7726
        writepage       = "  0  1  0  0   1   1  0  0",
7727
                          "  x  x  x  x a11 a10 a9 a8",
7728
                          " a7 a6 a5  x   x   x  x  x",
7729
                          "  x  x  x  x   x   x  x  x";
7730
 
7731
	mode		= 0x41;
7732
	delay		= 6;
7733
	blocksize	= 64;
7734
	readsize	= 256;
7735
    ;
7736
 
7737
    memory "signature"
7738
        size            = 3;
7739
        read            = "0  0  1  1   0  0  0  0    x x x x  x x x x",
7740
                          "0  0  0  0   0  0 a1 a0    o o o o  o o o o";
7741
    ;
7742
 
7743
    memory "lock"
7744
        size            = 1;
7745
        read            = "0  1  0  1   1  0  0  0    x x x x  x x x x",
7746
                          "x  x  x  x   x  x  x  x    x x x x  x x o o";
7747
 
7748
        write           = "1  0  1  0   1  1  0  0    1 1 1 1  1 1 i i",
7749
                          "x  x  x  x   x  x  x  x    x x x x  x x x x";
7750
        min_write_delay = 4500;
7751
        max_write_delay = 4500;
7752
    ;
7753
 
7754
    memory "lfuse"
7755
        size            = 1;
7756
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
7757
                          "x x x x  x x x x  i i i i  i i i i";
7758
 
7759
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
7760
                          "x x x x  x x x x  o o o o  o o o o";
7761
        min_write_delay = 4500;
7762
        max_write_delay = 4500;
7763
      ;
7764
 
7765
    memory "hfuse"
7766
        size            = 1;
7767
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
7768
                          "x x x x  x x x x  i i i i  i i i i";
7769
 
7770
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
7771
                          "x x x x  x x x x  o o o o  o o o o";
7772
        min_write_delay = 4500;
7773
        max_write_delay = 4500;
7774
      ;
7775
 
7776
    memory "efuse"
7777
        size            = 1;
7778
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
7779
                          "x x x x  x x x x   x x x x  x x x i";
7780
 
7781
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
7782
                          "x x x x  x x x x   x x x x  x x x o";
7783
        min_write_delay = 4500;
7784
        max_write_delay = 4500;
7785
      ;
7786
 
7787
    memory "calibration"
7788
        size            = 1;
7789
        read            = "0  0  1  1   1  0  0  0    x x x x  x x x x",
7790
                          "0  0  0  0   0  0  0  0    o o o o  o o o o";
7791
    ;
7792
 
7793
;
7794
 
7795
 
7796
#------------------------------------------------------------
7797
# ATmega48
7798
#------------------------------------------------------------
7799
 
7800
part
7801
    id               = "m48";
7802
    desc             = "ATMEGA48";
7803
     has_debugwire = yes;
7804
     flash_instr   = 0xB6, 0x01, 0x11;
7805
     eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
7806
	             0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
7807
	             0x99, 0xF9, 0xBB, 0xAF;
7808
    stk500_devcode   = 0x59;
7809
#    avr910_devcode   = 0x;
7810
    signature        = 0x1e 0x92 0x05;
7811
    pagel            = 0xd7;
7812
    bs2              = 0xc2;
7813
    chip_erase_delay = 45000;
7814
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
7815
                       "x x x x  x x x x    x x x x  x x x x";
7816
 
7817
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
7818
                       "x x x x  x x x x    x x x x  x x x x";
7819
 
7820
    timeout		= 200;
7821
    stabdelay		= 100;
7822
    cmdexedelay		= 25;
7823
    synchloops		= 32;
7824
    bytedelay		= 0;
7825
    pollindex		= 3;
7826
    pollvalue		= 0x53;
7827
    predelay		= 1;
7828
    postdelay		= 1;
7829
    pollmethod		= 1;
7830
 
7831
    pp_controlstack     =
7832
	0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
7833
	0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
7834
	0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
7835
	0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
7836
    hventerstabdelay    = 100;
7837
    progmodedelay       = 0;
7838
    latchcycles         = 5;
7839
    togglevtg           = 1;
7840
    poweroffdelay       = 15;
7841
    resetdelayms        = 1;
7842
    resetdelayus        = 0;
7843
    hvleavestabdelay    = 15;
7844
    resetdelay          = 15;
7845
    chiperasepulsewidth = 0;
7846
    chiperasepolltimeout = 10;
7847
    programfusepulsewidth = 0;
7848
    programfusepolltimeout = 5;
7849
    programlockpulsewidth = 0;
7850
    programlockpolltimeout = 5;
7851
 
7852
    memory "eeprom"
7853
        paged           = no;
7854
        page_size       = 4;
7855
        size            = 256;
7856
        min_write_delay = 3600;
7857
        max_write_delay = 3600;
7858
        readback_p1     = 0xff;
7859
        readback_p2     = 0xff;
7860
	read            = "  1   0   1   0      0   0   0   0",
7861
                          "  0   0   0   x      x   x   x   x",
7862
                          " a7  a6  a5  a4     a3  a2  a1  a0",
7863
                          "  o   o   o   o      o   o   o   o";
7864
 
7865
	write           = "  1   1   0   0      0   0   0   0",
7866
                          "  0   0   0   x      x   x   x   x",
7867
                          " a7  a6  a5  a4     a3  a2  a1  a0",
7868
                          "  i   i   i   i      i   i   i   i";
7869
 
7870
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
7871
			  "  0   0   0   0      0   0   0   0",
7872
			  "  0   0   0   0      0   0  a1  a0",
7873
			  "  i   i   i   i      i   i   i   i";
7874
 
7875
	writepage	= "  1   1   0   0      0   0   1   0",
7876
			  "  0   0   x   x      x   x   x   x",
7877
			  " a7  a6  a5  a4     a3  a2   0   0",
7878
			  "  x   x   x   x      x   x   x   x";
7879
 
7880
	mode		= 0x41;
7881
	delay		= 5;
7882
	blocksize	= 4;
7883
	readsize	= 256;
7884
      ;
7885
    memory "flash"
7886
        paged           = yes;
7887
        size            = 4096;
7888
        page_size       = 64;
7889
        num_pages       = 64;
7890
        min_write_delay = 4500;
7891
        max_write_delay = 4500;
7892
        readback_p1     = 0x00;
7893
        readback_p2     = 0x00;
7894
        read_lo         = "  0   0   1   0    0   0   0   0",
7895
                          "  0   0   0   0    0 a10  a9  a8",
7896
                          " a7  a6  a5  a4   a3  a2  a1  a0",
7897
                          "  o   o   o   o    o   o   o   o";
7898
 
7899
        read_hi         = "  0   0   1   0    1   0   0   0",
7900
                          "  0   0   0   0    0 a10  a9  a8",
7901
                          " a7  a6  a5  a4   a3  a2  a1  a0",
7902
                          "  o   o   o   o    o   o   o   o";
7903
 
7904
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
7905
                          "  0   0   0   x      x   x   x   x",
7906
                          "  x   x   x  a4     a3  a2  a1  a0",
7907
                          "  i   i   i   i      i   i   i   i";
7908
 
7909
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
7910
                          "  0   0   0   x      x   x   x   x",
7911
                          "  x   x   x  a4     a3  a2  a1  a0",
7912
                          "  i   i   i   i      i   i   i   i";
7913
 
7914
        writepage       = "  0   1   0   0      1   1   0   0",
7915
                          "  0   0   0   0      0 a10  a9  a8",
7916
                          " a7  a6  a5   x      x   x   x   x",
7917
                          "  x   x   x   x      x   x   x   x";
7918
 
7919
	mode		= 0x41;
7920
	delay		= 6;
7921
	blocksize	= 64;
7922
	readsize	= 256;
7923
      ;
7924
 
7925
    memory "lfuse"
7926
        size            = 1;
7927
        min_write_delay = 4500;
7928
        max_write_delay = 4500;
7929
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
7930
                          "x x x x  x x x x   o o o o  o o o o";
7931
 
7932
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
7933
                          "x x x x  x x x x   i i i i  i i i i";
7934
      ;
7935
 
7936
    memory "hfuse"
7937
        size            = 1;
7938
        min_write_delay = 4500;
7939
        max_write_delay = 4500;
7940
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
7941
                          "x x x x  x x x x   o o o o  o o o o";
7942
 
7943
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
7944
                          "x x x x  x x x x   i i i i  i i i i";
7945
      ;
7946
 
7947
    memory "efuse"
7948
        size            = 1;
7949
        min_write_delay = 4500;
7950
        max_write_delay = 4500;
7951
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
7952
                          "x x x x  x x x x   x x x x  x x x o";
7953
 
7954
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
7955
                          "x x x x  x x x x   x x x x  x x x i";
7956
      ;
7957
 
7958
    memory "lock"
7959
        size            = 1;
7960
        min_write_delay = 4500;
7961
        max_write_delay = 4500;
7962
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
7963
                          "x x x x  x x x x   x x o o  o o o o";
7964
 
7965
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
7966
                          "x x x x  x x x x   1 1 i i  i i i i";
7967
      ;
7968
 
7969
    memory "calibration"
7970
        size            = 1;
7971
        read            = "0  0  1  1   1  0  0  0   0  0  0  x   x  x  x  x",
7972
                          "0  0  0  0   0  0  0  0   o  o  o  o   o  o  o  o";
7973
      ;
7974
 
7975
    memory "signature"
7976
        size            = 3;
7977
        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
7978
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
7979
      ;
7980
  ;
7981
 
7982
 
7983
#------------------------------------------------------------
7984
# ATmega88
7985
#------------------------------------------------------------
7986
 
7987
part
7988
    id               = "m88";
7989
    desc             = "ATMEGA88";
7990
     has_debugwire = yes;
7991
     flash_instr   = 0xB6, 0x01, 0x11;
7992
     eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
7993
	             0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
7994
	             0x99, 0xF9, 0xBB, 0xAF;
7995
    stk500_devcode   = 0x73;
7996
#    avr910_devcode   = 0x;
7997
    signature        = 0x1e 0x93 0x0a;
7998
    pagel            = 0xd7;
7999
    bs2              = 0xc2;
8000
    chip_erase_delay = 9000;
8001
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
8002
                       "x x x x  x x x x    x x x x  x x x x";
8003
 
8004
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
8005
                       "x x x x  x x x x    x x x x  x x x x";
8006
 
8007
    timeout		= 200;
8008
    stabdelay		= 100;
8009
    cmdexedelay		= 25;
8010
    synchloops		= 32;
8011
    bytedelay		= 0;
8012
    pollindex		= 3;
8013
    pollvalue		= 0x53;
8014
    predelay		= 1;
8015
    postdelay		= 1;
8016
    pollmethod		= 1;
8017
 
8018
    pp_controlstack     =
8019
	0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
8020
	0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
8021
	0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
8022
	0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
8023
    hventerstabdelay    = 100;
8024
    progmodedelay       = 0;
8025
    latchcycles         = 5;
8026
    togglevtg           = 1;
8027
    poweroffdelay       = 15;
8028
    resetdelayms        = 1;
8029
    resetdelayus        = 0;
8030
    hvleavestabdelay    = 15;
8031
    resetdelay          = 15;
8032
    chiperasepulsewidth = 0;
8033
    chiperasepolltimeout = 10;
8034
    programfusepulsewidth = 0;
8035
    programfusepolltimeout = 5;
8036
    programlockpulsewidth = 0;
8037
    programlockpolltimeout = 5;
8038
 
8039
    memory "eeprom"
8040
        paged           = no;
8041
        page_size       = 4;
8042
        size            = 512;
8043
        min_write_delay = 3600;
8044
        max_write_delay = 3600;
8045
        readback_p1     = 0xff;
8046
        readback_p2     = 0xff;
8047
	read            = "  1   0   1   0      0   0   0   0",
8048
                          "  0   0   0   x      x   x   x  a8",
8049
                          " a7  a6  a5  a4     a3  a2  a1  a0",
8050
                          "  o   o   o   o      o   o   o   o";
8051
 
8052
	write           = "  1   1   0   0      0   0   0   0",
8053
                          "  0   0   0   x      x   x   x  a8",
8054
                          " a7  a6  a5  a4     a3  a2  a1  a0",
8055
                          "  i   i   i   i      i   i   i   i";
8056
 
8057
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
8058
			  "  0   0   0   0      0   0   0   0",
8059
			  "  0   0   0   0      0   0  a1  a0",
8060
			  "  i   i   i   i      i   i   i   i";
8061
 
8062
	writepage	= "  1   1   0   0      0   0   1   0",
8063
			  "  0   0   x   x      x   x   x  a8",
8064
			  " a7  a6  a5  a4     a3  a2   0   0",
8065
			  "  x   x   x   x      x   x   x   x";
8066
 
8067
	mode		= 0x41;
8068
	delay		= 5;
8069
	blocksize	= 4;
8070
	readsize	= 256;
8071
      ;
8072
    memory "flash"
8073
        paged           = yes;
8074
        size            = 8192;
8075
        page_size       = 64;
8076
        num_pages       = 128;
8077
        min_write_delay = 4500;
8078
        max_write_delay = 4500;
8079
        readback_p1     = 0xff;
8080
        readback_p2     = 0xff;
8081
        read_lo         = "  0   0   1   0    0   0   0   0",
8082
                          "  0   0   0   0  a11 a10  a9  a8",
8083
                          " a7  a6  a5  a4   a3  a2  a1  a0",
8084
                          "  o   o   o   o    o   o   o   o";
8085
 
8086
        read_hi         = "  0   0   1   0    1   0   0   0",
8087
                          "  0   0   0   0  a11 a10  a9  a8",
8088
                          " a7  a6  a5  a4   a3  a2  a1  a0",
8089
                          "  o   o   o   o    o   o   o   o";
8090
 
8091
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
8092
                          "  0   0   0   x      x   x   x   x",
8093
                          "  x   x   x  a4     a3  a2  a1  a0",
8094
                          "  i   i   i   i      i   i   i   i";
8095
 
8096
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
8097
                          "  0   0   0   x      x   x   x   x",
8098
                          "  x   x   x  a4     a3  a2  a1  a0",
8099
                          "  i   i   i   i      i   i   i   i";
8100
 
8101
        writepage       = "  0   1   0   0      1   1   0   0",
8102
                          "  0   0   0   0    a11 a10  a9  a8",
8103
                          " a7  a6  a5   x      x   x   x   x",
8104
                          "  x   x   x   x      x   x   x   x";
8105
 
8106
	mode		= 0x41;
8107
	delay		= 6;
8108
	blocksize	= 64;
8109
	readsize	= 256;
8110
      ;
8111
 
8112
    memory "lfuse"
8113
        size            = 1;
8114
        min_write_delay = 4500;
8115
        max_write_delay = 4500;
8116
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
8117
                          "x x x x  x x x x   o o o o  o o o o";
8118
 
8119
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
8120
                          "x x x x  x x x x   i i i i  i i i i";
8121
      ;
8122
 
8123
    memory "hfuse"
8124
        size            = 1;
8125
        min_write_delay = 4500;
8126
        max_write_delay = 4500;
8127
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
8128
                          "x x x x  x x x x   o o o o  o o o o";
8129
 
8130
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
8131
                          "x x x x  x x x x   i i i i  i i i i";
8132
      ;
8133
 
8134
    memory "efuse"
8135
        size            = 1;
8136
        min_write_delay = 4500;
8137
        max_write_delay = 4500;
8138
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
8139
                          "x x x x  x x x x   x x x x  x o o o";
8140
 
8141
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
8142
                          "x x x x  x x x x   x x x x  x i i i";
8143
      ;
8144
 
8145
    memory "lock"
8146
        size            = 1;
8147
        min_write_delay = 4500;
8148
        max_write_delay = 4500;
8149
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
8150
                          "x x x x  x x x x   x x o o  o o o o";
8151
 
8152
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
8153
                          "x x x x  x x x x   1 1 i i  i i i i";
8154
      ;
8155
 
8156
    memory "calibration"
8157
        size            = 1;
8158
        read            = "0  0  1  1   1  0  0  0   0  0  0  x   x  x  x  x",
8159
                          "0  0  0  0   0  0  0  0   o  o  o  o   o  o  o  o";
8160
      ;
8161
 
8162
    memory "signature"
8163
        size            = 3;
8164
        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
8165
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
8166
      ;
8167
  ;
8168
 
8169
#------------------------------------------------------------
8170
# ATmega168
8171
#------------------------------------------------------------
8172
 
8173
part
8174
    id              = "m168";
8175
    desc            = "ATMEGA168";
8176
     has_debugwire = yes;
8177
     flash_instr   = 0xB6, 0x01, 0x11;
8178
     eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
8179
	             0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
8180
	             0x99, 0xF9, 0xBB, 0xAF;
8181
    stk500_devcode  = 0x86;
8182
    # avr910_devcode = 0x;
8183
    signature       = 0x1e 0x94 0x06;
8184
    pagel           = 0xd7;
8185
    bs2             = 0xc2;
8186
    chip_erase_delay = 9000;
8187
    pgm_enable       = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
8188
                       "x x x x x x x x x x x x x x x x";
8189
 
8190
    chip_erase       = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
8191
                       "x x x x x x x x x x x x x x x x";
8192
 
8193
    timeout         = 200;
8194
    stabdelay       = 100;
8195
    cmdexedelay     = 25;
8196
    synchloops      = 32;
8197
    bytedelay       = 0;
8198
    pollindex       = 3;
8199
    pollvalue       = 0x53;
8200
    predelay        = 1;
8201
    postdelay       = 1;
8202
    pollmethod      = 1;
8203
 
8204
    pp_controlstack     =
8205
	0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
8206
	0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
8207
	0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
8208
	0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
8209
    hventerstabdelay    = 100;
8210
    progmodedelay       = 0;
8211
    latchcycles         = 5;
8212
    togglevtg           = 1;
8213
    poweroffdelay       = 15;
8214
    resetdelayms        = 1;
8215
    resetdelayus        = 0;
8216
    hvleavestabdelay    = 15;
8217
    resetdelay          = 15;
8218
    chiperasepulsewidth = 0;
8219
    chiperasepolltimeout = 10;
8220
    programfusepulsewidth = 0;
8221
    programfusepolltimeout = 5;
8222
    programlockpulsewidth = 0;
8223
    programlockpolltimeout = 5;
8224
 
8225
    memory "eeprom"
8226
        paged           = no;
8227
        page_size       = 4;
8228
        size            = 512;
8229
        min_write_delay = 3600;
8230
        max_write_delay = 3600;
8231
        readback_p1     = 0xff;
8232
        readback_p2     = 0xff;
8233
        read            = " 1 0 1 0 0 0 0 0",
8234
                          " 0 0 0 x x x x a8",
8235
                          " a7 a6 a5 a4 a3 a2 a1 a0",
8236
                          " o o o o o o o o";
8237
 
8238
        write           = " 1 1 0 0 0 0 0 0",
8239
                          " 0 0 0 x x x x a8",
8240
                          " a7 a6 a5 a4 a3 a2 a1 a0",
8241
                          " i i i i i i i i";
8242
 
8243
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
8244
			  "  0   0   0   0      0   0   0   0",
8245
			  "  0   0   0   0      0   0  a1  a0",
8246
			  "  i   i   i   i      i   i   i   i";
8247
 
8248
	writepage	= "  1   1   0   0      0   0   1   0",
8249
			  "  0   0   x   x      x   x   x  a8",
8250
			  " a7  a6  a5  a4     a3  a2   0   0",
8251
			  "  x   x   x   x      x   x   x   x";
8252
 
8253
	mode		= 0x41;
8254
	delay		= 5;
8255
	blocksize	= 4;
8256
	readsize	= 256;
8257
        ;
8258
 
8259
    memory "flash"
8260
        paged           = yes;
8261
        size            = 16384;
8262
        page_size       = 128;
8263
        num_pages       = 128;
8264
        min_write_delay = 4500;
8265
        max_write_delay = 4500;
8266
        readback_p1     = 0xff;
8267
        readback_p2     = 0xff;
8268
        read_lo         = " 0 0 1 0 0 0 0 0",
8269
                          " 0 0 0 a12 a11 a10 a9 a8",
8270
                          " a7 a6 a5 a4 a3 a2 a1 a0",
8271
                          " o o o o o o o o";
8272
 
8273
        read_hi          = " 0 0 1 0 1 0 0 0",
8274
                           " 0 0 0 a12 a11 a10 a9 a8",
8275
                           " a7 a6 a5 a4 a3 a2 a1 a0",
8276
                           " o o o o o o o o";
8277
 
8278
        loadpage_lo     = " 0 1 0 0 0 0 0 0",
8279
                          " 0 0 0 x x x x x",
8280
                          " x x a5 a4 a3 a2 a1 a0",
8281
                          " i i i i i i i i";
8282
 
8283
        loadpage_hi     = " 0 1 0 0 1 0 0 0",
8284
                          " 0 0 0 x x x x x",
8285
                          " x x a5 a4 a3 a2 a1 a0",
8286
                          " i i i i i i i i";
8287
 
8288
        writepage       = " 0 1 0 0 1 1 0 0",
8289
                          " 0 0 0 a12 a11 a10 a9 a8",
8290
                          " a7 a6 x x x x x x",
8291
                          " x x x x x x x x";
8292
 
8293
        mode        = 0x41;
8294
        delay       = 6;
8295
        blocksize   = 128;
8296
        readsize    = 256;
8297
 
8298
        ;
8299
 
8300
    memory "lfuse"
8301
        size            = 1;
8302
        min_write_delay = 4500;
8303
        max_write_delay = 4500;
8304
        read            = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
8305
                          "x x x x x x x x o o o o o o o o";
8306
 
8307
        write           = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
8308
                          "x x x x x x x x i i i i i i i i";
8309
        ;
8310
 
8311
    memory "hfuse"
8312
        size            = 1;
8313
        min_write_delay = 4500;
8314
        max_write_delay = 4500;
8315
        read            = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
8316
                          "x x x x x x x x o o o o o o o o";
8317
 
8318
        write           = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
8319
                          "x x x x x x x x i i i i i i i i";
8320
        ;
8321
 
8322
    memory "efuse"
8323
        size            = 1;
8324
        min_write_delay = 4500;
8325
        max_write_delay = 4500;
8326
        read            = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
8327
                          "x x x x x x x x x x x x x o o o";
8328
 
8329
        write           = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
8330
                          "x x x x x x x x x x x x x i i i";
8331
        ;
8332
 
8333
    memory "lock"
8334
        size            = 1;
8335
        min_write_delay = 4500;
8336
        max_write_delay = 4500;
8337
        read            = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
8338
                          "x x x x x x x x x x o o o o o o";
8339
 
8340
        write           = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
8341
                          "x x x x x x x x 1 1 i i i i i i";
8342
        ;
8343
 
8344
    memory "calibration"
8345
        size            = 1;
8346
        read            = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
8347
                          "0 0 0 0 0 0 0 0 o o o o o o o o";
8348
        ;
8349
 
8350
    memory "signature"
8351
        size            = 3;
8352
        read            = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
8353
                          "x x x x x x a1 a0 o o o o o o o o";
8354
        ;
8355
;
8356
 
8357
#------------------------------------------------------------
8358
# ATtiny88
8359
#------------------------------------------------------------
8360
 
8361
part
8362
    id               = "t88";
8363
    desc             = "attiny88";
8364
     has_debugwire = yes;
8365
     flash_instr   = 0xB6, 0x01, 0x11;
8366
     eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
8367
	             0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
8368
	             0x99, 0xF9, 0xBB, 0xAF;
8369
    stk500_devcode   = 0x73;
8370
#    avr910_devcode   = 0x;
8371
    signature        = 0x1e 0x93 0x11;
8372
    pagel            = 0xd7;
8373
    bs2              = 0xc2;
8374
    chip_erase_delay = 9000;
8375
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
8376
                       "x x x x  x x x x    x x x x  x x x x";
8377
 
8378
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
8379
                       "x x x x  x x x x    x x x x  x x x x";
8380
 
8381
    timeout		= 200;
8382
    stabdelay		= 100;
8383
    cmdexedelay		= 25;
8384
    synchloops		= 32;
8385
    bytedelay		= 0;
8386
    pollindex		= 3;
8387
    pollvalue		= 0x53;
8388
    predelay		= 1;
8389
    postdelay		= 1;
8390
    pollmethod		= 1;
8391
 
8392
    pp_controlstack     =
8393
	0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
8394
	0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
8395
	0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
8396
	0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
8397
    hventerstabdelay    = 100;
8398
    progmodedelay       = 0;
8399
    latchcycles         = 5;
8400
    togglevtg           = 1;
8401
    poweroffdelay       = 15;
8402
    resetdelayms        = 1;
8403
    resetdelayus        = 0;
8404
    hvleavestabdelay    = 15;
8405
    resetdelay          = 15;
8406
    chiperasepulsewidth = 0;
8407
    chiperasepolltimeout = 10;
8408
    programfusepulsewidth = 0;
8409
    programfusepolltimeout = 5;
8410
    programlockpulsewidth = 0;
8411
    programlockpolltimeout = 5;
8412
 
8413
    memory "eeprom"
8414
        paged           = no;
8415
        page_size       = 4;
8416
        size            = 64;
8417
        min_write_delay = 3600;
8418
        max_write_delay = 3600;
8419
        readback_p1     = 0xff;
8420
        readback_p2     = 0xff;
8421
	read            = "  1   0   1   0      0   0   0   0",
8422
                          "  0   0   0   x      x   x   x   x",
8423
                          "  x  a6  a5  a4     a3  a2  a1  a0",
8424
                          "  o   o   o   o      o   o   o   o";
8425
 
8426
	write           = "  1   1   0   0      0   0   0   0",
8427
                          "  0   0   0   x      x   x   x   x",
8428
                          "  x  a6  a5  a4     a3  a2  a1  a0",
8429
                          "  i   i   i   i      i   i   i   i";
8430
 
8431
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
8432
			  "  0   0   0   0      0   0   0   0",
8433
			  "  0   0   0   0      0   0  a1  a0",
8434
			  "  i   i   i   i      i   i   i   i";
8435
 
8436
	writepage	= "  1   1   0   0      0   0   1   0",
8437
			  "  0   0   x   x      x   x   x   x",
8438
			  "  x  a6  a5  a4     a3  a2   0   0",
8439
			  "  x   x   x   x      x   x   x   x";
8440
 
8441
	mode		= 0x41;
8442
	delay		= 5;
8443
	blocksize	= 4;
8444
	readsize	= 64;
8445
      ;
8446
    memory "flash"
8447
        paged           = yes;
8448
        size            = 8192;
8449
        page_size       = 64;
8450
        num_pages       = 128;
8451
        min_write_delay = 4500;
8452
        max_write_delay = 4500;
8453
        readback_p1     = 0xff;
8454
        readback_p2     = 0xff;
8455
        read_lo         = "  0   0   1   0    0   0   0   0",
8456
                          "  0   0   0   0  a11 a10  a9  a8",
8457
                          " a7  a6  a5  a4   a3  a2  a1  a0",
8458
                          "  o   o   o   o    o   o   o   o";
8459
 
8460
        read_hi         = "  0   0   1   0    1   0   0   0",
8461
                          "  0   0   0   0  a11 a10  a9  a8",
8462
                          " a7  a6  a5  a4   a3  a2  a1  a0",
8463
                          "  o   o   o   o    o   o   o   o";
8464
 
8465
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
8466
                          "  0   0   0   x      x   x   x   x",
8467
                          "  x   x   x  a4     a3  a2  a1  a0",
8468
                          "  i   i   i   i      i   i   i   i";
8469
 
8470
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
8471
                          "  0   0   0   x      x   x   x   x",
8472
                          "  x   x   x  a4     a3  a2  a1  a0",
8473
                          "  i   i   i   i      i   i   i   i";
8474
 
8475
        writepage       = "  0   1   0   0      1   1   0   0",
8476
                          "  0   0   0   0    a11 a10  a9  a8",
8477
                          " a7  a6  a5   x      x   x   x   x",
8478
                          "  x   x   x   x      x   x   x   x";
8479
 
8480
	mode		= 0x41;
8481
	delay		= 6;
8482
	blocksize	= 64;
8483
	readsize	= 256;
8484
      ;
8485
 
8486
    memory "lfuse"
8487
        size            = 1;
8488
        min_write_delay = 4500;
8489
        max_write_delay = 4500;
8490
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
8491
                          "x x x x  x x x x   o o o o  o o o o";
8492
 
8493
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
8494
                          "x x x x  x x x x   i i i i  i i i i";
8495
      ;
8496
 
8497
    memory "hfuse"
8498
        size            = 1;
8499
        min_write_delay = 4500;
8500
        max_write_delay = 4500;
8501
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
8502
                          "x x x x  x x x x   o o o o  o o o o";
8503
 
8504
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
8505
                          "x x x x  x x x x   i i i i  i i i i";
8506
      ;
8507
 
8508
    memory "efuse"
8509
        size            = 1;
8510
        min_write_delay = 4500;
8511
        max_write_delay = 4500;
8512
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
8513
                          "x x x x  x x x x   x x x x  x o o o";
8514
 
8515
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
8516
                          "x x x x  x x x x   x x x x  x x x i";
8517
      ;
8518
 
8519
    memory "lock"
8520
        size            = 1;
8521
        min_write_delay = 4500;
8522
        max_write_delay = 4500;
8523
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
8524
                          "x x x x  x x x x   x x o o  o o o o";
8525
 
8526
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
8527
                          "x x x x  x x x x   1 1 i i  i i i i";
8528
      ;
8529
 
8530
    memory "calibration"
8531
        size            = 1;
8532
        read            = "0  0  1  1   1  0  0  0   0  0  0  x   x  x  x  x",
8533
                          "0  0  0  0   0  0  0  0   o  o  o  o   o  o  o  o";
8534
      ;
8535
 
8536
    memory "signature"
8537
        size            = 3;
8538
        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
8539
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
8540
      ;
8541
  ;
8542
 
8543
#------------------------------------------------------------
8544
# ATmega328P
8545
#------------------------------------------------------------
8546
 
8547
part
8548
    id			= "m328p";
8549
    desc		= "ATMEGA328P";
8550
    has_debugwire	= yes;
8551
    flash_instr		= 0xB6, 0x01, 0x11;
8552
    eeprom_instr	= 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
8553
			  0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
8554
			  0x99, 0xF9, 0xBB, 0xAF;
8555
    stk500_devcode	= 0x86;
8556
    # avr910_devcode	= 0x;
8557
    signature		= 0x1e 0x95 0x0F;
8558
    pagel		= 0xd7;
8559
    bs2			= 0xc2;
8560
    chip_erase_delay	= 9000;
8561
    pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
8562
		 "x x x x x x x x x x x x x x x x";
8563
 
8564
    chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
8565
		 "x x x x x x x x x x x x x x x x";
8566
 
8567
    timeout	= 200;
8568
    stabdelay	= 100;
8569
    cmdexedelay	= 25;
8570
    synchloops	= 32;
8571
    bytedelay	= 0;
8572
    pollindex	= 3;
8573
    pollvalue	= 0x53;
8574
    predelay	= 1;
8575
    postdelay	= 1;
8576
    pollmethod	= 1;
8577
 
8578
    pp_controlstack =
8579
	0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
8580
	0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
8581
	0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
8582
	0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
8583
    hventerstabdelay	= 100;
8584
    progmodedelay	= 0;
8585
    latchcycles		= 5;
8586
    togglevtg		= 1;
8587
    poweroffdelay	= 15;
8588
    resetdelayms	= 1;
8589
    resetdelayus	= 0;
8590
    hvleavestabdelay	= 15;
8591
    resetdelay		= 15;
8592
    chiperasepulsewidth	= 0;
8593
    chiperasepolltimeout = 10;
8594
    programfusepulsewidth = 0;
8595
    programfusepolltimeout = 5;
8596
    programlockpulsewidth = 0;
8597
    programlockpolltimeout = 5;
8598
 
8599
    memory "eeprom"
8600
	paged		= no;
8601
	page_size	= 4;
8602
	size		= 1024;
8603
	min_write_delay = 3600;
8604
	max_write_delay = 3600;
8605
	readback_p1	= 0xff;
8606
	readback_p2	= 0xff;
8607
	read = " 1 0 1 0 0 0 0 0",
8608
	       " 0 0 0 x x x a9 a8",
8609
	       " a7 a6 a5 a4 a3 a2 a1 a0",
8610
	       " o o o o o o o o";
8611
 
8612
	write = " 1 1 0 0 0 0 0 0",
8613
	      	" 0 0 0 x x x a9 a8",
8614
		" a7 a6 a5 a4 a3 a2 a1 a0",
8615
		" i i i i i i i i";
8616
 
8617
	loadpage_lo = " 1 1 0 0 0 0 0 1",
8618
		      " 0 0 0 0 0 0 0 0",
8619
		      " 0 0 0 0 0 0 a1 a0",
8620
		      " i i i i i i i i";
8621
 
8622
	writepage = " 1 1 0 0 0 0 1 0",
8623
		    " 0 0 x x x x a9 a8",
8624
		    " a7 a6 a5 a4 a3 a2 0 0",
8625
		    " x x x x x x x x";
8626
 
8627
	mode		= 0x41;
8628
	delay		= 5;
8629
	blocksize	= 4;
8630
	readsize	= 256;
8631
    ;
8632
 
8633
    memory "flash"
8634
	paged		= yes;
8635
	size		= 32768;
8636
	page_size	= 128;
8637
	num_pages	= 256;
8638
	min_write_delay = 4500;
8639
	max_write_delay = 4500;
8640
	readback_p1	= 0xff;
8641
	readback_p2	= 0xff;
8642
	read_lo = " 0 0 1 0 0 0 0 0",
8643
		  " 0 0 a13 a12 a11 a10 a9 a8",
8644
		  " a7 a6 a5 a4 a3 a2 a1 a0",
8645
		  " o o o o o o o o";
8646
 
8647
	read_hi = " 0 0 1 0 1 0 0 0",
8648
		  " 0 0 a13 a12 a11 a10 a9 a8",
8649
		  " a7 a6 a5 a4 a3 a2 a1 a0",
8650
		  " o o o o o o o o";
8651
 
8652
	loadpage_lo = " 0 1 0 0 0 0 0 0",
8653
		      " 0 0 0 x x x x x",
8654
		      " x x a5 a4 a3 a2 a1 a0",
8655
		      " i i i i i i i i";
8656
 
8657
	loadpage_hi = " 0 1 0 0 1 0 0 0",
8658
		      " 0 0 0 x x x x x",
8659
		      " x x a5 a4 a3 a2 a1 a0",
8660
		      " i i i i i i i i";
8661
 
8662
	writepage = " 0 1 0 0 1 1 0 0",
8663
		    " 0 0 a13 a12 a11 a10 a9 a8",
8664
		    " a7 a6 x x x x x x",
8665
		    " x x x x x x x x";
8666
 
8667
	mode		= 0x41;
8668
	delay		= 6;
8669
	blocksize	= 128;
8670
	readsize	= 256;
8671
 
8672
    ;
8673
 
8674
    memory "lfuse"
8675
	size = 1;
8676
	min_write_delay = 4500;
8677
	max_write_delay = 4500;
8678
	read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
8679
	       "x x x x x x x x o o o o o o o o";
8680
 
8681
	write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
8682
	      	"x x x x x x x x i i i i i i i i";
8683
    ;
8684
 
8685
    memory "hfuse"
8686
	size = 1;
8687
	min_write_delay = 4500;
8688
	max_write_delay = 4500;
8689
	read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
8690
	       "x x x x x x x x o o o o o o o o";
8691
 
8692
	write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
8693
	      	"x x x x x x x x i i i i i i i i";
8694
    ;
8695
 
8696
    memory "efuse"
8697
	size = 1;
8698
	min_write_delay = 4500;
8699
	max_write_delay = 4500;
8700
	read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
8701
	       "x x x x x x x x x x x x x o o o";
8702
 
8703
	write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
8704
	      	"x x x x x x x x x x x x x i i i";
8705
    ;
8706
 
8707
    memory "lock"
8708
	size = 1;
8709
	min_write_delay = 4500;
8710
	max_write_delay = 4500;
8711
	read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
8712
	       "x x x x x x x x x x o o o o o o";
8713
 
8714
	write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
8715
	      	"x x x x x x x x 1 1 i i i i i i";
8716
    ;
8717
 
8718
    memory "calibration"
8719
	size = 1;
8720
	read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
8721
	       "0 0 0 0 0 0 0 0 o o o o o o o o";
8722
    ;
8723
 
8724
    memory "signature"
8725
	size = 3;
8726
	read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
8727
	       "x x x x x x a1 a0 o o o o o o o o";
8728
    ;
8729
;
8730
 
8731
#------------------------------------------------------------
8732
# ATtiny2313
8733
#------------------------------------------------------------
8734
 
8735
part
8736
     id            = "t2313";
8737
     desc          = "ATtiny2313";
8738
     has_debugwire = yes;
8739
     flash_instr   = 0xB2, 0x0F, 0x1F;
8740
     eeprom_instr  = 0xBB, 0xFE, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
8741
	             0xBA, 0x0F, 0xB2, 0x0F, 0xBA, 0x0D, 0xBB, 0xBC,
8742
	             0x99, 0xE1, 0xBB, 0xAC;
8743
     stk500_devcode   = 0x23;
8744
##   Use the ATtiny26 devcode:
8745
     avr910_devcode   = 0x5e;
8746
     signature        = 0x1e 0x91 0x0a;
8747
     pagel            = 0xD4;
8748
     bs2              = 0xD6;
8749
     reset            = io;
8750
     chip_erase_delay = 9000;
8751
 
8752
     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
8753
                        "x x x x  x x x x    x x x x  x x x x";
8754
 
8755
     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
8756
                        "x x x x  x x x x    x x x x  x x x x";
8757
 
8758
    timeout		= 200;
8759
    stabdelay		= 100;
8760
    cmdexedelay		= 25;
8761
    synchloops		= 32;
8762
    bytedelay		= 0;
8763
    pollindex		= 3;
8764
    pollvalue		= 0x53;
8765
    predelay		= 1;
8766
    postdelay		= 1;
8767
    pollmethod		= 1;
8768
 
8769
    pp_controlstack     =
8770
        0x0E, 0x1E, 0x0E, 0x1E, 0x2E, 0x3E, 0x2E, 0x3E,
8771
        0x4E, 0x5E, 0x4E, 0x5E, 0x6E, 0x7E, 0x6E, 0x7E,
8772
        0x26, 0x36, 0x66, 0x76, 0x2A, 0x3A, 0x6A, 0x7A,
8773
        0x2E, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
8774
    hventerstabdelay    = 100;
8775
    progmodedelay       = 0;
8776
    latchcycles         = 5;
8777
    togglevtg           = 1;
8778
    poweroffdelay       = 15;
8779
    resetdelayms        = 1;
8780
    resetdelayus        = 0;
8781
    hvleavestabdelay    = 15;
8782
    chiperasepulsewidth = 0;
8783
    chiperasepolltimeout = 10;
8784
    programfusepulsewidth = 0;
8785
    programfusepolltimeout = 5;
8786
    programlockpulsewidth = 0;
8787
    programlockpolltimeout = 5;
8788
 
8789
     memory "eeprom"
8790
         size            = 128;
8791
        paged           = no;
8792
        page_size       = 4;
8793
         min_write_delay = 4000;
8794
         max_write_delay = 4500;
8795
         readback_p1     = 0xff;
8796
         readback_p2     = 0xff;
8797
         read            = "1  0  1  0   0  0  0  0   0 0 0 x  x x x x",
8798
                           "x a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
8799
 
8800
         write           = "1  1  0  0   0  0  0  0   0 0 0 x  x x x x",
8801
                           "x a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
8802
 
8803
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
8804
			  "  0   0   0   0      0   0   0   0",
8805
			  "  0   0   0   0      0   0  a1  a0",
8806
			  "  i   i   i   i      i   i   i   i";
8807
 
8808
	writepage	= "  1   1   0   0      0   0   1   0",
8809
			  "  0   0   x   x      x   x   x   x",
8810
			  "  x  a6  a5  a4     a3  a2   0   0",
8811
			  "  x   x   x   x      x   x   x   x";
8812
 
8813
	mode		= 0x41;
8814
	delay		= 6;
8815
	blocksize	= 4;
8816
	readsize	= 256;
8817
       ;
8818
     memory "flash"
8819
         paged           = yes;
8820
         size            = 2048;
8821
         page_size       = 32;
8822
         num_pages       = 64;
8823
         min_write_delay = 4500;
8824
         max_write_delay = 4500;
8825
         readback_p1     = 0xff;
8826
         readback_p2     = 0xff;
8827
         read_lo         = "  0   0   1   0    0   0   0   0",
8828
                           "  0   0   0   0    0   0  a9  a8",
8829
                           " a7  a6  a5  a4   a3  a2  a1  a0",
8830
                           "  o   o   o   o    o   o   o   o";
8831
 
8832
         read_hi         = "  0   0   1   0    1   0   0   0",
8833
                           "  0   0   0   0    0   0  a9  a8",
8834
                           " a7  a6  a5  a4   a3  a2  a1  a0",
8835
                           "  o   o   o   o    o   o   o   o";
8836
 
8837
# The information in the data sheet of April/2004 is wrong, this works:
8838
         loadpage_lo     = "  0   1   0   0    0   0   0   0",
8839
                           "  0   0   0   x    x   x   x   x",
8840
                           "  x   x   x   x   a3  a2  a1  a0",
8841
                           "  i   i   i   i    i   i   i   i";
8842
 
8843
# The information in the data sheet of April/2004 is wrong, this works:
8844
         loadpage_hi     = "  0   1   0   0    1   0   0   0",
8845
                           "  0   0   0   x    x   x   x   x",
8846
                           "  x   x   x   x   a3  a2  a1  a0",
8847
                           "  i   i   i   i    i   i   i   i";
8848
 
8849
# The information in the data sheet of April/2004 is wrong, this works:
8850
         writepage       = "  0  1  0  0   1  1  0  0",
8851
                           "  0  0  0  0   0  0 a9 a8",
8852
                           " a7 a6 a5 a4   x  x  x  x",
8853
                           "  x  x  x  x   x  x  x  x";
8854
 
8855
	mode		= 0x41;
8856
	delay		= 6;
8857
	blocksize	= 32;
8858
	readsize	= 256;
8859
       ;
8860
#   ATtiny2313 has Signature Bytes: 0x1E 0x91 0x0A.
8861
     memory "signature"
8862
         size            = 3;
8863
         read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
8864
                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
8865
       ;
8866
     memory "lock"
8867
         size            = 1;
8868
         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
8869
                           "x x x x  x x x x  1 1 i i  i i i i";
8870
         read           = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
8871
                          "x x x x  x x x x  x x o o  o o o o";
8872
        min_write_delay = 9000;
8873
        max_write_delay = 9000;
8874
       ;
8875
 
8876
     memory "lfuse"
8877
         size            = 1;
8878
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
8879
                           "x x x x  x x x x  i i i i  i i i i";
8880
 
8881
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
8882
                           "x x x x  x x x x  o o o o  o o o o";
8883
        min_write_delay = 9000;
8884
        max_write_delay = 9000;
8885
       ;
8886
 
8887
     memory "hfuse"
8888
         size            = 1;
8889
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
8890
                           "x x x x  x x x x  i i i i  i i i i";
8891
 
8892
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
8893
                           "x x x x  x x x x  o o o o  o o o o";
8894
        min_write_delay = 9000;
8895
        max_write_delay = 9000;
8896
       ;
8897
 
8898
     memory "efuse"
8899
         size            = 1;
8900
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
8901
                           "x x x x  x x x x  x x x x  x x x i";
8902
 
8903
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
8904
                           "x x x x  x x x x  o o o o  o o o o";
8905
        min_write_delay = 9000;
8906
        max_write_delay = 9000;
8907
     ;
8908
# The Tiny2313 has calibration data for both 4 MHz and 8 MHz.
8909
# The information in the data sheet of April/2004 is wrong, this works:
8910
 
8911
     memory "calibration"
8912
         size            = 2;
8913
         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
8914
                           "0  0  0  0   0  0  0  a0   o o o o  o o o o";
8915
     ;
8916
  ;
8917
 
8918
#------------------------------------------------------------
8919
# AT90PWM2
8920
#------------------------------------------------------------
8921
 
8922
part
8923
     id            = "pwm2";
8924
     desc          = "AT90PWM2";
8925
     has_debugwire = yes;
8926
     flash_instr   = 0xB6, 0x01, 0x11;
8927
     eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
8928
	             0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
8929
	             0x99, 0xF9, 0xBB, 0xAF;
8930
     stk500_devcode   = 0x65;
8931
##  avr910_devcode   = ?;
8932
     signature        = 0x1e 0x93 0x81;
8933
     pagel            = 0xD8;
8934
     bs2              = 0xE2;
8935
     reset            = io;
8936
     chip_erase_delay = 9000;
8937
 
8938
     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
8939
                        "x x x x  x x x x    x x x x  x x x x";
8940
 
8941
     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
8942
                        "x x x x  x x x x    x x x x  x x x x";
8943
 
8944
    timeout		= 200;
8945
    stabdelay		= 100;
8946
    cmdexedelay		= 25;
8947
    synchloops		= 32;
8948
    bytedelay		= 0;
8949
    pollindex		= 3;
8950
    pollvalue		= 0x53;
8951
    predelay		= 1;
8952
    postdelay		= 1;
8953
    pollmethod		= 1;
8954
 
8955
    pp_controlstack     =
8956
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
8957
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
8958
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
8959
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
8960
    hventerstabdelay    = 100;
8961
    progmodedelay       = 0;
8962
    latchcycles         = 5;
8963
    togglevtg           = 1;
8964
    poweroffdelay       = 15;
8965
    resetdelayms        = 1;
8966
    resetdelayus        = 0;
8967
    hvleavestabdelay    = 15;
8968
    chiperasepulsewidth = 0;
8969
    chiperasepolltimeout = 10;
8970
    programfusepulsewidth = 0;
8971
    programfusepolltimeout = 5;
8972
    programlockpulsewidth = 0;
8973
    programlockpolltimeout = 5;
8974
 
8975
     memory "eeprom"
8976
         size            = 512;
8977
        paged           = no;
8978
        page_size       = 4;
8979
         min_write_delay = 4000;
8980
         max_write_delay = 4500;
8981
         readback_p1     = 0xff;
8982
         readback_p2     = 0xff;
8983
         read            = "1  0  1  0   0  0  0  0   0 0 0 x  x x x a8",
8984
                           "a7 a6 a5 a4  a3 a2 a1 a0  o o o o  o o o o";
8985
 
8986
         write           = "1  1  0  0   0  0  0  0   0 0 0 x  x x x a8",
8987
                           "a7 a6 a5 a4  a3 a2 a1 a0  i i i i  i i i i";
8988
 
8989
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
8990
			  "  0   0   0   0      0   0   0   0",
8991
			  "  0   0   0   0      0   0  a1  a0",
8992
			  "  i   i   i   i      i   i   i   i";
8993
 
8994
	writepage	= "  1   1   0   0      0   0   1   0",
8995
			  "  0   0   x   x      x   x   x   x",
8996
			  " a7  a6  a5  a4     a3  a2   0   0",
8997
			  "  x   x   x   x      x   x   x   x";
8998
 
8999
	mode		= 0x41;
9000
	delay		= 6;
9001
	blocksize	= 4;
9002
	readsize	= 256;
9003
       ;
9004
     memory "flash"
9005
         paged           = yes;
9006
         size            = 8192;
9007
         page_size       = 64;
9008
         num_pages       = 128;
9009
         min_write_delay = 4500;
9010
         max_write_delay = 4500;
9011
         readback_p1     = 0xff;
9012
         readback_p2     = 0xff;
9013
         read_lo         = "  0   0   1   0    0   0   0   0",
9014
                           "  0   0   0   0   a11 a10 a9  a8",
9015
                           " a7  a6  a5  a4   a3  a2  a1  a0",
9016
                           "  o   o   o   o    o   o   o   o";
9017
 
9018
         read_hi         = "  0   0   1   0    1   0   0   0",
9019
                           "  0   0   0   0   a11 a10 a9  a8",
9020
                           " a7  a6  a5  a4   a3  a2  a1  a0",
9021
                           "  o   o   o   o    o   o   o   o";
9022
 
9023
         loadpage_lo     = "  0   1   0   0    0   0   0   0",
9024
                           "  0   0   0   x    x   x   x   x",
9025
                           "  x   x   x  a4   a3  a2  a1  a0",
9026
                           "  i   i   i   i    i   i   i   i";
9027
 
9028
         loadpage_hi     = "  0   1   0   0    1   0   0   0",
9029
                           "  0   0   0   x    x   x   x   x",
9030
                           "  x   x   x  a4   a3  a2  a1  a0",
9031
                           "  i   i   i   i    i   i   i   i";
9032
 
9033
         writepage       = "  0  1  0  0   1   1   0   0",
9034
                           "  0  0  0  0   a11 a10 a9  a8",
9035
                           " a7 a6 a5  x   x   x   x   x",
9036
                           "  x  x  x  x   x   x   x   x";
9037
 
9038
	mode		= 0x41;
9039
	delay		= 6;
9040
	blocksize	= 64;
9041
	readsize	= 256;
9042
       ;
9043
#   AT90PWM2 has Signature Bytes: 0x1E 0x93 0x81.
9044
     memory "signature"
9045
         size            = 3;
9046
         read            = "0  0  1  1   0  0  0  0   0  0  x  x   x  x  x  x",
9047
                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
9048
       ;
9049
     memory "lock"
9050
         size            = 1;
9051
         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
9052
                           "x x x x  x x x x  1 1 i i  i i i i";
9053
 
9054
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
9055
                           "x x x x  x x x x  x x o o  o o o o";
9056
        min_write_delay = 9000;
9057
        max_write_delay = 9000;
9058
       ;
9059
 
9060
     memory "lfuse"
9061
         size            = 1;
9062
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
9063
                           "x x x x  x x x x  i i i i  i i i i";
9064
 
9065
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
9066
                           "x x x x  x x x x  o o o o  o o o o";
9067
        min_write_delay = 9000;
9068
        max_write_delay = 9000;
9069
       ;
9070
 
9071
     memory "hfuse"
9072
         size            = 1;
9073
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
9074
                           "x x x x  x x x x  i i i i  i i i i";
9075
 
9076
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
9077
                           "x x x x  x x x x  o o o o  o o o o";
9078
        min_write_delay = 9000;
9079
        max_write_delay = 9000;
9080
       ;
9081
 
9082
     memory "efuse"
9083
         size            = 1;
9084
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
9085
                           "x x x x  x x x x  x x x x  x x x i";
9086
 
9087
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
9088
                           "x x x x  x x x x  o o o o  o o o o";
9089
        min_write_delay = 9000;
9090
        max_write_delay = 9000;
9091
     ;
9092
 
9093
     memory "calibration"
9094
         size            = 1;
9095
         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
9096
                           "0  0  0  0   0  0  0  0    o o o o  o o o o";
9097
     ;
9098
  ;
9099
 
9100
#------------------------------------------------------------
9101
# AT90PWM3
9102
#------------------------------------------------------------
9103
 
9104
# Completely identical to AT90PWM2 (including the signature!)
9105
 
9106
part
9107
     id            = "pwm3";
9108
     desc          = "AT90PWM3";
9109
     has_debugwire = yes;
9110
     flash_instr   = 0xB6, 0x01, 0x11;
9111
     eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
9112
	             0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
9113
	             0x99, 0xF9, 0xBB, 0xAF;
9114
     stk500_devcode   = 0x65;
9115
##  avr910_devcode   = ?;
9116
     signature        = 0x1e 0x93 0x81;
9117
     pagel            = 0xD8;
9118
     bs2              = 0xE2;
9119
     reset            = io;
9120
     chip_erase_delay = 9000;
9121
 
9122
     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
9123
                        "x x x x  x x x x    x x x x  x x x x";
9124
 
9125
     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
9126
                        "x x x x  x x x x    x x x x  x x x x";
9127
 
9128
    timeout		= 200;
9129
    stabdelay		= 100;
9130
    cmdexedelay		= 25;
9131
    synchloops		= 32;
9132
    bytedelay		= 0;
9133
    pollindex		= 3;
9134
    pollvalue		= 0x53;
9135
    predelay		= 1;
9136
    postdelay		= 1;
9137
    pollmethod		= 1;
9138
 
9139
    pp_controlstack     =
9140
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
9141
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
9142
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
9143
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
9144
    hventerstabdelay    = 100;
9145
    progmodedelay       = 0;
9146
    latchcycles         = 5;
9147
    togglevtg           = 1;
9148
    poweroffdelay       = 15;
9149
    resetdelayms        = 1;
9150
    resetdelayus        = 0;
9151
    hvleavestabdelay    = 15;
9152
    chiperasepulsewidth = 0;
9153
    chiperasepolltimeout = 10;
9154
    programfusepulsewidth = 0;
9155
    programfusepolltimeout = 5;
9156
    programlockpulsewidth = 0;
9157
    programlockpolltimeout = 5;
9158
 
9159
     memory "eeprom"
9160
         size            = 512;
9161
        paged           = no;
9162
        page_size       = 4;
9163
         min_write_delay = 4000;
9164
         max_write_delay = 4500;
9165
         readback_p1     = 0xff;
9166
         readback_p2     = 0xff;
9167
         read            = "1  0  1  0   0  0  0  0   0 0 0 x  x x x a8",
9168
                           "a7 a6 a5 a4  a3 a2 a1 a0  o o o o  o o o o";
9169
 
9170
         write           = "1  1  0  0   0  0  0  0   0 0 0 x  x x x a8",
9171
                           "a7 a6 a5 a4  a3 a2 a1 a0  i i i i  i i i i";
9172
 
9173
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
9174
			  "  0   0   0   0      0   0   0   0",
9175
			  "  0   0   0   0      0   0  a1  a0",
9176
			  "  i   i   i   i      i   i   i   i";
9177
 
9178
	writepage	= "  1   1   0   0      0   0   1   0",
9179
			  "  0   0   x   x      x   x   x   x",
9180
			  " a7  a6  a5  a4     a3  a2   0   0",
9181
			  "  x   x   x   x      x   x   x   x";
9182
 
9183
	mode		= 0x41;
9184
	delay		= 6;
9185
	blocksize	= 4;
9186
	readsize	= 256;
9187
       ;
9188
     memory "flash"
9189
         paged           = yes;
9190
         size            = 8192;
9191
         page_size       = 64;
9192
         num_pages       = 128;
9193
         min_write_delay = 4500;
9194
         max_write_delay = 4500;
9195
         readback_p1     = 0xff;
9196
         readback_p2     = 0xff;
9197
         read_lo         = "  0   0   1   0    0   0   0   0",
9198
                           "  0   0   0   0   a11 a10 a9  a8",
9199
                           " a7  a6  a5  a4   a3  a2  a1  a0",
9200
                           "  o   o   o   o    o   o   o   o";
9201
 
9202
         read_hi         = "  0   0   1   0    1   0   0   0",
9203
                           "  0   0   0   0   a11 a10 a9  a8",
9204
                           " a7  a6  a5  a4   a3  a2  a1  a0",
9205
                           "  o   o   o   o    o   o   o   o";
9206
 
9207
         loadpage_lo     = "  0   1   0   0    0   0   0   0",
9208
                           "  0   0   0   x    x   x   x   x",
9209
                           "  x   x   x  a4   a3  a2  a1  a0",
9210
                           "  i   i   i   i    i   i   i   i";
9211
 
9212
         loadpage_hi     = "  0   1   0   0    1   0   0   0",
9213
                           "  0   0   0   x    x   x   x   x",
9214
                           "  x   x   x  a4   a3  a2  a1  a0",
9215
                           "  i   i   i   i    i   i   i   i";
9216
 
9217
         writepage       = "  0  1  0  0   1   1   0   0",
9218
                           "  0  0  0  0   a11 a10 a9  a8",
9219
                           " a7 a6 a5  x   x   x   x   x",
9220
                           "  x  x  x  x   x   x   x   x";
9221
 
9222
	mode		= 0x41;
9223
	delay		= 6;
9224
	blocksize	= 64;
9225
	readsize	= 256;
9226
       ;
9227
#   AT90PWM2 has Signature Bytes: 0x1E 0x93 0x81.
9228
     memory "signature"
9229
         size            = 3;
9230
         read            = "0  0  1  1   0  0  0  0   0  0  x  x   x  x  x  x",
9231
                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
9232
       ;
9233
     memory "lock"
9234
         size            = 1;
9235
         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
9236
                           "x x x x  x x x x  1 1 i i  i i i i";
9237
 
9238
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
9239
                           "x x x x  x x x x  x x o o  o o o o";
9240
        min_write_delay = 9000;
9241
        max_write_delay = 9000;
9242
       ;
9243
 
9244
     memory "lfuse"
9245
         size            = 1;
9246
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
9247
                           "x x x x  x x x x  i i i i  i i i i";
9248
 
9249
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
9250
                           "x x x x  x x x x  o o o o  o o o o";
9251
        min_write_delay = 9000;
9252
        max_write_delay = 9000;
9253
       ;
9254
 
9255
     memory "hfuse"
9256
         size            = 1;
9257
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
9258
                           "x x x x  x x x x  i i i i  i i i i";
9259
 
9260
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
9261
                           "x x x x  x x x x  o o o o  o o o o";
9262
        min_write_delay = 9000;
9263
        max_write_delay = 9000;
9264
       ;
9265
 
9266
     memory "efuse"
9267
         size            = 1;
9268
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
9269
                           "x x x x  x x x x  x x x x  x x x i";
9270
 
9271
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
9272
                           "x x x x  x x x x  o o o o  o o o o";
9273
        min_write_delay = 9000;
9274
        max_write_delay = 9000;
9275
     ;
9276
 
9277
     memory "calibration"
9278
         size            = 1;
9279
         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
9280
                           "0  0  0  0   0  0  0  0    o o o o  o o o o";
9281
     ;
9282
  ;
9283
 
9284
#------------------------------------------------------------
9285
# AT90PWM2B
9286
#------------------------------------------------------------
9287
# Same as AT90PWM2 but different signature.
9288
 
9289
part
9290
     id            = "pwm2b";
9291
     desc          = "AT90PWM2B";
9292
     has_debugwire = yes;
9293
     flash_instr   = 0xB6, 0x01, 0x11;
9294
     eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
9295
	             0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
9296
	             0x99, 0xF9, 0xBB, 0xAF;
9297
     stk500_devcode   = 0x65;
9298
##  avr910_devcode   = ?;
9299
     signature        = 0x1e 0x93 0x83;
9300
     pagel            = 0xD8;
9301
     bs2              = 0xE2;
9302
     reset            = io;
9303
     chip_erase_delay = 9000;
9304
 
9305
     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
9306
                        "x x x x  x x x x    x x x x  x x x x";
9307
 
9308
     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
9309
                        "x x x x  x x x x    x x x x  x x x x";
9310
 
9311
    timeout		= 200;
9312
    stabdelay		= 100;
9313
    cmdexedelay		= 25;
9314
    synchloops		= 32;
9315
    bytedelay		= 0;
9316
    pollindex		= 3;
9317
    pollvalue		= 0x53;
9318
    predelay		= 1;
9319
    postdelay		= 1;
9320
    pollmethod		= 1;
9321
 
9322
    pp_controlstack     =
9323
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
9324
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
9325
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
9326
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
9327
    hventerstabdelay    = 100;
9328
    progmodedelay       = 0;
9329
    latchcycles         = 5;
9330
    togglevtg           = 1;
9331
    poweroffdelay       = 15;
9332
    resetdelayms        = 1;
9333
    resetdelayus        = 0;
9334
    hvleavestabdelay    = 15;
9335
    chiperasepulsewidth = 0;
9336
    chiperasepolltimeout = 10;
9337
    programfusepulsewidth = 0;
9338
    programfusepolltimeout = 5;
9339
    programlockpulsewidth = 0;
9340
    programlockpolltimeout = 5;
9341
 
9342
     memory "eeprom"
9343
         size            = 512;
9344
        paged           = no;
9345
        page_size       = 4;
9346
         min_write_delay = 4000;
9347
         max_write_delay = 4500;
9348
         readback_p1     = 0xff;
9349
         readback_p2     = 0xff;
9350
         read            = "1  0  1  0   0  0  0  0   0 0 0 x  x x x a8",
9351
                           "a7 a6 a5 a4  a3 a2 a1 a0  o o o o  o o o o";
9352
 
9353
         write           = "1  1  0  0   0  0  0  0   0 0 0 x  x x x a8",
9354
                           "a7 a6 a5 a4  a3 a2 a1 a0  i i i i  i i i i";
9355
 
9356
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
9357
			  "  0   0   0   0      0   0   0   0",
9358
			  "  0   0   0   0      0   0  a1  a0",
9359
			  "  i   i   i   i      i   i   i   i";
9360
 
9361
	writepage	= "  1   1   0   0      0   0   1   0",
9362
			  "  0   0   x   x      x   x   x   x",
9363
			  " a7  a6  a5  a4     a3  a2   0   0",
9364
			  "  x   x   x   x      x   x   x   x";
9365
 
9366
	mode		= 0x41;
9367
	delay		= 6;
9368
	blocksize	= 4;
9369
	readsize	= 256;
9370
       ;
9371
     memory "flash"
9372
         paged           = yes;
9373
         size            = 8192;
9374
         page_size       = 64;
9375
         num_pages       = 128;
9376
         min_write_delay = 4500;
9377
         max_write_delay = 4500;
9378
         readback_p1     = 0xff;
9379
         readback_p2     = 0xff;
9380
         read_lo         = "  0   0   1   0    0   0   0   0",
9381
                           "  0   0   0   0   a11 a10 a9  a8",
9382
                           " a7  a6  a5  a4   a3  a2  a1  a0",
9383
                           "  o   o   o   o    o   o   o   o";
9384
 
9385
         read_hi         = "  0   0   1   0    1   0   0   0",
9386
                           "  0   0   0   0   a11 a10 a9  a8",
9387
                           " a7  a6  a5  a4   a3  a2  a1  a0",
9388
                           "  o   o   o   o    o   o   o   o";
9389
 
9390
         loadpage_lo     = "  0   1   0   0    0   0   0   0",
9391
                           "  0   0   0   x    x   x   x   x",
9392
                           "  x   x   x  a4   a3  a2  a1  a0",
9393
                           "  i   i   i   i    i   i   i   i";
9394
 
9395
         loadpage_hi     = "  0   1   0   0    1   0   0   0",
9396
                           "  0   0   0   x    x   x   x   x",
9397
                           "  x   x   x  a4   a3  a2  a1  a0",
9398
                           "  i   i   i   i    i   i   i   i";
9399
 
9400
         writepage       = "  0  1  0  0   1   1   0   0",
9401
                           "  0  0  0  0   a11 a10 a9  a8",
9402
                           " a7 a6 a5  x   x   x   x   x",
9403
                           "  x  x  x  x   x   x   x   x";
9404
 
9405
	mode		= 0x41;
9406
	delay		= 6;
9407
	blocksize	= 64;
9408
	readsize	= 256;
9409
       ;
9410
     memory "signature"
9411
         size            = 3;
9412
         read            = "0  0  1  1   0  0  0  0   0  0  x  x   x  x  x  x",
9413
                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
9414
       ;
9415
     memory "lock"
9416
         size            = 1;
9417
         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
9418
                           "x x x x  x x x x  1 1 i i  i i i i";
9419
 
9420
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
9421
                           "x x x x  x x x x  x x o o  o o o o";
9422
        min_write_delay = 9000;
9423
        max_write_delay = 9000;
9424
       ;
9425
 
9426
     memory "lfuse"
9427
         size            = 1;
9428
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
9429
                           "x x x x  x x x x  i i i i  i i i i";
9430
 
9431
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
9432
                           "x x x x  x x x x  o o o o  o o o o";
9433
        min_write_delay = 9000;
9434
        max_write_delay = 9000;
9435
       ;
9436
 
9437
     memory "hfuse"
9438
         size            = 1;
9439
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
9440
                           "x x x x  x x x x  i i i i  i i i i";
9441
 
9442
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
9443
                           "x x x x  x x x x  o o o o  o o o o";
9444
        min_write_delay = 9000;
9445
        max_write_delay = 9000;
9446
       ;
9447
 
9448
     memory "efuse"
9449
         size            = 1;
9450
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
9451
                           "x x x x  x x x x  x x x x  x x x i";
9452
 
9453
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
9454
                           "x x x x  x x x x  o o o o  o o o o";
9455
        min_write_delay = 9000;
9456
        max_write_delay = 9000;
9457
     ;
9458
 
9459
     memory "calibration"
9460
         size            = 1;
9461
         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
9462
                           "0  0  0  0   0  0  0  0    o o o o  o o o o";
9463
     ;
9464
  ;
9465
 
9466
#------------------------------------------------------------
9467
# AT90PWM3B
9468
#------------------------------------------------------------
9469
 
9470
# Completely identical to AT90PWM2B (including the signature!)
9471
 
9472
part
9473
     id            = "pwm3b";
9474
     desc          = "AT90PWM3B";
9475
     has_debugwire = yes;
9476
     flash_instr   = 0xB6, 0x01, 0x11;
9477
     eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
9478
	             0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
9479
	             0x99, 0xF9, 0xBB, 0xAF;
9480
     stk500_devcode   = 0x65;
9481
##  avr910_devcode   = ?;
9482
     signature        = 0x1e 0x93 0x83;
9483
     pagel            = 0xD8;
9484
     bs2              = 0xE2;
9485
     reset            = io;
9486
     chip_erase_delay = 9000;
9487
 
9488
     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
9489
                        "x x x x  x x x x    x x x x  x x x x";
9490
 
9491
     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
9492
                        "x x x x  x x x x    x x x x  x x x x";
9493
 
9494
    timeout		= 200;
9495
    stabdelay		= 100;
9496
    cmdexedelay		= 25;
9497
    synchloops		= 32;
9498
    bytedelay		= 0;
9499
    pollindex		= 3;
9500
    pollvalue		= 0x53;
9501
    predelay		= 1;
9502
    postdelay		= 1;
9503
    pollmethod		= 1;
9504
 
9505
    pp_controlstack     =
9506
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
9507
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
9508
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
9509
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
9510
    hventerstabdelay    = 100;
9511
    progmodedelay       = 0;
9512
    latchcycles         = 5;
9513
    togglevtg           = 1;
9514
    poweroffdelay       = 15;
9515
    resetdelayms        = 1;
9516
    resetdelayus        = 0;
9517
    hvleavestabdelay    = 15;
9518
    chiperasepulsewidth = 0;
9519
    chiperasepolltimeout = 10;
9520
    programfusepulsewidth = 0;
9521
    programfusepolltimeout = 5;
9522
    programlockpulsewidth = 0;
9523
    programlockpolltimeout = 5;
9524
 
9525
     memory "eeprom"
9526
         size            = 512;
9527
        paged           = no;
9528
        page_size       = 4;
9529
         min_write_delay = 4000;
9530
         max_write_delay = 4500;
9531
         readback_p1     = 0xff;
9532
         readback_p2     = 0xff;
9533
         read            = "1  0  1  0   0  0  0  0   0 0 0 x  x x x a8",
9534
                           "a7 a6 a5 a4  a3 a2 a1 a0  o o o o  o o o o";
9535
 
9536
         write           = "1  1  0  0   0  0  0  0   0 0 0 x  x x x a8",
9537
                           "a7 a6 a5 a4  a3 a2 a1 a0  i i i i  i i i i";
9538
 
9539
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
9540
			  "  0   0   0   0      0   0   0   0",
9541
			  "  0   0   0   0      0   0  a1  a0",
9542
			  "  i   i   i   i      i   i   i   i";
9543
 
9544
	writepage	= "  1   1   0   0      0   0   1   0",
9545
			  "  0   0   x   x      x   x   x   x",
9546
			  " a7  a6  a5  a4     a3  a2   0   0",
9547
			  "  x   x   x   x      x   x   x   x";
9548
 
9549
	mode		= 0x41;
9550
	delay		= 6;
9551
	blocksize	= 4;
9552
	readsize	= 256;
9553
       ;
9554
     memory "flash"
9555
         paged           = yes;
9556
         size            = 8192;
9557
         page_size       = 64;
9558
         num_pages       = 128;
9559
         min_write_delay = 4500;
9560
         max_write_delay = 4500;
9561
         readback_p1     = 0xff;
9562
         readback_p2     = 0xff;
9563
         read_lo         = "  0   0   1   0    0   0   0   0",
9564
                           "  0   0   0   0   a11 a10 a9  a8",
9565
                           " a7  a6  a5  a4   a3  a2  a1  a0",
9566
                           "  o   o   o   o    o   o   o   o";
9567
 
9568
         read_hi         = "  0   0   1   0    1   0   0   0",
9569
                           "  0   0   0   0   a11 a10 a9  a8",
9570
                           " a7  a6  a5  a4   a3  a2  a1  a0",
9571
                           "  o   o   o   o    o   o   o   o";
9572
 
9573
         loadpage_lo     = "  0   1   0   0    0   0   0   0",
9574
                           "  0   0   0   x    x   x   x   x",
9575
                           "  x   x   x  a4   a3  a2  a1  a0",
9576
                           "  i   i   i   i    i   i   i   i";
9577
 
9578
         loadpage_hi     = "  0   1   0   0    1   0   0   0",
9579
                           "  0   0   0   x    x   x   x   x",
9580
                           "  x   x   x  a4   a3  a2  a1  a0",
9581
                           "  i   i   i   i    i   i   i   i";
9582
 
9583
         writepage       = "  0  1  0  0   1   1   0   0",
9584
                           "  0  0  0  0   a11 a10 a9  a8",
9585
                           " a7 a6 a5  x   x   x   x   x",
9586
                           "  x  x  x  x   x   x   x   x";
9587
 
9588
	mode		= 0x41;
9589
	delay		= 6;
9590
	blocksize	= 64;
9591
	readsize	= 256;
9592
       ;
9593
     memory "signature"
9594
         size            = 3;
9595
         read            = "0  0  1  1   0  0  0  0   0  0  x  x   x  x  x  x",
9596
                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
9597
       ;
9598
     memory "lock"
9599
         size            = 1;
9600
         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
9601
                           "x x x x  x x x x  1 1 i i  i i i i";
9602
 
9603
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
9604
                           "x x x x  x x x x  x x o o  o o o o";
9605
        min_write_delay = 9000;
9606
        max_write_delay = 9000;
9607
       ;
9608
 
9609
     memory "lfuse"
9610
         size            = 1;
9611
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
9612
                           "x x x x  x x x x  i i i i  i i i i";
9613
 
9614
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
9615
                           "x x x x  x x x x  o o o o  o o o o";
9616
        min_write_delay = 9000;
9617
        max_write_delay = 9000;
9618
       ;
9619
 
9620
     memory "hfuse"
9621
         size            = 1;
9622
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
9623
                           "x x x x  x x x x  i i i i  i i i i";
9624
 
9625
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
9626
                           "x x x x  x x x x  o o o o  o o o o";
9627
        min_write_delay = 9000;
9628
        max_write_delay = 9000;
9629
       ;
9630
 
9631
     memory "efuse"
9632
         size            = 1;
9633
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
9634
                           "x x x x  x x x x  x x x x  x x x i";
9635
 
9636
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
9637
                           "x x x x  x x x x  o o o o  o o o o";
9638
        min_write_delay = 9000;
9639
        max_write_delay = 9000;
9640
     ;
9641
 
9642
     memory "calibration"
9643
         size            = 1;
9644
         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
9645
                           "0  0  0  0   0  0  0  0    o o o o  o o o o";
9646
     ;
9647
  ;
9648
 
9649
#------------------------------------------------------------
9650
# ATtiny25
9651
#------------------------------------------------------------
9652
 
9653
part
9654
     id            = "t25";
9655
     desc          = "ATtiny25";
9656
     has_debugwire = yes;
9657
     flash_instr   = 0xB4, 0x02, 0x12;
9658
     eeprom_instr  = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
9659
	             0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC,
9660
	             0x99, 0xE1, 0xBB, 0xAC;
9661
## no STK500 devcode in XML file, use the ATtiny45 one
9662
     stk500_devcode   = 0x14;
9663
##  avr910_devcode   = ?;
9664
##  Try the AT90S2313 devcode:
9665
     avr910_devcode   = 0x20;
9666
     signature        = 0x1e 0x91 0x08;
9667
     reset            = io;
9668
     chip_erase_delay = 4500;
9669
 
9670
     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
9671
                        "x x x x  x x x x    x x x x  x x x x";
9672
 
9673
     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
9674
                        "x x x x  x x x x    x x x x  x x x x";
9675
 
9676
    timeout		= 200;
9677
    stabdelay		= 100;
9678
    cmdexedelay		= 25;
9679
    synchloops		= 32;
9680
    bytedelay		= 0;
9681
    pollindex		= 3;
9682
    pollvalue		= 0x53;
9683
    predelay		= 1;
9684
    postdelay		= 1;
9685
    pollmethod		= 1;
9686
 
9687
    hvsp_controlstack   =
9688
        0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
9689
        0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
9690
        0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
9691
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
9692
    hventerstabdelay    = 100;
9693
    hvspcmdexedelay     = 0;
9694
    synchcycles         = 6;
9695
    latchcycles         = 1;
9696
    togglevtg           = 1;
9697
    poweroffdelay       = 25;
9698
    resetdelayms        = 1;
9699
    resetdelayus        = 0;
9700
    hvleavestabdelay    = 100;
9701
    resetdelay          = 25;
9702
    chiperasepolltimeout = 40;
9703
    chiperasetime       = 0;
9704
    programfusepolltimeout = 25;
9705
    programlockpolltimeout = 25;
9706
 
9707
     memory "eeprom"
9708
         size            = 128;
9709
        paged           = no;
9710
        page_size       = 4;
9711
         min_write_delay = 4000;
9712
         max_write_delay = 4500;
9713
         readback_p1     = 0xff;
9714
         readback_p2     = 0xff;
9715
         read            = "1  0  1  0   0  0  0  0   0 0 0 x  x x x x",
9716
                           "x a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
9717
 
9718
         write           = "1  1  0  0   0  0  0  0   0 0 0 x  x x x x",
9719
                           "x a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
9720
 
9721
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
9722
			  "  0   0   0   0      0   0   0   0",
9723
			  "  0   0   0   0      0   0  a1  a0",
9724
			  "  i   i   i   i      i   i   i   i";
9725
 
9726
	writepage	= "  1   1   0   0      0   0   1   0",
9727
			  "  0   0   x   x      x   x   x   x",
9728
			  "  x  a6  a5  a4     a3  a2   0   0",
9729
			  "  x   x   x   x      x   x   x   x";
9730
 
9731
	mode		= 0x41;
9732
	delay		= 6;
9733
	blocksize	= 4;
9734
	readsize	= 256;
9735
       ;
9736
     memory "flash"
9737
         paged           = yes;
9738
         size            = 2048;
9739
         page_size       = 32;
9740
         num_pages       = 64;
9741
         min_write_delay = 4500;
9742
         max_write_delay = 4500;
9743
         readback_p1     = 0xff;
9744
         readback_p2     = 0xff;
9745
         read_lo         = "  0   0   1   0    0   0   0   0",
9746
                           "  0   0   0   0    0   0  a9  a8",
9747
                           " a7  a6  a5  a4   a3  a2  a1  a0",
9748
                           "  o   o   o   o    o   o   o   o";
9749
 
9750
         read_hi         = "  0   0   1   0    1   0   0   0",
9751
                           "  0   0   0   0    0   0  a9  a8",
9752
                           " a7  a6  a5  a4   a3  a2  a1  a0",
9753
                           "  o   o   o   o    o   o   o   o";
9754
 
9755
         loadpage_lo     = "  0   1   0   0    0   0   0   0",
9756
                           "  0   0   0   x    x   x   x   x",
9757
                           "  x   x   x   x   a3  a2  a1  a0",
9758
                           "  i   i   i   i    i   i   i   i";
9759
 
9760
         loadpage_hi     = "  0   1   0   0    1   0   0   0",
9761
                           "  0   0   0   x    x   x   x   x",
9762
                           "  x   x   x   x   a3  a2  a1  a0",
9763
                           "  i   i   i   i    i   i   i   i";
9764
 
9765
         writepage       = "  0  1  0  0   1  1  0  0",
9766
                           "  0  0  0  0   0  0 a9 a8",
9767
                           " a7 a6 a5 a4   x  x  x  x",
9768
                           "  x  x  x  x   x  x  x  x";
9769
 
9770
	mode		= 0x41;
9771
	delay		= 6;
9772
	blocksize	= 32;
9773
	readsize	= 256;
9774
       ;
9775
#   ATtiny25 has Signature Bytes: 0x1E 0x91 0x08.
9776
     memory "signature"
9777
         size            = 3;
9778
         read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
9779
                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
9780
       ;
9781
     memory "lock"
9782
         size            = 1;
9783
         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
9784
                           "x x x x  x x x x  1 1 i i  i i i i";
9785
        min_write_delay = 9000;
9786
        max_write_delay = 9000;
9787
       ;
9788
 
9789
     memory "lfuse"
9790
         size            = 1;
9791
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
9792
                           "x x x x  x x x x  i i i i  i i i i";
9793
 
9794
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
9795
                           "x x x x  x x x x  o o o o  o o o o";
9796
        min_write_delay = 9000;
9797
        max_write_delay = 9000;
9798
       ;
9799
 
9800
     memory "hfuse"
9801
         size            = 1;
9802
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
9803
                           "x x x x  x x x x  i i i i  i i i i";
9804
 
9805
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
9806
                           "x x x x  x x x x  o o o o  o o o o";
9807
        min_write_delay = 9000;
9808
        max_write_delay = 9000;
9809
       ;
9810
 
9811
     memory "efuse"
9812
         size            = 1;
9813
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
9814
                           "x x x x  x x x x  x x x x  x x x i";
9815
 
9816
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
9817
                           "x x x x  x x x x  o o o o  o o o o";
9818
        min_write_delay = 9000;
9819
        max_write_delay = 9000;
9820
     ;
9821
 
9822
     memory "calibration"
9823
         size            = 2;
9824
         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
9825
                           "0  0  0  0   0  0  0  a0   o o o o  o o o o";
9826
     ;
9827
  ;
9828
 
9829
#------------------------------------------------------------
9830
# ATtiny45
9831
#------------------------------------------------------------
9832
 
9833
part
9834
     id            = "t45";
9835
     desc          = "ATtiny45";
9836
     has_debugwire = yes;
9837
     flash_instr   = 0xB4, 0x02, 0x12;
9838
     eeprom_instr  = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
9839
	             0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC,
9840
	             0x99, 0xE1, 0xBB, 0xAC;
9841
     stk500_devcode   = 0x14;
9842
##  avr910_devcode   = ?;
9843
##  Try the AT90S2313 devcode:
9844
     avr910_devcode   = 0x20;
9845
     signature        = 0x1e 0x92 0x06;
9846
     reset            = io;
9847
     chip_erase_delay = 4500;
9848
 
9849
     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
9850
                        "x x x x  x x x x    x x x x  x x x x";
9851
 
9852
     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
9853
                        "x x x x  x x x x    x x x x  x x x x";
9854
 
9855
    timeout		= 200;
9856
    stabdelay		= 100;
9857
    cmdexedelay		= 25;
9858
    synchloops		= 32;
9859
    bytedelay		= 0;
9860
    pollindex		= 3;
9861
    pollvalue		= 0x53;
9862
    predelay		= 1;
9863
    postdelay		= 1;
9864
    pollmethod		= 1;
9865
 
9866
    hvsp_controlstack     =
9867
	0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
9868
        0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
9869
        0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
9870
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
9871
    hventerstabdelay    = 100;
9872
    progmodedelay       = 0;
9873
    hvspcmdexedelay     = 0;
9874
    synchcycles         = 6;
9875
    latchcycles         = 1;
9876
    togglevtg           = 1;
9877
    poweroffdelay       = 25;
9878
    resetdelayms        = 1;
9879
    resetdelayus        = 0;
9880
    hvleavestabdelay    = 100;
9881
    resetdelay          = 25;
9882
    chiperasepolltimeout = 40;
9883
    chiperasetime       = 0;
9884
    programfusepolltimeout = 25;
9885
    programlockpolltimeout = 25;
9886
 
9887
     memory "eeprom"
9888
         size            = 256;
9889
         page_size       = 4;
9890
         min_write_delay = 4000;
9891
         max_write_delay = 4500;
9892
         readback_p1     = 0xff;
9893
         readback_p2     = 0xff;
9894
         read            = "1  0  1  0   0  0  0  0    0 0 0 x  x x x x",
9895
                           "a7 a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
9896
 
9897
         write           = "1  1  0  0   0  0  0  0    0 0 0 x  x x x x",
9898
                           "a7 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
9899
 
9900
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
9901
			  "  0   0   0   0      0   0   0   0",
9902
			  "  0   0   0   0      0   0  a1  a0",
9903
			  "  i   i   i   i      i   i   i   i";
9904
 
9905
	writepage	= "  1   1   0   0      0   0   1   0",
9906
			  "  0   0   x   x      x   x   x   x",
9907
			  " a7  a6  a5  a4     a3  a2   0   0",
9908
			  "  x   x   x   x      x   x   x   x";
9909
 
9910
	mode		= 0x41;
9911
	delay		= 6;
9912
	blocksize	= 4;
9913
	readsize	= 256;
9914
       ;
9915
     memory "flash"
9916
         paged           = yes;
9917
         size            = 4096;
9918
         page_size       = 64;
9919
         num_pages       = 64;
9920
         min_write_delay = 4500;
9921
         max_write_delay = 4500;
9922
         readback_p1     = 0xff;
9923
         readback_p2     = 0xff;
9924
         read_lo         = "  0   0   1   0    0   0   0   0",
9925
                           "  0   0   0   0    0  a10 a9  a8",
9926
                           " a7  a6  a5  a4   a3  a2  a1  a0",
9927
                           "  o   o   o   o    o   o   o   o";
9928
 
9929
         read_hi         = "  0   0   1   0    1   0   0   0",
9930
                           "  0   0   0   0    0  a10 a9  a8",
9931
                           " a7  a6  a5  a4   a3  a2  a1  a0",
9932
                           "  o   o   o   o    o   o   o   o";
9933
 
9934
         loadpage_lo     = "  0   1   0   0    0   0   0   0",
9935
                           "  0   0   0   x    x   x   x   x",
9936
                           "  x   x   x  a4   a3  a2  a1  a0",
9937
                           "  i   i   i   i    i   i   i   i";
9938
 
9939
         loadpage_hi     = "  0   1   0   0    1   0   0   0",
9940
                           "  0   0   0   x    x   x   x   x",
9941
                           "  x   x   x  a4   a3  a2  a1  a0",
9942
                           "  i   i   i   i    i   i   i   i";
9943
 
9944
         writepage       = "  0  1  0  0   1  1  0  0",
9945
                           "  0  0  0  0   0 a10 a9 a8",
9946
                           " a7 a6 a5  x   x  x  x  x",
9947
                           "  x  x  x  x   x  x  x  x";
9948
 
9949
	mode		= 0x41;
9950
	delay		= 6;
9951
	blocksize	= 32;
9952
	readsize	= 256;
9953
       ;
9954
#   ATtiny45 has Signature Bytes: 0x1E 0x92 0x08. (Data sheet 2586C-AVR-06/05 (doc2586.pdf) indicates otherwise!)
9955
     memory "signature"
9956
         size            = 3;
9957
         read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
9958
                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
9959
       ;
9960
     memory "lock"
9961
         size            = 1;
9962
         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
9963
                           "x x x x  x x x x  1 1 i i  i i i i";
9964
        min_write_delay = 9000;
9965
        max_write_delay = 9000;
9966
       ;
9967
 
9968
     memory "lfuse"
9969
         size            = 1;
9970
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
9971
                           "x x x x  x x x x  i i i i  i i i i";
9972
 
9973
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
9974
                           "x x x x  x x x x  o o o o  o o o o";
9975
        min_write_delay = 9000;
9976
        max_write_delay = 9000;
9977
       ;
9978
 
9979
     memory "hfuse"
9980
         size            = 1;
9981
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
9982
                           "x x x x  x x x x  i i i i  i i i i";
9983
 
9984
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
9985
                           "x x x x  x x x x  o o o o  o o o o";
9986
        min_write_delay = 9000;
9987
        max_write_delay = 9000;
9988
       ;
9989
 
9990
     memory "efuse"
9991
         size            = 1;
9992
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
9993
                           "x x x x  x x x x  x x x x  x x x i";
9994
 
9995
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
9996
                           "x x x x  x x x x  o o o o  o o o o";
9997
        min_write_delay = 9000;
9998
        max_write_delay = 9000;
9999
     ;
10000
 
10001
     memory "calibration"
10002
         size            = 2;
10003
         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
10004
                           "0  0  0  0   0  0  0  a0   o o o o  o o o o";
10005
     ;
10006
  ;
10007
 
10008
#------------------------------------------------------------
10009
# ATtiny85
10010
#------------------------------------------------------------
10011
 
10012
part
10013
     id            = "t85";
10014
     desc          = "ATtiny85";
10015
     has_debugwire = yes;
10016
     flash_instr   = 0xB4, 0x02, 0x12;
10017
     eeprom_instr  = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
10018
	             0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC,
10019
	             0x99, 0xE1, 0xBB, 0xAC;
10020
## no STK500 devcode in XML file, use the ATtiny45 one
10021
     stk500_devcode   = 0x14;
10022
##  avr910_devcode   = ?;
10023
##  Try the AT90S2313 devcode:
10024
     avr910_devcode   = 0x20;
10025
     signature        = 0x1e 0x93 0x0b;
10026
     reset            = io;
10027
     chip_erase_delay = 4500;
10028
 
10029
     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
10030
                        "x x x x  x x x x    x x x x  x x x x";
10031
 
10032
     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
10033
                        "x x x x  x x x x    x x x x  x x x x";
10034
 
10035
    timeout		= 200;
10036
    stabdelay		= 100;
10037
    cmdexedelay		= 25;
10038
    synchloops		= 32;
10039
    bytedelay		= 0;
10040
    pollindex		= 3;
10041
    pollvalue		= 0x53;
10042
    predelay		= 1;
10043
    postdelay		= 1;
10044
    pollmethod		= 1;
10045
 
10046
    hvsp_controlstack   =
10047
        0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
10048
        0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
10049
        0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
10050
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
10051
    hventerstabdelay    = 100;
10052
    hvspcmdexedelay     = 0;
10053
    synchcycles         = 6;
10054
    latchcycles         = 1;
10055
    togglevtg           = 1;
10056
    poweroffdelay       = 25;
10057
    resetdelayms        = 1;
10058
    resetdelayus        = 0;
10059
    hvleavestabdelay    = 100;
10060
    resetdelay          = 25;
10061
    chiperasepolltimeout = 40;
10062
    chiperasetime       = 0;
10063
    programfusepolltimeout = 25;
10064
    programlockpolltimeout = 25;
10065
 
10066
     memory "eeprom"
10067
         size            = 512;
10068
        paged           = no;
10069
        page_size       = 4;
10070
         min_write_delay = 4000;
10071
         max_write_delay = 4500;
10072
         readback_p1     = 0xff;
10073
         readback_p2     = 0xff;
10074
         read            = "1  0  1  0   0  0  0  0    0 0 0 x  x x x a8",
10075
                           "a7 a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
10076
 
10077
         write           = "1  1  0  0   0  0  0  0    0 0 0 x  x x x a8",
10078
                           "a8 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
10079
 
10080
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
10081
			  "  0   0   0   0      0   0   0   0",
10082
			  "  0   0   0   0      0   0  a1  a0",
10083
			  "  i   i   i   i      i   i   i   i";
10084
 
10085
	writepage	= "  1   1   0   0      0   0   1   0",
10086
			  "  0   0   x   x      x   x   x  a8",
10087
			  " a7  a6  a5  a4     a3  a2   0   0",
10088
			  "  x   x   x   x      x   x   x   x";
10089
 
10090
	mode		= 0x41;
10091
	delay		= 6;
10092
	blocksize	= 4;
10093
	readsize	= 256;
10094
       ;
10095
     memory "flash"
10096
         paged           = yes;
10097
         size            = 8192;
10098
         page_size       = 64;
10099
         num_pages       = 128;
10100
         min_write_delay = 4500;
10101
         max_write_delay = 4500;
10102
         readback_p1     = 0xff;
10103
         readback_p2     = 0xff;
10104
         read_lo         = "  0   0   1   0    0   0   0   0",
10105
                           "  0   0   0   0  a11 a10  a9  a8",
10106
                           " a7  a6  a5  a4   a3  a2  a1  a0",
10107
                           "  o   o   o   o    o   o   o   o";
10108
 
10109
         read_hi         = "  0   0   1   0    1   0   0   0",
10110
                           "  0   0   0   0  a11 a10  a9  a8",
10111
                           " a7  a6  a5  a4   a3  a2  a1  a0",
10112
                           "  o   o   o   o    o   o   o   o";
10113
 
10114
         loadpage_lo     = "  0   1   0   0    0   0   0   0",
10115
                           "  0   0   0   x    x   x   x   x",
10116
                           "  x   x   x  a4   a3  a2  a1  a0",
10117
                           "  i   i   i   i    i   i   i   i";
10118
 
10119
         loadpage_hi     = "  0   1   0   0    1   0   0   0",
10120
                           "  0   0   0   x    x   x   x   x",
10121
                           "  x   x   x  a4   a3  a2  a1  a0",
10122
                           "  i   i   i   i    i   i   i   i";
10123
 
10124
         writepage       = "  0  1  0  0   1   1   0  0",
10125
                           "  0  0  0  0  a11 a10 a9 a8",
10126
                           " a7 a6 a5  x   x  x  x  x",
10127
                           "  x  x  x  x   x  x  x  x";
10128
 
10129
	mode		= 0x41;
10130
	delay		= 6;
10131
	blocksize	= 32;
10132
	readsize	= 256;
10133
       ;
10134
#   ATtiny85 has Signature Bytes: 0x1E 0x93 0x08.
10135
     memory "signature"
10136
         size            = 3;
10137
         read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
10138
                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
10139
       ;
10140
     memory "lock"
10141
         size            = 1;
10142
         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
10143
                           "x x x x  x x x x  1 1 i i  i i i i";
10144
        min_write_delay = 9000;
10145
        max_write_delay = 9000;
10146
       ;
10147
 
10148
     memory "lfuse"
10149
         size            = 1;
10150
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
10151
                           "x x x x  x x x x  i i i i  i i i i";
10152
 
10153
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
10154
                           "x x x x  x x x x  o o o o  o o o o";
10155
        min_write_delay = 9000;
10156
        max_write_delay = 9000;
10157
       ;
10158
 
10159
     memory "hfuse"
10160
         size            = 1;
10161
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
10162
                           "x x x x  x x x x  i i i i  i i i i";
10163
 
10164
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
10165
                           "x x x x  x x x x  o o o o  o o o o";
10166
        min_write_delay = 9000;
10167
        max_write_delay = 9000;
10168
       ;
10169
 
10170
     memory "efuse"
10171
         size            = 1;
10172
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
10173
                           "x x x x  x x x x  x x x x  x x x i";
10174
 
10175
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
10176
                           "x x x x  x x x x  o o o o  o o o o";
10177
        min_write_delay = 9000;
10178
        max_write_delay = 9000;
10179
     ;
10180
 
10181
     memory "calibration"
10182
         size            = 2;
10183
         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
10184
                           "0  0  0  0   0  0  0  a0   o o o o  o o o o";
10185
     ;
10186
  ;
10187
 
10188
#------------------------------------------------------------
10189
# ATmega640
10190
#------------------------------------------------------------
10191
# Almost same as ATmega1280, except for different memory sizes
10192
 
10193
part
10194
    id               = "m640";
10195
    desc             = "ATMEGA640";
10196
    signature        = 0x1e 0x96 0x08;
10197
    has_jtag         = yes;
10198
#    stk500_devcode   = 0xB2;
10199
#    avr910_devcode   = 0x43;
10200
    chip_erase_delay = 9000;
10201
    pagel            = 0xD7;
10202
    bs2              = 0xA0;
10203
    reset            = dedicated;
10204
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
10205
                       "x x x x  x x x x    x x x x  x x x x";
10206
 
10207
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
10208
                       "x x x x  x x x x    x x x x  x x x x";
10209
 
10210
    timeout		= 200;
10211
    stabdelay		= 100;
10212
    cmdexedelay		= 25;
10213
    synchloops		= 32;
10214
    bytedelay		= 0;
10215
    pollindex		= 3;
10216
    pollvalue		= 0x53;
10217
    predelay		= 1;
10218
    postdelay		= 1;
10219
    pollmethod		= 1;
10220
 
10221
    pp_controlstack     =
10222
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
10223
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
10224
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
10225
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
10226
    hventerstabdelay    = 100;
10227
    progmodedelay       = 0;
10228
    latchcycles         = 5;
10229
    togglevtg           = 1;
10230
    poweroffdelay       = 15;
10231
    resetdelayms        = 1;
10232
    resetdelayus        = 0;
10233
    hvleavestabdelay    = 15;
10234
    chiperasepulsewidth = 0;
10235
    chiperasepolltimeout = 10;
10236
    programfusepulsewidth = 0;
10237
    programfusepolltimeout = 5;
10238
    programlockpulsewidth = 0;
10239
    programlockpolltimeout = 5;
10240
 
10241
    idr                 = 0x31;
10242
    spmcr               = 0x57;
10243
    rampz               = 0x3b;
10244
    allowfullpagebitstream = no;
10245
 
10246
    memory "eeprom"
10247
        paged           = no; /* leave this "no" */
10248
        page_size       = 8;  /* for parallel programming */
10249
        size            = 4096;
10250
        min_write_delay = 9000;
10251
        max_write_delay = 9000;
10252
        readback_p1     = 0x00;
10253
        readback_p2     = 0x00;
10254
        read            = "  1   0   1   0      0   0   0   0",
10255
                          "  x   x   x   x    a11 a10  a9  a8",
10256
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10257
                          "  o   o   o   o      o   o   o   o";
10258
 
10259
        write           = "  1   1   0   0      0   0   0   0",
10260
                          "  x   x   x   x    a11 a10  a9  a8",
10261
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10262
                          "  i   i   i   i      i   i   i   i";
10263
 
10264
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
10265
			  "  0   0   0   0      0   0   0   0",
10266
			  "  0   0   0   0      0  a2  a1  a0",
10267
			  "  i   i   i   i      i   i   i   i";
10268
 
10269
	writepage	= "  1   1   0   0      0   0   1   0",
10270
			  "  0   0   x   x    a11 a10  a9  a8",
10271
			  " a7  a6  a5  a4     a3   0   0   0",
10272
			  "  x   x   x   x      x   x   x   x";
10273
 
10274
	mode		= 0x41;
10275
	delay		= 10;
10276
	blocksize	= 8;
10277
	readsize	= 256;
10278
      ;
10279
 
10280
    memory "flash"
10281
        paged           = yes;
10282
        size            = 65536;
10283
        page_size       = 256;
10284
        num_pages       = 256;
10285
        min_write_delay = 4500;
10286
        max_write_delay = 4500;
10287
        readback_p1     = 0x00;
10288
        readback_p2     = 0x00;
10289
        read_lo         = "  0   0   1   0      0   0   0   0",
10290
                          "  0 a14 a13 a12    a11 a10  a9  a8",
10291
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10292
                          "  o   o   o   o      o   o   o   o";
10293
 
10294
        read_hi         = "  0   0   1   0      1   0   0   0",
10295
                          "  0 a14 a13 a12    a11 a10  a9  a8",
10296
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10297
                          "  o   o   o   o      o   o   o   o";
10298
 
10299
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
10300
                          "  x   x   x   x      x   x   x   x",
10301
                          "  x  a6  a5  a4     a3  a2  a1  a0",
10302
                          "  i   i   i   i      i   i   i   i";
10303
 
10304
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
10305
                          "  x   x   x   x      x   x   x   x",
10306
                          "  x  a6  a5  a4     a3  a2  a1  a0",
10307
                          "  i   i   i   i      i   i   i   i";
10308
 
10309
        writepage       = "  0   1   0   0      1   1   0   0",
10310
                          "  0 a14 a13 a12    a11 a10  a9  a8",
10311
                          " a7   x   x   x      x   x   x   x",
10312
                          "  x   x   x   x      x   x   x   x";
10313
 
10314
	mode		= 0x41;
10315
	delay		= 10;
10316
	blocksize	= 256;
10317
	readsize	= 256;
10318
      ;
10319
 
10320
    memory "lfuse"
10321
        size            = 1;
10322
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
10323
                          "x x x x  x x x x  i i i i  i i i i";
10324
 
10325
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
10326
                          "x x x x  x x x x  o o o o  o o o o";
10327
        min_write_delay = 9000;
10328
        max_write_delay = 9000;
10329
      ;
10330
 
10331
    memory "hfuse"
10332
        size            = 1;
10333
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
10334
                          "x x x x  x x x x  i i i i  i i i i";
10335
 
10336
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
10337
                          "x x x x  x x x x  o o o o  o o o o";
10338
        min_write_delay = 9000;
10339
        max_write_delay = 9000;
10340
      ;
10341
 
10342
    memory "efuse"
10343
        size            = 1;
10344
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
10345
                          "x x x x  x x x x  x x x x  x i i i";
10346
 
10347
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
10348
                          "x x x x  x x x x  o o o o  o o o o";
10349
        min_write_delay = 9000;
10350
        max_write_delay = 9000;
10351
      ;
10352
 
10353
    memory "lock"
10354
        size            = 1;
10355
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
10356
                          "x x x x  x x x x   x x o o  o o o o";
10357
 
10358
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
10359
                          "x x x x  x x x x   1 1 i i  i i i i";
10360
        min_write_delay = 9000;
10361
        max_write_delay = 9000;
10362
      ;
10363
 
10364
    memory "calibration"
10365
        size            = 1;
10366
        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
10367
                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
10368
      ;
10369
 
10370
    memory "signature"
10371
        size            = 3;
10372
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
10373
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
10374
      ;
10375
  ;
10376
 
10377
#------------------------------------------------------------
10378
# ATmega1280
10379
#------------------------------------------------------------
10380
 
10381
part
10382
    id               = "m1280";
10383
    desc             = "ATMEGA1280";
10384
    signature        = 0x1e 0x97 0x03;
10385
    has_jtag         = yes;
10386
#    stk500_devcode   = 0xB2;
10387
#    avr910_devcode   = 0x43;
10388
    chip_erase_delay = 9000;
10389
    pagel            = 0xD7;
10390
    bs2              = 0xA0;
10391
    reset            = dedicated;
10392
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
10393
                       "x x x x  x x x x    x x x x  x x x x";
10394
 
10395
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
10396
                       "x x x x  x x x x    x x x x  x x x x";
10397
 
10398
    timeout		= 200;
10399
    stabdelay		= 100;
10400
    cmdexedelay		= 25;
10401
    synchloops		= 32;
10402
    bytedelay		= 0;
10403
    pollindex		= 3;
10404
    pollvalue		= 0x53;
10405
    predelay		= 1;
10406
    postdelay		= 1;
10407
    pollmethod		= 1;
10408
 
10409
    pp_controlstack     =
10410
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
10411
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
10412
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
10413
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
10414
    hventerstabdelay    = 100;
10415
    progmodedelay       = 0;
10416
    latchcycles         = 5;
10417
    togglevtg           = 1;
10418
    poweroffdelay       = 15;
10419
    resetdelayms        = 1;
10420
    resetdelayus        = 0;
10421
    hvleavestabdelay    = 15;
10422
    chiperasepulsewidth = 0;
10423
    chiperasepolltimeout = 10;
10424
    programfusepulsewidth = 0;
10425
    programfusepolltimeout = 5;
10426
    programlockpulsewidth = 0;
10427
    programlockpolltimeout = 5;
10428
 
10429
    idr                 = 0x31;
10430
    spmcr               = 0x57;
10431
    rampz               = 0x3b;
10432
    allowfullpagebitstream = no;
10433
 
10434
    memory "eeprom"
10435
        paged           = no; /* leave this "no" */
10436
        page_size       = 8;  /* for parallel programming */
10437
        size            = 4096;
10438
        min_write_delay = 9000;
10439
        max_write_delay = 9000;
10440
        readback_p1     = 0x00;
10441
        readback_p2     = 0x00;
10442
        read            = "  1   0   1   0      0   0   0   0",
10443
                          "  x   x   x   x    a11 a10  a9  a8",
10444
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10445
                          "  o   o   o   o      o   o   o   o";
10446
 
10447
        write           = "  1   1   0   0      0   0   0   0",
10448
                          "  x   x   x   x    a11 a10  a9  a8",
10449
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10450
                          "  i   i   i   i      i   i   i   i";
10451
 
10452
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
10453
			  "  0   0   0   0      0   0   0   0",
10454
			  "  0   0   0   0      0  a2  a1  a0",
10455
			  "  i   i   i   i      i   i   i   i";
10456
 
10457
	writepage	= "  1   1   0   0      0   0   1   0",
10458
			  "  0   0   x   x    a11 a10  a9  a8",
10459
			  " a7  a6  a5  a4     a3   0   0   0",
10460
			  "  x   x   x   x      x   x   x   x";
10461
 
10462
	mode		= 0x41;
10463
	delay		= 10;
10464
	blocksize	= 8;
10465
	readsize	= 256;
10466
      ;
10467
 
10468
    memory "flash"
10469
        paged           = yes;
10470
        size            = 131072;
10471
        page_size       = 256;
10472
        num_pages       = 512;
10473
        min_write_delay = 4500;
10474
        max_write_delay = 4500;
10475
        readback_p1     = 0x00;
10476
        readback_p2     = 0x00;
10477
        read_lo         = "  0   0   1   0      0   0   0   0",
10478
                          "a15 a14 a13 a12    a11 a10  a9  a8",
10479
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10480
                          "  o   o   o   o      o   o   o   o";
10481
 
10482
        read_hi         = "  0   0   1   0      1   0   0   0",
10483
                          "a15 a14 a13 a12    a11 a10  a9  a8",
10484
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10485
                          "  o   o   o   o      o   o   o   o";
10486
 
10487
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
10488
                          "  x   x   x   x      x   x   x   x",
10489
                          "  x  a6  a5  a4     a3  a2  a1  a0",
10490
                          "  i   i   i   i      i   i   i   i";
10491
 
10492
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
10493
                          "  x   x   x   x      x   x   x   x",
10494
                          "  x  a6  a5  a4     a3  a2  a1  a0",
10495
                          "  i   i   i   i      i   i   i   i";
10496
 
10497
        writepage       = "  0   1   0   0      1   1   0   0",
10498
                          "a15 a14 a13 a12    a11 a10  a9  a8",
10499
                          " a7   x   x   x      x   x   x   x",
10500
                          "  x   x   x   x      x   x   x   x";
10501
 
10502
	mode		= 0x41;
10503
	delay		= 10;
10504
	blocksize	= 256;
10505
	readsize	= 256;
10506
      ;
10507
 
10508
    memory "lfuse"
10509
        size            = 1;
10510
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
10511
                          "x x x x  x x x x  i i i i  i i i i";
10512
 
10513
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
10514
                          "x x x x  x x x x  o o o o  o o o o";
10515
        min_write_delay = 9000;
10516
        max_write_delay = 9000;
10517
      ;
10518
 
10519
    memory "hfuse"
10520
        size            = 1;
10521
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
10522
                          "x x x x  x x x x  i i i i  i i i i";
10523
 
10524
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
10525
                          "x x x x  x x x x  o o o o  o o o o";
10526
        min_write_delay = 9000;
10527
        max_write_delay = 9000;
10528
      ;
10529
 
10530
    memory "efuse"
10531
        size            = 1;
10532
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
10533
                          "x x x x  x x x x  x x x x  x i i i";
10534
 
10535
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
10536
                          "x x x x  x x x x  o o o o  o o o o";
10537
        min_write_delay = 9000;
10538
        max_write_delay = 9000;
10539
      ;
10540
 
10541
    memory "lock"
10542
        size            = 1;
10543
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
10544
                          "x x x x  x x x x   x x o o  o o o o";
10545
 
10546
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
10547
                          "x x x x  x x x x   1 1 i i  i i i i";
10548
        min_write_delay = 9000;
10549
        max_write_delay = 9000;
10550
      ;
10551
 
10552
    memory "calibration"
10553
        size            = 1;
10554
        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
10555
                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
10556
      ;
10557
 
10558
    memory "signature"
10559
        size            = 3;
10560
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
10561
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
10562
      ;
10563
  ;
10564
 
10565
#------------------------------------------------------------
10566
# ATmega1281
10567
#------------------------------------------------------------
10568
# Identical to ATmega1280
10569
 
10570
part
10571
    id               = "m1281";
10572
    desc             = "ATMEGA1281";
10573
    signature        = 0x1e 0x97 0x04;
10574
    has_jtag         = yes;
10575
#    stk500_devcode   = 0xB2;
10576
#    avr910_devcode   = 0x43;
10577
    chip_erase_delay = 9000;
10578
    pagel            = 0xD7;
10579
    bs2              = 0xA0;
10580
    reset            = dedicated;
10581
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
10582
                       "x x x x  x x x x    x x x x  x x x x";
10583
 
10584
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
10585
                       "x x x x  x x x x    x x x x  x x x x";
10586
 
10587
    timeout		= 200;
10588
    stabdelay		= 100;
10589
    cmdexedelay		= 25;
10590
    synchloops		= 32;
10591
    bytedelay		= 0;
10592
    pollindex		= 3;
10593
    pollvalue		= 0x53;
10594
    predelay		= 1;
10595
    postdelay		= 1;
10596
    pollmethod		= 1;
10597
 
10598
    pp_controlstack     =
10599
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
10600
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
10601
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
10602
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
10603
    hventerstabdelay    = 100;
10604
    progmodedelay       = 0;
10605
    latchcycles         = 5;
10606
    togglevtg           = 1;
10607
    poweroffdelay       = 15;
10608
    resetdelayms        = 1;
10609
    resetdelayus        = 0;
10610
    hvleavestabdelay    = 15;
10611
    chiperasepulsewidth = 0;
10612
    chiperasepolltimeout = 10;
10613
    programfusepulsewidth = 0;
10614
    programfusepolltimeout = 5;
10615
    programlockpulsewidth = 0;
10616
    programlockpolltimeout = 5;
10617
 
10618
    idr                 = 0x31;
10619
    spmcr               = 0x57;
10620
    rampz               = 0x3b;
10621
    allowfullpagebitstream = no;
10622
 
10623
    memory "eeprom"
10624
        paged           = no; /* leave this "no" */
10625
        page_size       = 8;  /* for parallel programming */
10626
        size            = 4096;
10627
        min_write_delay = 9000;
10628
        max_write_delay = 9000;
10629
        readback_p1     = 0x00;
10630
        readback_p2     = 0x00;
10631
        read            = "  1   0   1   0      0   0   0   0",
10632
                          "  x   x   x   x    a11 a10  a9  a8",
10633
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10634
                          "  o   o   o   o      o   o   o   o";
10635
 
10636
        write           = "  1   1   0   0      0   0   0   0",
10637
                          "  x   x   x   x    a11 a10  a9  a8",
10638
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10639
                          "  i   i   i   i      i   i   i   i";
10640
 
10641
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
10642
			  "  0   0   0   0      0   0   0   0",
10643
			  "  0   0   0   0      0  a2  a1  a0",
10644
			  "  i   i   i   i      i   i   i   i";
10645
 
10646
	writepage	= "  1   1   0   0      0   0   1   0",
10647
			  "  0   0   x   x    a11 a10  a9  a8",
10648
			  " a7  a6  a5  a4     a3   0   0   0",
10649
			  "  x   x   x   x      x   x   x   x";
10650
 
10651
	mode		= 0x41;
10652
	delay		= 10;
10653
	blocksize	= 8;
10654
	readsize	= 256;
10655
      ;
10656
 
10657
    memory "flash"
10658
        paged           = yes;
10659
        size            = 131072;
10660
        page_size       = 256;
10661
        num_pages       = 512;
10662
        min_write_delay = 4500;
10663
        max_write_delay = 4500;
10664
        readback_p1     = 0x00;
10665
        readback_p2     = 0x00;
10666
        read_lo         = "  0   0   1   0      0   0   0   0",
10667
                          "a15 a14 a13 a12    a11 a10  a9  a8",
10668
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10669
                          "  o   o   o   o      o   o   o   o";
10670
 
10671
        read_hi         = "  0   0   1   0      1   0   0   0",
10672
                          "a15 a14 a13 a12    a11 a10  a9  a8",
10673
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10674
                          "  o   o   o   o      o   o   o   o";
10675
 
10676
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
10677
                          "  x   x   x   x      x   x   x   x",
10678
                          "  x  a6  a5  a4     a3  a2  a1  a0",
10679
                          "  i   i   i   i      i   i   i   i";
10680
 
10681
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
10682
                          "  x   x   x   x      x   x   x   x",
10683
                          "  x  a6  a5  a4     a3  a2  a1  a0",
10684
                          "  i   i   i   i      i   i   i   i";
10685
 
10686
        writepage       = "  0   1   0   0      1   1   0   0",
10687
                          "a15 a14 a13 a12    a11 a10  a9  a8",
10688
                          " a7   x   x   x      x   x   x   x",
10689
                          "  x   x   x   x      x   x   x   x";
10690
 
10691
	mode		= 0x41;
10692
	delay		= 10;
10693
	blocksize	= 256;
10694
	readsize	= 256;
10695
      ;
10696
 
10697
    memory "lfuse"
10698
        size            = 1;
10699
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
10700
                          "x x x x  x x x x  i i i i  i i i i";
10701
 
10702
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
10703
                          "x x x x  x x x x  o o o o  o o o o";
10704
        min_write_delay = 9000;
10705
        max_write_delay = 9000;
10706
      ;
10707
 
10708
    memory "hfuse"
10709
        size            = 1;
10710
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
10711
                          "x x x x  x x x x  i i i i  i i i i";
10712
 
10713
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
10714
                          "x x x x  x x x x  o o o o  o o o o";
10715
        min_write_delay = 9000;
10716
        max_write_delay = 9000;
10717
      ;
10718
 
10719
    memory "efuse"
10720
        size            = 1;
10721
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
10722
                          "x x x x  x x x x  x x x x  x i i i";
10723
 
10724
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
10725
                          "x x x x  x x x x  o o o o  o o o o";
10726
        min_write_delay = 9000;
10727
        max_write_delay = 9000;
10728
      ;
10729
 
10730
    memory "lock"
10731
        size            = 1;
10732
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
10733
                          "x x x x  x x x x   x x o o  o o o o";
10734
 
10735
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
10736
                          "x x x x  x x x x   1 1 i i  i i i i";
10737
        min_write_delay = 9000;
10738
        max_write_delay = 9000;
10739
      ;
10740
 
10741
    memory "calibration"
10742
        size            = 1;
10743
        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
10744
                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
10745
      ;
10746
 
10747
    memory "signature"
10748
        size            = 3;
10749
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
10750
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
10751
      ;
10752
  ;
10753
 
10754
#------------------------------------------------------------
10755
# ATmega2560
10756
#------------------------------------------------------------
10757
 
10758
part
10759
    id               = "m2560";
10760
    desc             = "ATMEGA2560";
10761
    signature        = 0x1e 0x98 0x01;
10762
    has_jtag         = yes;
10763
#    stk500_devcode   = 0xB2;
10764
#    avr910_devcode   = 0x43;
10765
    chip_erase_delay = 9000;
10766
    pagel            = 0xD7;
10767
    bs2              = 0xA0;
10768
    reset            = dedicated;
10769
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
10770
                       "x x x x  x x x x    x x x x  x x x x";
10771
 
10772
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
10773
                       "x x x x  x x x x    x x x x  x x x x";
10774
 
10775
    timeout		= 200;
10776
    stabdelay		= 100;
10777
    cmdexedelay		= 25;
10778
    synchloops		= 32;
10779
    bytedelay		= 0;
10780
    pollindex		= 3;
10781
    pollvalue		= 0x53;
10782
    predelay		= 1;
10783
    postdelay		= 1;
10784
    pollmethod		= 1;
10785
 
10786
    pp_controlstack     =
10787
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
10788
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
10789
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
10790
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
10791
    hventerstabdelay    = 100;
10792
    progmodedelay       = 0;
10793
    latchcycles         = 5;
10794
    togglevtg           = 1;
10795
    poweroffdelay       = 15;
10796
    resetdelayms        = 1;
10797
    resetdelayus        = 0;
10798
    hvleavestabdelay    = 15;
10799
    chiperasepulsewidth = 0;
10800
    chiperasepolltimeout = 10;
10801
    programfusepulsewidth = 0;
10802
    programfusepolltimeout = 5;
10803
    programlockpulsewidth = 0;
10804
    programlockpolltimeout = 5;
10805
 
10806
    idr                 = 0x31;
10807
    spmcr               = 0x57;
10808
    rampz               = 0x3b;
10809
    allowfullpagebitstream = no;
10810
 
10811
    memory "eeprom"
10812
        paged           = no; /* leave this "no" */
10813
        page_size       = 8;  /* for parallel programming */
10814
        size            = 4096;
10815
        min_write_delay = 9000;
10816
        max_write_delay = 9000;
10817
        readback_p1     = 0x00;
10818
        readback_p2     = 0x00;
10819
        read            = "  1   0   1   0      0   0   0   0",
10820
                          "  x   x   x   x    a11 a10  a9  a8",
10821
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10822
                          "  o   o   o   o      o   o   o   o";
10823
 
10824
        write           = "  1   1   0   0      0   0   0   0",
10825
                          "  x   x   x   x    a11 a10  a9  a8",
10826
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10827
                          "  i   i   i   i      i   i   i   i";
10828
 
10829
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
10830
			  "  0   0   0   0      0   0   0   0",
10831
			  "  0   0   0   0      0  a2  a1  a0",
10832
			  "  i   i   i   i      i   i   i   i";
10833
 
10834
	writepage	= "  1   1   0   0      0   0   1   0",
10835
			  "  0   0   x   x    a11 a10  a9  a8",
10836
			  " a7  a6  a5  a4     a3   0   0   0",
10837
			  "  x   x   x   x      x   x   x   x";
10838
 
10839
	mode		= 0x41;
10840
	delay		= 10;
10841
	blocksize	= 8;
10842
	readsize	= 256;
10843
      ;
10844
 
10845
    memory "flash"
10846
        paged           = yes;
10847
        size            = 262144;
10848
        page_size       = 256;
10849
        num_pages       = 1024;
10850
        min_write_delay = 4500;
10851
        max_write_delay = 4500;
10852
        readback_p1     = 0x00;
10853
        readback_p2     = 0x00;
10854
        read_lo         = "  0   0   1   0      0   0   0   0",
10855
                          "a15 a14 a13 a12    a11 a10  a9  a8",
10856
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10857
                          "  o   o   o   o      o   o   o   o";
10858
 
10859
        read_hi         = "  0   0   1   0      1   0   0   0",
10860
                          "a15 a14 a13 a12    a11 a10  a9  a8",
10861
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10862
                          "  o   o   o   o      o   o   o   o";
10863
 
10864
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
10865
                          "  x   x   x   x      x   x   x   x",
10866
                          "  x  a6  a5  a4     a3  a2  a1  a0",
10867
                          "  i   i   i   i      i   i   i   i";
10868
 
10869
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
10870
                          "  x   x   x   x      x   x   x   x",
10871
                          "  x  a6  a5  a4     a3  a2  a1  a0",
10872
                          "  i   i   i   i      i   i   i   i";
10873
 
10874
        writepage       = "  0   1   0   0      1   1   0   0",
10875
                          "a15 a14 a13 a12    a11 a10  a9  a8",
10876
                          " a7   x   x   x      x   x   x   x",
10877
                          "  x   x   x   x      x   x   x   x";
10878
 
10879
        load_ext_addr   = "  0   1   0   0      1   1   0   1",
10880
                          "  0   0   0   0      0   0   0   0",
10881
                          "  0   0   0   0      0   0   0 a16",
10882
                          "  0   0   0   0      0   0   0   0";
10883
 
10884
	mode		= 0x41;
10885
	delay		= 10;
10886
	blocksize	= 256;
10887
	readsize	= 256;
10888
      ;
10889
 
10890
    memory "lfuse"
10891
        size            = 1;
10892
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
10893
                          "x x x x  x x x x  i i i i  i i i i";
10894
 
10895
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
10896
                          "x x x x  x x x x  o o o o  o o o o";
10897
        min_write_delay = 9000;
10898
        max_write_delay = 9000;
10899
      ;
10900
 
10901
    memory "hfuse"
10902
        size            = 1;
10903
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
10904
                          "x x x x  x x x x  i i i i  i i i i";
10905
 
10906
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
10907
                          "x x x x  x x x x  o o o o  o o o o";
10908
        min_write_delay = 9000;
10909
        max_write_delay = 9000;
10910
      ;
10911
 
10912
    memory "efuse"
10913
        size            = 1;
10914
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
10915
                          "x x x x  x x x x  x x x x  x i i i";
10916
 
10917
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
10918
                          "x x x x  x x x x  o o o o  o o o o";
10919
        min_write_delay = 9000;
10920
        max_write_delay = 9000;
10921
      ;
10922
 
10923
    memory "lock"
10924
        size            = 1;
10925
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
10926
                          "x x x x  x x x x   x x o o  o o o o";
10927
 
10928
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
10929
                          "x x x x  x x x x   1 1 i i  i i i i";
10930
        min_write_delay = 9000;
10931
        max_write_delay = 9000;
10932
      ;
10933
 
10934
    memory "calibration"
10935
        size            = 1;
10936
        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
10937
                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
10938
      ;
10939
 
10940
    memory "signature"
10941
        size            = 3;
10942
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
10943
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
10944
      ;
10945
  ;
10946
 
10947
#------------------------------------------------------------
10948
# ATmega2561
10949
#------------------------------------------------------------
10950
 
10951
part
10952
    id               = "m2561";
10953
    desc             = "ATMEGA2561";
10954
    signature        = 0x1e 0x98 0x02;
10955
    has_jtag         = yes;
10956
#    stk500_devcode   = 0xB2;
10957
#    avr910_devcode   = 0x43;
10958
    chip_erase_delay = 9000;
10959
    pagel            = 0xD7;
10960
    bs2              = 0xA0;
10961
    reset            = dedicated;
10962
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
10963
                       "x x x x  x x x x    x x x x  x x x x";
10964
 
10965
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
10966
                       "x x x x  x x x x    x x x x  x x x x";
10967
 
10968
    timeout		= 200;
10969
    stabdelay		= 100;
10970
    cmdexedelay		= 25;
10971
    synchloops		= 32;
10972
    bytedelay		= 0;
10973
    pollindex		= 3;
10974
    pollvalue		= 0x53;
10975
    predelay		= 1;
10976
    postdelay		= 1;
10977
    pollmethod		= 1;
10978
 
10979
    pp_controlstack     =
10980
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
10981
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
10982
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
10983
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
10984
    hventerstabdelay    = 100;
10985
    progmodedelay       = 0;
10986
    latchcycles         = 5;
10987
    togglevtg           = 1;
10988
    poweroffdelay       = 15;
10989
    resetdelayms        = 1;
10990
    resetdelayus        = 0;
10991
    hvleavestabdelay    = 15;
10992
    chiperasepulsewidth = 0;
10993
    chiperasepolltimeout = 10;
10994
    programfusepulsewidth = 0;
10995
    programfusepolltimeout = 5;
10996
    programlockpulsewidth = 0;
10997
    programlockpolltimeout = 5;
10998
 
10999
    idr                 = 0x31;
11000
    spmcr               = 0x57;
11001
    rampz               = 0x3b;
11002
    allowfullpagebitstream = no;
11003
 
11004
    memory "eeprom"
11005
        paged           = no; /* leave this "no" */
11006
        page_size       = 8;  /* for parallel programming */
11007
        size            = 4096;
11008
        min_write_delay = 9000;
11009
        max_write_delay = 9000;
11010
        readback_p1     = 0x00;
11011
        readback_p2     = 0x00;
11012
        read            = "  1   0   1   0      0   0   0   0",
11013
                          "  x   x   x   x    a11 a10  a9  a8",
11014
                          " a7  a6  a5  a4     a3  a2  a1  a0",
11015
                          "  o   o   o   o      o   o   o   o";
11016
 
11017
        write           = "  1   1   0   0      0   0   0   0",
11018
                          "  x   x   x   x    a11 a10  a9  a8",
11019
                          " a7  a6  a5  a4     a3  a2  a1  a0",
11020
                          "  i   i   i   i      i   i   i   i";
11021
 
11022
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
11023
			  "  0   0   0   0      0   0   0   0",
11024
			  "  0   0   0   0      0  a2  a1  a0",
11025
			  "  i   i   i   i      i   i   i   i";
11026
 
11027
	writepage	= "  1   1   0   0      0   0   1   0",
11028
			  "  0   0   x   x    a11 a10  a9  a8",
11029
			  " a7  a6  a5  a4     a3   0   0   0",
11030
			  "  x   x   x   x      x   x   x   x";
11031
 
11032
	mode		= 0x41;
11033
	delay		= 10;
11034
	blocksize	= 8;
11035
	readsize	= 256;
11036
      ;
11037
 
11038
    memory "flash"
11039
        paged           = yes;
11040
        size            = 262144;
11041
        page_size       = 256;
11042
        num_pages       = 1024;
11043
        min_write_delay = 4500;
11044
        max_write_delay = 4500;
11045
        readback_p1     = 0x00;
11046
        readback_p2     = 0x00;
11047
        read_lo         = "  0   0   1   0      0   0   0   0",
11048
                          "a15 a14 a13 a12    a11 a10  a9  a8",
11049
                          " a7  a6  a5  a4     a3  a2  a1  a0",
11050
                          "  o   o   o   o      o   o   o   o";
11051
 
11052
        read_hi         = "  0   0   1   0      1   0   0   0",
11053
                          "a15 a14 a13 a12    a11 a10  a9  a8",
11054
                          " a7  a6  a5  a4     a3  a2  a1  a0",
11055
                          "  o   o   o   o      o   o   o   o";
11056
 
11057
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
11058
                          "  x   x   x   x      x   x   x   x",
11059
                          "  x  a6  a5  a4     a3  a2  a1  a0",
11060
                          "  i   i   i   i      i   i   i   i";
11061
 
11062
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
11063
                          "  x   x   x   x      x   x   x   x",
11064
                          "  x  a6  a5  a4     a3  a2  a1  a0",
11065
                          "  i   i   i   i      i   i   i   i";
11066
 
11067
        writepage       = "  0   1   0   0      1   1   0   0",
11068
                          "a15 a14 a13 a12    a11 a10  a9  a8",
11069
                          " a7   x   x   x      x   x   x   x",
11070
                          "  x   x   x   x      x   x   x   x";
11071
 
11072
        load_ext_addr   = "  0   1   0   0      1   1   0   1",
11073
                          "  0   0   0   0      0   0   0   0",
11074
                          "  0   0   0   0      0   0   0 a16",
11075
                          "  0   0   0   0      0   0   0   0";
11076
 
11077
	mode		= 0x41;
11078
	delay		= 10;
11079
	blocksize	= 256;
11080
	readsize	= 256;
11081
      ;
11082
 
11083
    memory "lfuse"
11084
        size            = 1;
11085
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
11086
                          "x x x x  x x x x  i i i i  i i i i";
11087
 
11088
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
11089
                          "x x x x  x x x x  o o o o  o o o o";
11090
        min_write_delay = 9000;
11091
        max_write_delay = 9000;
11092
      ;
11093
 
11094
    memory "hfuse"
11095
        size            = 1;
11096
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
11097
                          "x x x x  x x x x  i i i i  i i i i";
11098
 
11099
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
11100
                          "x x x x  x x x x  o o o o  o o o o";
11101
        min_write_delay = 9000;
11102
        max_write_delay = 9000;
11103
      ;
11104
 
11105
    memory "efuse"
11106
        size            = 1;
11107
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
11108
                          "x x x x  x x x x  x x x x  x i i i";
11109
 
11110
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
11111
                          "x x x x  x x x x  o o o o  o o o o";
11112
        min_write_delay = 9000;
11113
        max_write_delay = 9000;
11114
      ;
11115
 
11116
    memory "lock"
11117
        size            = 1;
11118
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
11119
                          "x x x x  x x x x   x x o o  o o o o";
11120
 
11121
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
11122
                          "x x x x  x x x x   1 1 i i  i i i i";
11123
        min_write_delay = 9000;
11124
        max_write_delay = 9000;
11125
      ;
11126
 
11127
    memory "calibration"
11128
        size            = 1;
11129
        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
11130
                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
11131
      ;
11132
 
11133
    memory "signature"
11134
        size            = 3;
11135
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
11136
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
11137
      ;
11138
  ;
11139
 
11140
#------------------------------------------------------------
11141
# ATmega128RFA1
11142
#------------------------------------------------------------
11143
# Identical to ATmega2561 but half the ROM
11144
 
11145
part
11146
    id               = "m128rfa1";
11147
    desc             = "ATMEGA128RFA1";
11148
    signature        = 0x1e 0xa7 0x01;
11149
    has_jtag         = yes;
11150
#    stk500_devcode   = 0xB2;
11151
#    avr910_devcode   = 0x43;
11152
    chip_erase_delay = 9000;
11153
    pagel            = 0xD7;
11154
    bs2              = 0xE2;
11155
    reset            = dedicated;
11156
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
11157
                       "x x x x  x x x x    x x x x  x x x x";
11158
 
11159
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
11160
                       "x x x x  x x x x    x x x x  x x x x";
11161
 
11162
    timeout		= 200;
11163
    stabdelay		= 100;
11164
    cmdexedelay		= 25;
11165
    synchloops		= 32;
11166
    bytedelay		= 0;
11167
    pollindex		= 3;
11168
    pollvalue		= 0x53;
11169
    predelay		= 1;
11170
    postdelay		= 1;
11171
    pollmethod		= 1;
11172
 
11173
    pp_controlstack     =
11174
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
11175
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
11176
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
11177
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
11178
    hventerstabdelay    = 100;
11179
    progmodedelay       = 0;
11180
    latchcycles         = 5;
11181
    togglevtg           = 1;
11182
    poweroffdelay       = 15;
11183
    resetdelayms        = 1;
11184
    resetdelayus        = 0;
11185
    hvleavestabdelay    = 15;
11186
    chiperasepulsewidth = 0;
11187
    chiperasepolltimeout = 10;
11188
    programfusepulsewidth = 0;
11189
    programfusepolltimeout = 5;
11190
    programlockpulsewidth = 0;
11191
    programlockpolltimeout = 5;
11192
 
11193
    idr                 = 0x31;
11194
    spmcr               = 0x57;
11195
    rampz               = 0x3b;
11196
    allowfullpagebitstream = no;
11197
 
11198
    memory "eeprom"
11199
        paged           = no; /* leave this "no" */
11200
        page_size       = 8;  /* for parallel programming */
11201
        size            = 4096;
11202
        min_write_delay = 9000;
11203
        max_write_delay = 9000;
11204
        readback_p1     = 0x00;
11205
        readback_p2     = 0x00;
11206
        read            = "  1   0   1   0      0   0   0   0",
11207
                          "  x   x   x   x    a11 a10  a9  a8",
11208
                          " a7  a6  a5  a4     a3  a2  a1  a0",
11209
                          "  o   o   o   o      o   o   o   o";
11210
 
11211
        write           = "  1   1   0   0      0   0   0   0",
11212
                          "  x   x   x   x    a11 a10  a9  a8",
11213
                          " a7  a6  a5  a4     a3  a2  a1  a0",
11214
                          "  i   i   i   i      i   i   i   i";
11215
 
11216
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
11217
			  "  0   0   0   0      0   0   0   0",
11218
			  "  0   0   0   0      0  a2  a1  a0",
11219
			  "  i   i   i   i      i   i   i   i";
11220
 
11221
	writepage	= "  1   1   0   0      0   0   1   0",
11222
			  "  0   0   x   x    a11 a10  a9  a8",
11223
			  " a7  a6  a5  a4     a3   0   0   0",
11224
			  "  x   x   x   x      x   x   x   x";
11225
 
11226
	mode		= 0x41;
11227
	delay		= 10;
11228
	blocksize	= 8;
11229
	readsize	= 256;
11230
      ;
11231
 
11232
    memory "flash"
11233
        paged           = yes;
11234
        size            = 131072;
11235
        page_size       = 256;
11236
        num_pages       = 512;
11237
        min_write_delay = 4500;
11238
        max_write_delay = 4500;
11239
        readback_p1     = 0x00;
11240
        readback_p2     = 0x00;
11241
        read_lo         = "  0   0   1   0      0   0   0   0",
11242
                          "a15 a14 a13 a12    a11 a10  a9  a8",
11243
                          " a7  a6  a5  a4     a3  a2  a1  a0",
11244
                          "  o   o   o   o      o   o   o   o";
11245
 
11246
        read_hi         = "  0   0   1   0      1   0   0   0",
11247
                          "a15 a14 a13 a12    a11 a10  a9  a8",
11248
                          " a7  a6  a5  a4     a3  a2  a1  a0",
11249
                          "  o   o   o   o      o   o   o   o";
11250
 
11251
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
11252
                          "  x   x   x   x      x   x   x   x",
11253
                          "  x  a6  a5  a4     a3  a2  a1  a0",
11254
                          "  i   i   i   i      i   i   i   i";
11255
 
11256
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
11257
                          "  x   x   x   x      x   x   x   x",
11258
                          "  x  a6  a5  a4     a3  a2  a1  a0",
11259
                          "  i   i   i   i      i   i   i   i";
11260
 
11261
        writepage       = "  0   1   0   0      1   1   0   0",
11262
                          "a15 a14 a13 a12    a11 a10  a9  a8",
11263
                          " a7   x   x   x      x   x   x   x",
11264
                          "  x   x   x   x      x   x   x   x";
11265
 
11266
	mode		= 0x41;
11267
	delay		= 10;
11268
	blocksize	= 256;
11269
	readsize	= 256;
11270
      ;
11271
 
11272
    memory "lfuse"
11273
        size            = 1;
11274
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
11275
                          "x x x x  x x x x  i i i i  i i i i";
11276
 
11277
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
11278
                          "x x x x  x x x x  o o o o  o o o o";
11279
        min_write_delay = 9000;
11280
        max_write_delay = 9000;
11281
      ;
11282
 
11283
    memory "hfuse"
11284
        size            = 1;
11285
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
11286
                          "x x x x  x x x x  i i i i  i i i i";
11287
 
11288
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
11289
                          "x x x x  x x x x  o o o o  o o o o";
11290
        min_write_delay = 9000;
11291
        max_write_delay = 9000;
11292
      ;
11293
 
11294
    memory "efuse"
11295
        size            = 1;
11296
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
11297
                          "x x x x  x x x x  x x x x  x i i i";
11298
 
11299
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
11300
                          "x x x x  x x x x  o o o o  o o o o";
11301
        min_write_delay = 9000;
11302
        max_write_delay = 9000;
11303
      ;
11304
 
11305
    memory "lock"
11306
        size            = 1;
11307
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
11308
                          "x x x x  x x x x   x x o o  o o o o";
11309
 
11310
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
11311
                          "x x x x  x x x x   1 1 i i  i i i i";
11312
        min_write_delay = 9000;
11313
        max_write_delay = 9000;
11314
      ;
11315
 
11316
    memory "calibration"
11317
        size            = 1;
11318
        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
11319
                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
11320
      ;
11321
 
11322
    memory "signature"
11323
        size            = 3;
11324
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
11325
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
11326
      ;
11327
  ;
11328
 
11329
#------------------------------------------------------------
11330
# ATtiny24
11331
#------------------------------------------------------------
11332
 
11333
part
11334
     id            = "t24";
11335
     desc          = "ATtiny24";
11336
     has_debugwire = yes;
11337
     flash_instr   = 0xB4, 0x07, 0x17;
11338
     eeprom_instr  = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
11339
	             0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC,
11340
	             0x99, 0xE1, 0xBB, 0xAC;
11341
## no STK500 devcode in XML file, use the ATtiny45 one
11342
     stk500_devcode   = 0x14;
11343
##  avr910_devcode   = ?;
11344
##  Try the AT90S2313 devcode:
11345
     avr910_devcode   = 0x20;
11346
     signature        = 0x1e 0x91 0x0b;
11347
     reset            = io;
11348
     chip_erase_delay = 4500;
11349
 
11350
     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
11351
                        "x x x x  x x x x    x x x x  x x x x";
11352
 
11353
     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
11354
                        "x x x x  x x x x    x x x x  x x x x";
11355
 
11356
    timeout		= 200;
11357
    stabdelay		= 100;
11358
    cmdexedelay		= 25;
11359
    synchloops		= 32;
11360
    bytedelay		= 0;
11361
    pollindex		= 3;
11362
    pollvalue		= 0x53;
11363
    predelay		= 1;
11364
    postdelay		= 1;
11365
    pollmethod		= 1;
11366
 
11367
    hvsp_controlstack   =
11368
        0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
11369
        0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
11370
        0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
11371
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0F;
11372
    hventerstabdelay    = 100;
11373
    hvspcmdexedelay     = 0;
11374
    synchcycles         = 6;
11375
    latchcycles         = 1;
11376
    togglevtg           = 1;
11377
    poweroffdelay       = 25;
11378
    resetdelayms        = 0;
11379
    resetdelayus        = 70;
11380
    hvleavestabdelay    = 100;
11381
    resetdelay          = 25;
11382
    chiperasepolltimeout = 40;
11383
    chiperasetime       = 0;
11384
    programfusepolltimeout = 25;
11385
    programlockpolltimeout = 25;
11386
 
11387
     memory "eeprom"
11388
         size            = 128;
11389
        paged           = no;
11390
        page_size       = 4;
11391
         min_write_delay = 4000;
11392
         max_write_delay = 4500;
11393
         readback_p1     = 0xff;
11394
         readback_p2     = 0xff;
11395
         read            = "1  0  1  0   0  0  0  0   0 0 0 x  x x x x",
11396
                           "x a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
11397
 
11398
         write           = "1  1  0  0   0  0  0  0   0 0 0 x  x x x x",
11399
                           "x a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
11400
 
11401
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
11402
			  "  0   0   0   0      0   0   0   0",
11403
			  "  0   0   0   0      0   0  a1  a0",
11404
			  "  i   i   i   i      i   i   i   i";
11405
 
11406
	writepage	= "  1   1   0   0      0   0   1   0",
11407
			  "  0   0   x   x      x   x   x   x",
11408
			  "  x  a6  a5  a4     a3  a2   0   0",
11409
			  "  x   x   x   x      x   x   x   x";
11410
 
11411
	mode		= 0x41;
11412
	delay		= 6;
11413
	blocksize	= 4;
11414
	readsize	= 256;
11415
       ;
11416
     memory "flash"
11417
         paged           = yes;
11418
         size            = 2048;
11419
         page_size       = 32;
11420
         num_pages       = 64;
11421
         min_write_delay = 4500;
11422
         max_write_delay = 4500;
11423
         readback_p1     = 0xff;
11424
         readback_p2     = 0xff;
11425
         read_lo         = "  0   0   1   0    0   0   0   0",
11426
                           "  0   0   0   0    0   0  a9  a8",
11427
                           " a7  a6  a5  a4   a3  a2  a1  a0",
11428
                           "  o   o   o   o    o   o   o   o";
11429
 
11430
         read_hi         = "  0   0   1   0    1   0   0   0",
11431
                           "  0   0   0   0    0   0  a9  a8",
11432
                           " a7  a6  a5  a4   a3  a2  a1  a0",
11433
                           "  o   o   o   o    o   o   o   o";
11434
 
11435
         loadpage_lo     = "  0   1   0   0    0   0   0   0",
11436
                           "  0   0   0   x    x   x   x   x",
11437
                           "  x   x   x   x   a3  a2  a1  a0",
11438
                           "  i   i   i   i    i   i   i   i";
11439
 
11440
         loadpage_hi     = "  0   1   0   0    1   0   0   0",
11441
                           "  0   0   0   x    x   x   x   x",
11442
                           "  x   x   x   x   a3  a2  a1  a0",
11443
                           "  i   i   i   i    i   i   i   i";
11444
 
11445
         writepage       = "  0  1  0  0   1  1  0  0",
11446
                           "  0  0  0  0   0  0 a9 a8",
11447
                           " a7 a6 a5 a4   x  x  x  x",
11448
                           "  x  x  x  x   x  x  x  x";
11449
 
11450
	mode		= 0x41;
11451
	delay		= 6;
11452
	blocksize	= 32;
11453
	readsize	= 256;
11454
       ;
11455
#   ATtiny24 has Signature Bytes: 0x1E 0x91 0x0B.
11456
     memory "signature"
11457
         size            = 3;
11458
         read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
11459
                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
11460
       ;
11461
     memory "lock"
11462
         size            = 1;
11463
         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
11464
                           "x x x x  x x x x  x x x x  x x i i";
11465
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
11466
                           "0 0 0 0  0 0 0 0  o o o o  o o o o";
11467
        min_write_delay = 9000;
11468
        max_write_delay = 9000;
11469
       ;
11470
 
11471
     memory "lfuse"
11472
         size            = 1;
11473
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
11474
                           "x x x x  x x x x  i i i i  i i i i";
11475
 
11476
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
11477
                           "x x x x  x x x x  o o o o  o o o o";
11478
        min_write_delay = 9000;
11479
        max_write_delay = 9000;
11480
       ;
11481
 
11482
     memory "hfuse"
11483
         size            = 1;
11484
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
11485
                           "x x x x  x x x x  i i i i  i i i i";
11486
 
11487
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
11488
                           "x x x x  x x x x  o o o o  o o o o";
11489
        min_write_delay = 9000;
11490
        max_write_delay = 9000;
11491
       ;
11492
 
11493
     memory "efuse"
11494
         size            = 1;
11495
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
11496
                           "x x x x  x x x x  x x x x  x x x i";
11497
 
11498
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
11499
                           "x x x x  x x x x  o o o o  o o o o";
11500
        min_write_delay = 9000;
11501
        max_write_delay = 9000;
11502
     ;
11503
 
11504
     memory "calibration"
11505
         size            = 1;
11506
         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
11507
                           "0  0  0  0   0  0  0  a0   o o o o  o o o o";
11508
     ;
11509
  ;
11510
 
11511
#------------------------------------------------------------
11512
# ATtiny44
11513
#------------------------------------------------------------
11514
 
11515
part
11516
     id            = "t44";
11517
     desc          = "ATtiny44";
11518
     has_debugwire = yes;
11519
     flash_instr   = 0xB4, 0x07, 0x17;
11520
     eeprom_instr  = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
11521
                     0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC,
11522
                     0x99, 0xE1, 0xBB, 0xAC;
11523
## no STK500 devcode in XML file, use the ATtiny45 one
11524
     stk500_devcode   = 0x14;
11525
##  avr910_devcode   = ?;
11526
##  Try the AT90S2313 devcode:
11527
     avr910_devcode   = 0x20;
11528
     signature        = 0x1e 0x92 0x07;
11529
     reset            = io;
11530
     chip_erase_delay = 4500;
11531
 
11532
     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
11533
                        "x x x x  x x x x    x x x x  x x x x";
11534
 
11535
     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
11536
                        "x x x x  x x x x    x x x x  x x x x";
11537
 
11538
    timeout		= 200;
11539
    stabdelay		= 100;
11540
    cmdexedelay		= 25;
11541
    synchloops		= 32;
11542
    bytedelay		= 0;
11543
    pollindex		= 3;
11544
    pollvalue		= 0x53;
11545
    predelay		= 1;
11546
    postdelay		= 1;
11547
    pollmethod		= 1;
11548
 
11549
    hvsp_controlstack   =
11550
        0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
11551
        0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
11552
        0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
11553
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0F;
11554
    hventerstabdelay    = 100;
11555
    hvspcmdexedelay     = 0;
11556
    synchcycles         = 6;
11557
    latchcycles         = 1;
11558
    togglevtg           = 1;
11559
    poweroffdelay       = 25;
11560
    resetdelayms        = 0;
11561
    resetdelayus        = 70;
11562
    hvleavestabdelay    = 100;
11563
    resetdelay          = 25;
11564
    chiperasepolltimeout = 40;
11565
    chiperasetime       = 0;
11566
    programfusepolltimeout = 25;
11567
    programlockpolltimeout = 25;
11568
 
11569
     memory "eeprom"
11570
         size            = 256;
11571
        paged           = no;
11572
        page_size       = 4;
11573
         min_write_delay = 4000;
11574
         max_write_delay = 4500;
11575
         readback_p1     = 0xff;
11576
         readback_p2     = 0xff;
11577
         read            = "1  0  1  0   0  0  0  0    0 0 0 x  x x x x",
11578
                           "a7 a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
11579
 
11580
         write           = "1  1  0  0   0  0  0  0    0 0 0 x  x x x x",
11581
                           "a7 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
11582
 
11583
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
11584
			  "  0   0   0   0      0   0   0   0",
11585
			  "  0   0   0   0      0   0  a1  a0",
11586
			  "  i   i   i   i      i   i   i   i";
11587
 
11588
	writepage	= "  1   1   0   0      0   0   1   0",
11589
			  "  0   0   x   x      x   x   x   x",
11590
			  "  x  a6  a5  a4     a3  a2   0   0",
11591
			  "  x   x   x   x      x   x   x   x";
11592
 
11593
	mode		= 0x41;
11594
	delay		= 6;
11595
	blocksize	= 4;
11596
	readsize	= 256;
11597
       ;
11598
     memory "flash"
11599
         paged           = yes;
11600
         size            = 4096;
11601
         page_size       = 64;
11602
         num_pages       = 64;
11603
         min_write_delay = 4500;
11604
         max_write_delay = 4500;
11605
         readback_p1     = 0xff;
11606
         readback_p2     = 0xff;
11607
         read_lo         = "  0   0   1   0    0   0   0   0",
11608
                           "  0   0   0   0    0  a10 a9  a8",
11609
                           " a7  a6  a5  a4   a3  a2  a1  a0",
11610
                           "  o   o   o   o    o   o   o   o";
11611
 
11612
         read_hi         = "  0   0   1   0    1   0   0   0",
11613
                           "  0   0   0   0    0  a10 a9  a8",
11614
                           " a7  a6  a5  a4   a3  a2  a1  a0",
11615
                           "  o   o   o   o    o   o   o   o";
11616
 
11617
         loadpage_lo     = "  0   1   0   0    0   0   0   0",
11618
                           "  0   0   0   x    x   x   x   x",
11619
                           "  x   x   x  a4   a3  a2  a1  a0",
11620
                           "  i   i   i   i    i   i   i   i";
11621
 
11622
         loadpage_hi     = "  0   1   0   0    1   0   0   0",
11623
                           "  0   0   0   x    x   x   x   x",
11624
                           "  x   x   x  a4   a3  a2  a1  a0",
11625
                           "  i   i   i   i    i   i   i   i";
11626
 
11627
         writepage       = "  0  1  0  0   1  1  0  0",
11628
                           "  0  0  0  0   0 a10 a9 a8",
11629
                           " a7 a6 a5  x   x  x  x  x",
11630
                           "  x  x  x  x   x  x  x  x";
11631
 
11632
	mode		= 0x41;
11633
	delay		= 6;
11634
	blocksize	= 32;
11635
	readsize	= 256;
11636
       ;
11637
#   ATtiny44 has Signature Bytes: 0x1E 0x92 0x07.
11638
     memory "signature"
11639
         size            = 3;
11640
         read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
11641
                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
11642
       ;
11643
     memory "lock"
11644
         size            = 1;
11645
         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
11646
                           "x x x x  x x x x  x x x x  x x i i";
11647
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
11648
                           "0 0 0 0  0 0 0 0  o o o o  o o o o";
11649
        min_write_delay = 9000;
11650
        max_write_delay = 9000;
11651
       ;
11652
 
11653
     memory "lfuse"
11654
         size            = 1;
11655
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
11656
                           "x x x x  x x x x  i i i i  i i i i";
11657
 
11658
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
11659
                           "x x x x  x x x x  o o o o  o o o o";
11660
        min_write_delay = 9000;
11661
        max_write_delay = 9000;
11662
       ;
11663
 
11664
     memory "hfuse"
11665
         size            = 1;
11666
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
11667
                           "x x x x  x x x x  i i i i  i i i i";
11668
 
11669
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
11670
                           "x x x x  x x x x  o o o o  o o o o";
11671
        min_write_delay = 9000;
11672
        max_write_delay = 9000;
11673
       ;
11674
 
11675
     memory "efuse"
11676
         size            = 1;
11677
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
11678
                           "x x x x  x x x x  x x x x  x x x i";
11679
 
11680
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
11681
                           "x x x x  x x x x  o o o o  o o o o";
11682
        min_write_delay = 9000;
11683
        max_write_delay = 9000;
11684
     ;
11685
 
11686
     memory "calibration"
11687
         size            = 1;
11688
         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
11689
                           "0  0  0  0   0  0  0  a0   o o o o  o o o o";
11690
     ;
11691
  ;
11692
 
11693
#------------------------------------------------------------
11694
# ATtiny84
11695
#------------------------------------------------------------
11696
 
11697
part
11698
     id            = "t84";
11699
     desc          = "ATtiny84";
11700
     has_debugwire = yes;
11701
     flash_instr   = 0xB4, 0x07, 0x17;
11702
     eeprom_instr  = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
11703
	             0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC,
11704
	             0x99, 0xE1, 0xBB, 0xAC;
11705
## no STK500 devcode in XML file, use the ATtiny45 one
11706
     stk500_devcode   = 0x14;
11707
##  avr910_devcode   = ?;
11708
##  Try the AT90S2313 devcode:
11709
     avr910_devcode   = 0x20;
11710
     signature        = 0x1e 0x93 0x0c;
11711
     reset            = io;
11712
     chip_erase_delay = 4500;
11713
 
11714
     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
11715
                        "x x x x  x x x x    x x x x  x x x x";
11716
 
11717
     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
11718
                        "x x x x  x x x x    x x x x  x x x x";
11719
 
11720
    timeout		= 200;
11721
    stabdelay		= 100;
11722
    cmdexedelay		= 25;
11723
    synchloops		= 32;
11724
    bytedelay		= 0;
11725
    pollindex		= 3;
11726
    pollvalue		= 0x53;
11727
    predelay		= 1;
11728
    postdelay		= 1;
11729
    pollmethod		= 1;
11730
 
11731
    hvsp_controlstack   =
11732
        0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
11733
        0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
11734
        0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
11735
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0F;
11736
    hventerstabdelay    = 100;
11737
    hvspcmdexedelay     = 0;
11738
    synchcycles         = 6;
11739
    latchcycles         = 1;
11740
    togglevtg           = 1;
11741
    poweroffdelay       = 25;
11742
    resetdelayms        = 0;
11743
    resetdelayus        = 70;
11744
    hvleavestabdelay    = 100;
11745
    resetdelay          = 25;
11746
    chiperasepolltimeout = 40;
11747
    chiperasetime       = 0;
11748
    programfusepolltimeout = 25;
11749
    programlockpolltimeout = 25;
11750
 
11751
     memory "eeprom"
11752
         size            = 512;
11753
        paged           = no;
11754
        page_size       = 4;
11755
         min_write_delay = 4000;
11756
         max_write_delay = 4500;
11757
         readback_p1     = 0xff;
11758
         readback_p2     = 0xff;
11759
         read            = "1  0  1  0   0  0  0  0    0 0 0 x  x x x a8",
11760
                           "a7 a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
11761
 
11762
         write           = "1  1  0  0   0  0  0  0    0 0 0 x  x x x a8",
11763
                           "a8 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
11764
 
11765
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
11766
			  "  0   0   0   0      0   0   0   0",
11767
			  "  0   0   0   0      0   0  a1  a0",
11768
			  "  i   i   i   i      i   i   i   i";
11769
 
11770
	writepage	= "  1   1   0   0      0   0   1   0",
11771
			  "  0   0   x   x      x   x   x   x",
11772
			  "  x  a6  a5  a4     a3  a2   0   0",
11773
			  "  x   x   x   x      x   x   x   x";
11774
 
11775
	mode		= 0x41;
11776
	delay		= 6;
11777
	blocksize	= 4;
11778
	readsize	= 256;
11779
       ;
11780
     memory "flash"
11781
         paged           = yes;
11782
         size            = 8192;
11783
         page_size       = 64;
11784
         num_pages       = 128;
11785
         min_write_delay = 4500;
11786
         max_write_delay = 4500;
11787
         readback_p1     = 0xff;
11788
         readback_p2     = 0xff;
11789
         read_lo         = "  0   0   1   0    0   0   0   0",
11790
                           "  0   0   0   0  a11 a10  a9  a8",
11791
                           " a7  a6  a5  a4   a3  a2  a1  a0",
11792
                           "  o   o   o   o    o   o   o   o";
11793
 
11794
         read_hi         = "  0   0   1   0    1   0   0   0",
11795
                           "  0   0   0   0  a11 a10  a9  a8",
11796
                           " a7  a6  a5  a4   a3  a2  a1  a0",
11797
                           "  o   o   o   o    o   o   o   o";
11798
 
11799
         loadpage_lo     = "  0   1   0   0    0   0   0   0",
11800
                           "  0   0   0   x    x   x   x   x",
11801
                           "  x   x   x  a4   a3  a2  a1  a0",
11802
                           "  i   i   i   i    i   i   i   i";
11803
 
11804
         loadpage_hi     = "  0   1   0   0    1   0   0   0",
11805
                           "  0   0   0   x    x   x   x   x",
11806
                           "  x   x   x  a4   a3  a2  a1  a0",
11807
                           "  i   i   i   i    i   i   i   i";
11808
 
11809
         writepage       = "  0  1  0  0   1   1   0  0",
11810
                           "  0  0  0  0  a11 a10 a9 a8",
11811
                           " a7 a6 a5  x   x  x  x  x",
11812
                           "  x  x  x  x   x  x  x  x";
11813
 
11814
	mode		= 0x41;
11815
	delay		= 6;
11816
	blocksize	= 32;
11817
	readsize	= 256;
11818
       ;
11819
#   ATtiny84 has Signature Bytes: 0x1E 0x93 0x0C.
11820
     memory "signature"
11821
         size            = 3;
11822
         read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
11823
                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
11824
       ;
11825
 
11826
     memory "lock"
11827
         size            = 1;
11828
         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
11829
                           "x x x x  x x x x  x x x x  x x i i";
11830
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
11831
                           "0 0 0 0  0 0 0 0  o o o o  o o o o";
11832
        min_write_delay = 9000;
11833
        max_write_delay = 9000;
11834
       ;
11835
 
11836
     memory "lfuse"
11837
         size            = 1;
11838
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
11839
                           "x x x x  x x x x  i i i i  i i i i";
11840
 
11841
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
11842
                           "x x x x  x x x x  o o o o  o o o o";
11843
        min_write_delay = 9000;
11844
        max_write_delay = 9000;
11845
       ;
11846
 
11847
     memory "hfuse"
11848
         size            = 1;
11849
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
11850
                           "x x x x  x x x x  i i i i  i i i i";
11851
 
11852
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
11853
                           "x x x x  x x x x  o o o o  o o o o";
11854
        min_write_delay = 9000;
11855
        max_write_delay = 9000;
11856
       ;
11857
 
11858
     memory "efuse"
11859
         size            = 1;
11860
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
11861
                           "x x x x  x x x x  x x x x  x x x i";
11862
 
11863
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
11864
                           "x x x x  x x x x  o o o o  o o o o";
11865
        min_write_delay = 9000;
11866
        max_write_delay = 9000;
11867
     ;
11868
 
11869
     memory "calibration"
11870
         size            = 1;
11871
         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
11872
                           "0  0  0  0   0  0  0  a0   o o o o  o o o o";
11873
     ;
11874
  ;
11875
 
11876
#------------------------------------------------------------
11877
# ATmega32u4
11878
#------------------------------------------------------------
11879
 
11880
part
11881
    id               = "m32u4";
11882
    desc             = "ATmega32U4";
11883
    signature        = 0x1e 0x95 0x87;
11884
    has_jtag         = yes;
11885
#    stk500_devcode   = 0xB2;
11886
#    avr910_devcode   = 0x43;
11887
    chip_erase_delay = 9000;
11888
    pagel            = 0xD7;
11889
    bs2              = 0xA0;
11890
    reset            = dedicated;
11891
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
11892
                       "x x x x  x x x x    x x x x  x x x x";
11893
 
11894
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
11895
                       "x x x x  x x x x    x x x x  x x x x";
11896
 
11897
    timeout		= 200;
11898
    stabdelay		= 100;
11899
    cmdexedelay		= 25;
11900
    synchloops		= 32;
11901
    bytedelay		= 0;
11902
    pollindex		= 3;
11903
    pollvalue		= 0x53;
11904
    predelay		= 1;
11905
    postdelay		= 1;
11906
    pollmethod		= 1;
11907
 
11908
    pp_controlstack     =
11909
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
11910
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
11911
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
11912
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
11913
    hventerstabdelay    = 100;
11914
    progmodedelay       = 0;
11915
    latchcycles         = 5;
11916
    togglevtg           = 1;
11917
    poweroffdelay       = 15;
11918
    resetdelayms        = 1;
11919
    resetdelayus        = 0;
11920
    hvleavestabdelay    = 15;
11921
    chiperasepulsewidth = 0;
11922
    chiperasepolltimeout = 10;
11923
    programfusepulsewidth = 0;
11924
    programfusepolltimeout = 5;
11925
    programlockpulsewidth = 0;
11926
    programlockpolltimeout = 5;
11927
 
11928
    idr                 = 0x31;
11929
    spmcr               = 0x57;
11930
    rampz               = 0x3b;
11931
    allowfullpagebitstream = no;
11932
 
11933
    memory "eeprom"
11934
        paged           = no; /* leave this "no" */
11935
        page_size       = 8;  /* for parallel programming */
11936
        size            = 1024;
11937
        min_write_delay = 9000;
11938
        max_write_delay = 9000;
11939
        readback_p1     = 0x00;
11940
        readback_p2     = 0x00;
11941
        read            = "  1   0   1   0      0   0   0   0",
11942
                          "  x   x   x   x      x a10  a9  a8",
11943
                          " a7  a6  a5  a4     a3  a2  a1  a0",
11944
                          "  o   o   o   o      o   o   o   o";
11945
 
11946
        write           = "  1   1   0   0      0   0   0   0",
11947
                          "  x   x   x   x      x a10  a9  a8",
11948
                          " a7  a6  a5  a4     a3  a2  a1  a0",
11949
                          "  i   i   i   i      i   i   i   i";
11950
 
11951
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
11952
			  "  0   0   0   0      0   0   0   0",
11953
			  "  0   0   0   0      0  a2  a1  a0",
11954
			  "  i   i   i   i      i   i   i   i";
11955
 
11956
	writepage	= "  1   1   0   0      0   0   1   0",
11957
			  "  0   0   x   x      x a10  a9  a8",
11958
			  " a7  a6  a5  a4     a3   0   0   0",
11959
			  "  x   x   x   x      x   x   x   x";
11960
 
11961
	mode		= 0x41;
11962
	delay		= 10;
11963
	blocksize	= 8;
11964
	readsize	= 256;
11965
      ;
11966
 
11967
    memory "flash"
11968
        paged           = yes;
11969
        size            = 32768;
11970
        page_size       = 128;
11971
        num_pages       = 256;
11972
        min_write_delay = 4500;
11973
        max_write_delay = 4500;
11974
        readback_p1     = 0x00;
11975
        readback_p2     = 0x00;
11976
        read_lo         = "  0   0   1   0      0   0   0   0",
11977
                          "  0 a14 a13 a12    a11 a10  a9  a8",
11978
                          " a7  a6  a5  a4     a3  a2  a1  a0",
11979
                          "  o   o   o   o      o   o   o   o";
11980
 
11981
        read_hi         = "  0   0   1   0      1   0   0   0",
11982
                          "  0 a14 a13 a12    a11 a10  a9  a8",
11983
                          " a7  a6  a5  a4     a3  a2  a1  a0",
11984
                          "  o   o   o   o      o   o   o   o";
11985
 
11986
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
11987
                          "  x   x   x   x      x   x   x   x",
11988
                          "  x   x  a5  a4     a3  a2  a1  a0",
11989
                          "  i   i   i   i      i   i   i   i";
11990
 
11991
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
11992
                          "  x   x   x   x      x   x   x   x",
11993
                          "  x   x  a5  a4     a3  a2  a1  a0",
11994
                          "  i   i   i   i      i   i   i   i";
11995
 
11996
        writepage       = "  0   1   0   0      1   1   0   0",
11997
                          " a15 a14 a13 a12    a11 a10  a9  a8",
11998
                          " a7  a6   x   x      x   x   x   x",
11999
                          "  x   x   x   x      x   x   x   x";
12000
 
12001
	mode		= 0x41;
12002
	delay		= 6;
12003
	blocksize	= 128;
12004
	readsize	= 256;
12005
      ;
12006
 
12007
    memory "lfuse"
12008
        size            = 1;
12009
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
12010
                          "x x x x  x x x x  i i i i  i i i i";
12011
 
12012
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
12013
                          "x x x x  x x x x  o o o o  o o o o";
12014
        min_write_delay = 9000;
12015
        max_write_delay = 9000;
12016
      ;
12017
 
12018
    memory "hfuse"
12019
        size            = 1;
12020
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
12021
                          "x x x x  x x x x  i i i i  i i i i";
12022
 
12023
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
12024
                          "x x x x  x x x x  o o o o  o o o o";
12025
        min_write_delay = 9000;
12026
        max_write_delay = 9000;
12027
      ;
12028
 
12029
    memory "efuse"
12030
        size            = 1;
12031
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
12032
                          "x x x x  x x x x  x x x x  i i i i";
12033
 
12034
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
12035
                          "x x x x  x x x x  o o o o  o o o o";
12036
        min_write_delay = 9000;
12037
        max_write_delay = 9000;
12038
      ;
12039
 
12040
    memory "lock"
12041
        size            = 1;
12042
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
12043
                          "x x x x  x x x x   x x o o  o o o o";
12044
 
12045
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
12046
                          "x x x x  x x x x   1 1 i i  i i i i";
12047
        min_write_delay = 9000;
12048
        max_write_delay = 9000;
12049
      ;
12050
 
12051
    memory "calibration"
12052
        size            = 1;
12053
        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
12054
                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
12055
      ;
12056
 
12057
    memory "signature"
12058
        size            = 3;
12059
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
12060
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
12061
      ;
12062
  ;
12063
 
12064
#------------------------------------------------------------
12065
# AT90USB646
12066
#------------------------------------------------------------
12067
 
12068
part
12069
    id               = "usb646";
12070
    desc             = "AT90USB646";
12071
    signature        = 0x1e 0x96 0x82;
12072
    has_jtag         = yes;
12073
#    stk500_devcode   = 0xB2;
12074
#    avr910_devcode   = 0x43;
12075
    chip_erase_delay = 9000;
12076
    pagel            = 0xD7;
12077
    bs2              = 0xA0;
12078
    reset            = dedicated;
12079
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
12080
                       "x x x x  x x x x    x x x x  x x x x";
12081
 
12082
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
12083
                       "x x x x  x x x x    x x x x  x x x x";
12084
 
12085
    timeout		= 200;
12086
    stabdelay		= 100;
12087
    cmdexedelay		= 25;
12088
    synchloops		= 32;
12089
    bytedelay		= 0;
12090
    pollindex		= 3;
12091
    pollvalue		= 0x53;
12092
    predelay		= 1;
12093
    postdelay		= 1;
12094
    pollmethod		= 1;
12095
 
12096
    pp_controlstack     =
12097
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
12098
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
12099
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
12100
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
12101
    hventerstabdelay    = 100;
12102
    progmodedelay       = 0;
12103
    latchcycles         = 5;
12104
    togglevtg           = 1;
12105
    poweroffdelay       = 15;
12106
    resetdelayms        = 1;
12107
    resetdelayus        = 0;
12108
    hvleavestabdelay    = 15;
12109
    chiperasepulsewidth = 0;
12110
    chiperasepolltimeout = 10;
12111
    programfusepulsewidth = 0;
12112
    programfusepolltimeout = 5;
12113
    programlockpulsewidth = 0;
12114
    programlockpolltimeout = 5;
12115
 
12116
    idr                 = 0x31;
12117
    spmcr               = 0x57;
12118
    rampz               = 0x3b;
12119
    allowfullpagebitstream = no;
12120
 
12121
    memory "eeprom"
12122
        paged           = no; /* leave this "no" */
12123
        page_size       = 8;  /* for parallel programming */
12124
        size            = 2048;
12125
        min_write_delay = 9000;
12126
        max_write_delay = 9000;
12127
        readback_p1     = 0x00;
12128
        readback_p2     = 0x00;
12129
        read            = "  1   0   1   0      0   0   0   0",
12130
                          "  x   x   x   x      x a10  a9  a8",
12131
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12132
                          "  o   o   o   o      o   o   o   o";
12133
 
12134
        write           = "  1   1   0   0      0   0   0   0",
12135
                          "  x   x   x   x      x a10  a9  a8",
12136
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12137
                          "  i   i   i   i      i   i   i   i";
12138
 
12139
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
12140
			  "  0   0   0   0      0   0   0   0",
12141
			  "  0   0   0   0      0  a2  a1  a0",
12142
			  "  i   i   i   i      i   i   i   i";
12143
 
12144
	writepage	= "  1   1   0   0      0   0   1   0",
12145
			  "  0   0   x   x      x a10  a9  a8",
12146
			  " a7  a6  a5  a4     a3   0   0   0",
12147
			  "  x   x   x   x      x   x   x   x";
12148
 
12149
	mode		= 0x41;
12150
	delay		= 10;
12151
	blocksize	= 8;
12152
	readsize	= 256;
12153
      ;
12154
 
12155
    memory "flash"
12156
        paged           = yes;
12157
        size            = 65536;
12158
        page_size       = 256;
12159
        num_pages       = 256;
12160
        min_write_delay = 4500;
12161
        max_write_delay = 4500;
12162
        readback_p1     = 0x00;
12163
        readback_p2     = 0x00;
12164
        read_lo         = "  0   0   1   0      0   0   0   0",
12165
                          "  0 a14 a13 a12    a11 a10  a9  a8",
12166
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12167
                          "  o   o   o   o      o   o   o   o";
12168
 
12169
        read_hi         = "  0   0   1   0      1   0   0   0",
12170
                          "  0 a14 a13 a12    a11 a10  a9  a8",
12171
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12172
                          "  o   o   o   o      o   o   o   o";
12173
 
12174
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
12175
                          "  x   x   x   x      x   x   x   x",
12176
                          "  x  a6  a5  a4     a3  a2  a1  a0",
12177
                          "  i   i   i   i      i   i   i   i";
12178
 
12179
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
12180
                          "  x   x   x   x      x   x   x   x",
12181
                          "  x  a6  a5  a4     a3  a2  a1  a0",
12182
                          "  i   i   i   i      i   i   i   i";
12183
 
12184
        writepage       = "  0   1   0   0      1   1   0   0",
12185
                          "  0 a14 a13 a12    a11 a10  a9  a8",
12186
                          " a7   x   x   x      x   x   x   x",
12187
                          "  x   x   x   x      x   x   x   x";
12188
 
12189
	mode		= 0x41;
12190
	delay		= 6;
12191
	blocksize	= 256;
12192
	readsize	= 256;
12193
      ;
12194
 
12195
    memory "lfuse"
12196
        size            = 1;
12197
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
12198
                          "x x x x  x x x x  i i i i  i i i i";
12199
 
12200
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
12201
                          "x x x x  x x x x  o o o o  o o o o";
12202
        min_write_delay = 9000;
12203
        max_write_delay = 9000;
12204
      ;
12205
 
12206
    memory "hfuse"
12207
        size            = 1;
12208
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
12209
                          "x x x x  x x x x  i i i i  i i i i";
12210
 
12211
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
12212
                          "x x x x  x x x x  o o o o  o o o o";
12213
        min_write_delay = 9000;
12214
        max_write_delay = 9000;
12215
      ;
12216
 
12217
    memory "efuse"
12218
        size            = 1;
12219
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
12220
                          "x x x x  x x x x  x x x x  i i i i";
12221
 
12222
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
12223
                          "x x x x  x x x x  o o o o  o o o o";
12224
        min_write_delay = 9000;
12225
        max_write_delay = 9000;
12226
      ;
12227
 
12228
    memory "lock"
12229
        size            = 1;
12230
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
12231
                          "x x x x  x x x x   x x o o  o o o o";
12232
 
12233
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
12234
                          "x x x x  x x x x   1 1 i i  i i i i";
12235
        min_write_delay = 9000;
12236
        max_write_delay = 9000;
12237
      ;
12238
 
12239
    memory "calibration"
12240
        size            = 1;
12241
        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
12242
                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
12243
      ;
12244
 
12245
    memory "signature"
12246
        size            = 3;
12247
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
12248
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
12249
      ;
12250
  ;
12251
 
12252
#------------------------------------------------------------
12253
# AT90USB647
12254
#------------------------------------------------------------
12255
# identical to AT90USB646
12256
 
12257
part
12258
    id               = "usb647";
12259
    desc             = "AT90USB647";
12260
    signature        = 0x1e 0x96 0x82;
12261
    has_jtag         = yes;
12262
#    stk500_devcode   = 0xB2;
12263
#    avr910_devcode   = 0x43;
12264
    chip_erase_delay = 9000;
12265
    pagel            = 0xD7;
12266
    bs2              = 0xA0;
12267
    reset            = dedicated;
12268
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
12269
                       "x x x x  x x x x    x x x x  x x x x";
12270
 
12271
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
12272
                       "x x x x  x x x x    x x x x  x x x x";
12273
 
12274
    timeout		= 200;
12275
    stabdelay		= 100;
12276
    cmdexedelay		= 25;
12277
    synchloops		= 32;
12278
    bytedelay		= 0;
12279
    pollindex		= 3;
12280
    pollvalue		= 0x53;
12281
    predelay		= 1;
12282
    postdelay		= 1;
12283
    pollmethod		= 1;
12284
 
12285
    pp_controlstack     =
12286
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
12287
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
12288
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
12289
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
12290
    hventerstabdelay    = 100;
12291
    progmodedelay       = 0;
12292
    latchcycles         = 5;
12293
    togglevtg           = 1;
12294
    poweroffdelay       = 15;
12295
    resetdelayms        = 1;
12296
    resetdelayus        = 0;
12297
    hvleavestabdelay    = 15;
12298
    chiperasepulsewidth = 0;
12299
    chiperasepolltimeout = 10;
12300
    programfusepulsewidth = 0;
12301
    programfusepolltimeout = 5;
12302
    programlockpulsewidth = 0;
12303
    programlockpolltimeout = 5;
12304
 
12305
    idr                 = 0x31;
12306
    spmcr               = 0x57;
12307
    rampz               = 0x3b;
12308
    allowfullpagebitstream = no;
12309
 
12310
    memory "eeprom"
12311
        paged           = no; /* leave this "no" */
12312
        page_size       = 8;  /* for parallel programming */
12313
        size            = 2048;
12314
        min_write_delay = 9000;
12315
        max_write_delay = 9000;
12316
        readback_p1     = 0x00;
12317
        readback_p2     = 0x00;
12318
        read            = "  1   0   1   0      0   0   0   0",
12319
                          "  x   x   x   x      x a10  a9  a8",
12320
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12321
                          "  o   o   o   o      o   o   o   o";
12322
 
12323
        write           = "  1   1   0   0      0   0   0   0",
12324
                          "  x   x   x   x      x a10  a9  a8",
12325
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12326
                          "  i   i   i   i      i   i   i   i";
12327
 
12328
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
12329
			  "  0   0   0   0      0   0   0   0",
12330
			  "  0   0   0   0      0  a2  a1  a0",
12331
			  "  i   i   i   i      i   i   i   i";
12332
 
12333
	writepage	= "  1   1   0   0      0   0   1   0",
12334
			  "  0   0   x   x      x a10  a9  a8",
12335
			  " a7  a6  a5  a4     a3   0   0   0",
12336
			  "  x   x   x   x      x   x   x   x";
12337
 
12338
	mode		= 0x41;
12339
	delay		= 10;
12340
	blocksize	= 8;
12341
	readsize	= 256;
12342
      ;
12343
 
12344
    memory "flash"
12345
        paged           = yes;
12346
        size            = 65536;
12347
        page_size       = 256;
12348
        num_pages       = 256;
12349
        min_write_delay = 4500;
12350
        max_write_delay = 4500;
12351
        readback_p1     = 0x00;
12352
        readback_p2     = 0x00;
12353
        read_lo         = "  0   0   1   0      0   0   0   0",
12354
                          "  0 a14 a13 a12    a11 a10  a9  a8",
12355
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12356
                          "  o   o   o   o      o   o   o   o";
12357
 
12358
        read_hi         = "  0   0   1   0      1   0   0   0",
12359
                          "  0 a14 a13 a12    a11 a10  a9  a8",
12360
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12361
                          "  o   o   o   o      o   o   o   o";
12362
 
12363
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
12364
                          "  x   x   x   x      x   x   x   x",
12365
                          "  x  a6  a5  a4     a3  a2  a1  a0",
12366
                          "  i   i   i   i      i   i   i   i";
12367
 
12368
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
12369
                          "  x   x   x   x      x   x   x   x",
12370
                          "  x  a6  a5  a4     a3  a2  a1  a0",
12371
                          "  i   i   i   i      i   i   i   i";
12372
 
12373
        writepage       = "  0   1   0   0      1   1   0   0",
12374
                          "  0 a14 a13 a12    a11 a10  a9  a8",
12375
                          " a7   x   x   x      x   x   x   x",
12376
                          "  x   x   x   x      x   x   x   x";
12377
 
12378
	mode		= 0x41;
12379
	delay		= 6;
12380
	blocksize	= 256;
12381
	readsize	= 256;
12382
      ;
12383
 
12384
    memory "lfuse"
12385
        size            = 1;
12386
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
12387
                          "x x x x  x x x x  i i i i  i i i i";
12388
 
12389
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
12390
                          "x x x x  x x x x  o o o o  o o o o";
12391
        min_write_delay = 9000;
12392
        max_write_delay = 9000;
12393
      ;
12394
 
12395
    memory "hfuse"
12396
        size            = 1;
12397
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
12398
                          "x x x x  x x x x  i i i i  i i i i";
12399
 
12400
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
12401
                          "x x x x  x x x x  o o o o  o o o o";
12402
        min_write_delay = 9000;
12403
        max_write_delay = 9000;
12404
      ;
12405
 
12406
    memory "efuse"
12407
        size            = 1;
12408
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
12409
                          "x x x x  x x x x  x x x x  i i i i";
12410
 
12411
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
12412
                          "x x x x  x x x x  o o o o  o o o o";
12413
        min_write_delay = 9000;
12414
        max_write_delay = 9000;
12415
      ;
12416
 
12417
    memory "lock"
12418
        size            = 1;
12419
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
12420
                          "x x x x  x x x x   x x o o  o o o o";
12421
 
12422
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
12423
                          "x x x x  x x x x   1 1 i i  i i i i";
12424
        min_write_delay = 9000;
12425
        max_write_delay = 9000;
12426
      ;
12427
 
12428
    memory "calibration"
12429
        size            = 1;
12430
        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
12431
                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
12432
      ;
12433
 
12434
    memory "signature"
12435
        size            = 3;
12436
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
12437
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
12438
      ;
12439
  ;
12440
 
12441
#------------------------------------------------------------
12442
# AT90USB1286
12443
#------------------------------------------------------------
12444
 
12445
part
12446
    id               = "usb1286";
12447
    desc             = "AT90USB1286";
12448
    signature        = 0x1e 0x97 0x82;
12449
    has_jtag         = yes;
12450
#    stk500_devcode   = 0xB2;
12451
#    avr910_devcode   = 0x43;
12452
    chip_erase_delay = 9000;
12453
    pagel            = 0xD7;
12454
    bs2              = 0xA0;
12455
    reset            = dedicated;
12456
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
12457
                       "x x x x  x x x x    x x x x  x x x x";
12458
 
12459
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
12460
                       "x x x x  x x x x    x x x x  x x x x";
12461
 
12462
    timeout		= 200;
12463
    stabdelay		= 100;
12464
    cmdexedelay		= 25;
12465
    synchloops		= 32;
12466
    bytedelay		= 0;
12467
    pollindex		= 3;
12468
    pollvalue		= 0x53;
12469
    predelay		= 1;
12470
    postdelay		= 1;
12471
    pollmethod		= 1;
12472
 
12473
    pp_controlstack     =
12474
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
12475
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
12476
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
12477
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
12478
    hventerstabdelay    = 100;
12479
    progmodedelay       = 0;
12480
    latchcycles         = 5;
12481
    togglevtg           = 1;
12482
    poweroffdelay       = 15;
12483
    resetdelayms        = 1;
12484
    resetdelayus        = 0;
12485
    hvleavestabdelay    = 15;
12486
    chiperasepulsewidth = 0;
12487
    chiperasepolltimeout = 10;
12488
    programfusepulsewidth = 0;
12489
    programfusepolltimeout = 5;
12490
    programlockpulsewidth = 0;
12491
    programlockpolltimeout = 5;
12492
 
12493
    idr                 = 0x31;
12494
    spmcr               = 0x57;
12495
    rampz               = 0x3b;
12496
    allowfullpagebitstream = no;
12497
 
12498
    memory "eeprom"
12499
        paged           = no; /* leave this "no" */
12500
        page_size       = 8;  /* for parallel programming */
12501
        size            = 4096;
12502
        min_write_delay = 9000;
12503
        max_write_delay = 9000;
12504
        readback_p1     = 0x00;
12505
        readback_p2     = 0x00;
12506
        read            = "  1   0   1   0      0   0   0   0",
12507
                          "  x   x   x   x    a11 a10  a9  a8",
12508
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12509
                          "  o   o   o   o      o   o   o   o";
12510
 
12511
        write           = "  1   1   0   0      0   0   0   0",
12512
                          "  x   x   x   x    a11 a10  a9  a8",
12513
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12514
                          "  i   i   i   i      i   i   i   i";
12515
 
12516
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
12517
			  "  0   0   0   0      0   0   0   0",
12518
			  "  0   0   0   0      0  a2  a1  a0",
12519
			  "  i   i   i   i      i   i   i   i";
12520
 
12521
	writepage	= "  1   1   0   0      0   0   1   0",
12522
			  "  0   0   x   x      x a10  a9  a8",
12523
			  " a7  a6  a5  a4     a3   0   0   0",
12524
			  "  x   x   x   x      x   x   x   x";
12525
 
12526
	mode		= 0x41;
12527
	delay		= 10;
12528
	blocksize	= 8;
12529
	readsize	= 256;
12530
      ;
12531
 
12532
    memory "flash"
12533
        paged           = yes;
12534
        size            = 131072;
12535
        page_size       = 256;
12536
        num_pages       = 512;
12537
        min_write_delay = 4500;
12538
        max_write_delay = 4500;
12539
        readback_p1     = 0x00;
12540
        readback_p2     = 0x00;
12541
        read_lo         = "  0   0   1   0      0   0   0   0",
12542
                          "a15 a14 a13 a12    a11 a10  a9  a8",
12543
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12544
                          "  o   o   o   o      o   o   o   o";
12545
 
12546
        read_hi         = "  0   0   1   0      1   0   0   0",
12547
                          "a15 a14 a13 a12    a11 a10  a9  a8",
12548
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12549
                          "  o   o   o   o      o   o   o   o";
12550
 
12551
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
12552
                          "  x   x   x   x      x   x   x   x",
12553
                          "  x  a6  a5  a4     a3  a2  a1  a0",
12554
                          "  i   i   i   i      i   i   i   i";
12555
 
12556
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
12557
                          "  x   x   x   x      x   x   x   x",
12558
                          "  x  a6  a5  a4     a3  a2  a1  a0",
12559
                          "  i   i   i   i      i   i   i   i";
12560
 
12561
        writepage       = "  0   1   0   0      1   1   0   0",
12562
                          "a15 a14 a13 a12    a11 a10  a9  a8",
12563
                          " a7   x   x   x      x   x   x   x",
12564
                          "  x   x   x   x      x   x   x   x";
12565
 
12566
	mode		= 0x41;
12567
	delay		= 6;
12568
	blocksize	= 256;
12569
	readsize	= 256;
12570
      ;
12571
 
12572
    memory "lfuse"
12573
        size            = 1;
12574
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
12575
                          "x x x x  x x x x  i i i i  i i i i";
12576
 
12577
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
12578
                          "x x x x  x x x x  o o o o  o o o o";
12579
        min_write_delay = 9000;
12580
        max_write_delay = 9000;
12581
      ;
12582
 
12583
    memory "hfuse"
12584
        size            = 1;
12585
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
12586
                          "x x x x  x x x x  i i i i  i i i i";
12587
 
12588
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
12589
                          "x x x x  x x x x  o o o o  o o o o";
12590
        min_write_delay = 9000;
12591
        max_write_delay = 9000;
12592
      ;
12593
 
12594
    memory "efuse"
12595
        size            = 1;
12596
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
12597
                          "x x x x  x x x x  x x x x  i i i i";
12598
 
12599
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
12600
                          "x x x x  x x x x  o o o o  o o o o";
12601
        min_write_delay = 9000;
12602
        max_write_delay = 9000;
12603
      ;
12604
 
12605
    memory "lock"
12606
        size            = 1;
12607
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
12608
                          "x x x x  x x x x   x x o o  o o o o";
12609
 
12610
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
12611
                          "x x x x  x x x x   1 1 i i  i i i i";
12612
        min_write_delay = 9000;
12613
        max_write_delay = 9000;
12614
      ;
12615
 
12616
    memory "calibration"
12617
        size            = 1;
12618
        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
12619
                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
12620
      ;
12621
 
12622
    memory "signature"
12623
        size            = 3;
12624
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
12625
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
12626
      ;
12627
  ;
12628
 
12629
#------------------------------------------------------------
12630
# AT90USB1287
12631
#------------------------------------------------------------
12632
# identical to AT90USB1286
12633
 
12634
part
12635
    id               = "usb1287";
12636
    desc             = "AT90USB1287";
12637
    signature        = 0x1e 0x97 0x82;
12638
    has_jtag         = yes;
12639
#    stk500_devcode   = 0xB2;
12640
#    avr910_devcode   = 0x43;
12641
    chip_erase_delay = 9000;
12642
    pagel            = 0xD7;
12643
    bs2              = 0xA0;
12644
    reset            = dedicated;
12645
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
12646
                       "x x x x  x x x x    x x x x  x x x x";
12647
 
12648
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
12649
                       "x x x x  x x x x    x x x x  x x x x";
12650
 
12651
    timeout		= 200;
12652
    stabdelay		= 100;
12653
    cmdexedelay		= 25;
12654
    synchloops		= 32;
12655
    bytedelay		= 0;
12656
    pollindex		= 3;
12657
    pollvalue		= 0x53;
12658
    predelay		= 1;
12659
    postdelay		= 1;
12660
    pollmethod		= 1;
12661
 
12662
    pp_controlstack     =
12663
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
12664
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
12665
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
12666
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
12667
    hventerstabdelay    = 100;
12668
    progmodedelay       = 0;
12669
    latchcycles         = 5;
12670
    togglevtg           = 1;
12671
    poweroffdelay       = 15;
12672
    resetdelayms        = 1;
12673
    resetdelayus        = 0;
12674
    hvleavestabdelay    = 15;
12675
    chiperasepulsewidth = 0;
12676
    chiperasepolltimeout = 10;
12677
    programfusepulsewidth = 0;
12678
    programfusepolltimeout = 5;
12679
    programlockpulsewidth = 0;
12680
    programlockpolltimeout = 5;
12681
 
12682
    idr                 = 0x31;
12683
    spmcr               = 0x57;
12684
    rampz               = 0x3b;
12685
    allowfullpagebitstream = no;
12686
 
12687
    memory "eeprom"
12688
        paged           = no; /* leave this "no" */
12689
        page_size       = 8;  /* for parallel programming */
12690
        size            = 4096;
12691
        min_write_delay = 9000;
12692
        max_write_delay = 9000;
12693
        readback_p1     = 0x00;
12694
        readback_p2     = 0x00;
12695
        read            = "  1   0   1   0      0   0   0   0",
12696
                          "  x   x   x   x    a11 a10  a9  a8",
12697
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12698
                          "  o   o   o   o      o   o   o   o";
12699
 
12700
        write           = "  1   1   0   0      0   0   0   0",
12701
                          "  x   x   x   x    a11 a10  a9  a8",
12702
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12703
                          "  i   i   i   i      i   i   i   i";
12704
 
12705
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
12706
			  "  0   0   0   0      0   0   0   0",
12707
			  "  0   0   0   0      0  a2  a1  a0",
12708
			  "  i   i   i   i      i   i   i   i";
12709
 
12710
	writepage	= "  1   1   0   0      0   0   1   0",
12711
			  "  0   0   x   x      x a10  a9  a8",
12712
			  " a7  a6  a5  a4     a3   0   0   0",
12713
			  "  x   x   x   x      x   x   x   x";
12714
 
12715
	mode		= 0x41;
12716
	delay		= 10;
12717
	blocksize	= 8;
12718
	readsize	= 256;
12719
      ;
12720
 
12721
    memory "flash"
12722
        paged           = yes;
12723
        size            = 131072;
12724
        page_size       = 256;
12725
        num_pages       = 512;
12726
        min_write_delay = 4500;
12727
        max_write_delay = 4500;
12728
        readback_p1     = 0x00;
12729
        readback_p2     = 0x00;
12730
        read_lo         = "  0   0   1   0      0   0   0   0",
12731
                          "a15 a14 a13 a12    a11 a10  a9  a8",
12732
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12733
                          "  o   o   o   o      o   o   o   o";
12734
 
12735
        read_hi         = "  0   0   1   0      1   0   0   0",
12736
                          "a15 a14 a13 a12    a11 a10  a9  a8",
12737
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12738
                          "  o   o   o   o      o   o   o   o";
12739
 
12740
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
12741
                          "  x   x   x   x      x   x   x   x",
12742
                          "  x  a6  a5  a4     a3  a2  a1  a0",
12743
                          "  i   i   i   i      i   i   i   i";
12744
 
12745
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
12746
                          "  x   x   x   x      x   x   x   x",
12747
                          "  x  a6  a5  a4     a3  a2  a1  a0",
12748
                          "  i   i   i   i      i   i   i   i";
12749
 
12750
        writepage       = "  0   1   0   0      1   1   0   0",
12751
                          "a15 a14 a13 a12    a11 a10  a9  a8",
12752
                          " a7   x   x   x      x   x   x   x",
12753
                          "  x   x   x   x      x   x   x   x";
12754
 
12755
	mode		= 0x41;
12756
	delay		= 6;
12757
	blocksize	= 256;
12758
	readsize	= 256;
12759
      ;
12760
 
12761
    memory "lfuse"
12762
        size            = 1;
12763
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
12764
                          "x x x x  x x x x  i i i i  i i i i";
12765
 
12766
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
12767
                          "x x x x  x x x x  o o o o  o o o o";
12768
        min_write_delay = 9000;
12769
        max_write_delay = 9000;
12770
      ;
12771
 
12772
    memory "hfuse"
12773
        size            = 1;
12774
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
12775
                          "x x x x  x x x x  i i i i  i i i i";
12776
 
12777
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
12778
                          "x x x x  x x x x  o o o o  o o o o";
12779
        min_write_delay = 9000;
12780
        max_write_delay = 9000;
12781
      ;
12782
 
12783
    memory "efuse"
12784
        size            = 1;
12785
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
12786
                          "x x x x  x x x x  x x x x  i i i i";
12787
 
12788
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
12789
                          "x x x x  x x x x  o o o o  o o o o";
12790
        min_write_delay = 9000;
12791
        max_write_delay = 9000;
12792
      ;
12793
 
12794
    memory "lock"
12795
        size            = 1;
12796
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
12797
                          "x x x x  x x x x   x x o o  o o o o";
12798
 
12799
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
12800
                          "x x x x  x x x x   1 1 i i  i i i i";
12801
        min_write_delay = 9000;
12802
        max_write_delay = 9000;
12803
      ;
12804
 
12805
    memory "calibration"
12806
        size            = 1;
12807
        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
12808
                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
12809
      ;
12810
 
12811
    memory "signature"
12812
        size            = 3;
12813
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
12814
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
12815
      ;
12816
  ;
12817
 
12818
 
12819
#------------------------------------------------------------
12820
# AT90USB162
12821
#------------------------------------------------------------
12822
 
12823
part
12824
    id               = "usb162";
12825
    desc             = "AT90USB162";
12826
    has_jtag         = no;
12827
    has_debugwire    = yes;
12828
    signature        = 0x1e 0x94 0x82;
12829
    chip_erase_delay = 9000;
12830
    reset            = io;
12831
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
12832
                       "x x x x  x x x x    x x x x  x x x x";
12833
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
12834
                       "x x x x  x x x x    x x x x  x x x x";
12835
    pagel            = 0xD7;
12836
    bs2              = 0xC6;
12837
 
12838
    timeout		= 200;
12839
    stabdelay		= 100;
12840
    cmdexedelay		= 25;
12841
    synchloops		= 32;
12842
    bytedelay		= 0;
12843
    pollindex		= 3;
12844
    pollvalue		= 0x53;
12845
    predelay		= 1;
12846
    postdelay		= 1;
12847
    pollmethod		= 1;
12848
    pp_controlstack     =
12849
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
12850
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
12851
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
12852
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
12853
    hventerstabdelay    = 100;
12854
    progmodedelay       = 0;
12855
    latchcycles         = 5;
12856
    togglevtg           = 1;
12857
    poweroffdelay       = 15;
12858
    resetdelayms        = 1;
12859
    resetdelayus        = 0;
12860
    hvleavestabdelay    = 15;
12861
    chiperasepulsewidth = 0;
12862
    chiperasepolltimeout = 10;
12863
    programfusepulsewidth = 0;
12864
    programfusepolltimeout = 5;
12865
    programlockpulsewidth = 0;
12866
    programlockpolltimeout = 5;
12867
 
12868
    memory "eeprom"
12869
        paged           = no; /* leave this "no" */
12870
        page_size       = 4;  /* for parallel programming */
12871
        size            = 512;
12872
        num_pages       = 128;
12873
        min_write_delay = 9000;
12874
        max_write_delay = 9000;
12875
        readback_p1     = 0x00;
12876
        readback_p2     = 0x00;
12877
        read            = "  1   0   1   0      0   0   0   0",
12878
                          "  0   0   0   0    a11 a10  a9  a8",
12879
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12880
                          "  o   o   o   o      o   o   o   o";
12881
 
12882
        write           = "  1   1   0   0      0   0   0   0",
12883
                          "  0   0   0   0    a11 a10  a9  a8",
12884
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12885
                          "  i   i   i   i      i   i   i   i";
12886
 
12887
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
12888
			  "  0   0   0   0      0   0   0   0",
12889
			  "  0   0   0   0      0   0  a1  a0",
12890
			  "  i   i   i   i      i   i   i   i";
12891
 
12892
	writepage	= "  1   1   0   0      0   0   1   0",
12893
                          "  0   0   0   0    a11 a10  a9  a8",
12894
                          " a7  a6  a5  a4     a3  a2   0   0",
12895
			  "  x   x   x   x      x   x   x   x";
12896
 
12897
	mode		= 0x41;
12898
	delay		= 20;
12899
	blocksize	= 4;
12900
	readsize	= 256;
12901
      ;
12902
 
12903
    memory "flash"
12904
        paged           = yes;
12905
        size            = 16384;
12906
        page_size       = 128;
12907
        num_pages       = 128;
12908
        min_write_delay = 4500;
12909
        max_write_delay = 4500;
12910
        readback_p1     = 0x00;
12911
        readback_p2     = 0x00;
12912
        read_lo         = "  0   0   1   0      0   0   0   0",
12913
                          "a15 a14 a13 a12    a11 a10  a9  a8",
12914
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12915
                          "  o   o   o   o      o   o   o   o";
12916
 
12917
        read_hi         = "  0   0   1   0      1   0   0   0",
12918
                          "a15 a14 a13 a12    a11 a10  a9  a8",
12919
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12920
                          "  o   o   o   o      o   o   o   o";
12921
 
12922
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
12923
                          "  x   x   x   x      x   x   x   x",
12924
                          "  x   x  a5  a4     a3  a2  a1  a0",
12925
                          "  i   i   i   i      i   i   i   i";
12926
 
12927
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
12928
                          "  x   x   x   x      x   x   x   x",
12929
                          "  x   x  a5  a4     a3  a2  a1  a0",
12930
                          "  i   i   i   i      i   i   i   i";
12931
 
12932
        writepage       = "  0   1   0   0      1   1   0   0",
12933
                          "a15 a14 a13 a12    a11 a10  a9  a8",
12934
                          " a7  a6   x   x      x   x   x   x",
12935
                          "  x   x   x   x      x   x   x   x";
12936
 
12937
	mode		= 0x41;
12938
	delay		= 6;
12939
	blocksize	= 128;
12940
	readsize	= 256;
12941
      ;
12942
 
12943
    memory "lfuse"
12944
        size            = 1;
12945
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
12946
                          "x x x x  x x x x  i i i i  i i i i";
12947
 
12948
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
12949
                          "x x x x  x x x x  o o o o  o o o o";
12950
        min_write_delay = 9000;
12951
        max_write_delay = 9000;
12952
      ;
12953
 
12954
    memory "hfuse"
12955
        size            = 1;
12956
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
12957
                          "x x x x  x x x x  i i i i  i i i i";
12958
 
12959
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
12960
                          "x x x x  x x x x  o o o o  o o o o";
12961
        min_write_delay = 9000;
12962
        max_write_delay = 9000;
12963
      ;
12964
 
12965
    memory "efuse"
12966
        size            = 1;
12967
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
12968
                          "x x x x  x x x x  i i i i  i i i i";
12969
 
12970
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
12971
                          "x x x x  x x x x  o o o o  o o o o";
12972
        min_write_delay = 9000;
12973
        max_write_delay = 9000;
12974
      ;
12975
 
12976
    memory "lock"
12977
        size            = 1;
12978
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
12979
                          "x x x x  x x x x   x x o o  o o o o";
12980
 
12981
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
12982
                          "x x x x  x x x x   1 1 i i  i i i i";
12983
        min_write_delay = 9000;
12984
        max_write_delay = 9000;
12985
      ;
12986
 
12987
    memory "calibration"
12988
        size            = 1;
12989
        read            = "0 0 1 1  1 0 0 0    0 0 0 x  x x x x",
12990
                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
12991
      ;
12992
    memory "signature"
12993
        size            = 3;
12994
        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
12995
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
12996
      ;
12997
  ;
12998
 
12999
#------------------------------------------------------------
13000
# AT90USB82
13001
#------------------------------------------------------------
13002
# Changes against AT90USB162 (beside IDs)
13003
#    memory "flash"
13004
#        size            = 8192;
13005
#        num_pages       = 64;
13006
 
13007
part
13008
    id               = "usb82";
13009
    desc             = "AT90USB82";
13010
    has_jtag         = no;
13011
    has_debugwire    = yes;
13012
    signature        = 0x1e 0x93 0x82;
13013
    chip_erase_delay = 9000;
13014
    reset            = io;
13015
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
13016
                       "x x x x  x x x x    x x x x  x x x x";
13017
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
13018
                       "x x x x  x x x x    x x x x  x x x x";
13019
    pagel            = 0xD7;
13020
    bs2              = 0xC6;
13021
 
13022
    timeout		= 200;
13023
    stabdelay		= 100;
13024
    cmdexedelay		= 25;
13025
    synchloops		= 32;
13026
    bytedelay		= 0;
13027
    pollindex		= 3;
13028
    pollvalue		= 0x53;
13029
    predelay		= 1;
13030
    postdelay		= 1;
13031
    pollmethod		= 1;
13032
    pp_controlstack     =
13033
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
13034
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
13035
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
13036
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
13037
    hventerstabdelay    = 100;
13038
    progmodedelay       = 0;
13039
    latchcycles         = 5;
13040
    togglevtg           = 1;
13041
    poweroffdelay       = 15;
13042
    resetdelayms        = 1;
13043
    resetdelayus        = 0;
13044
    hvleavestabdelay    = 15;
13045
    chiperasepulsewidth = 0;
13046
    chiperasepolltimeout = 10;
13047
    programfusepulsewidth = 0;
13048
    programfusepolltimeout = 5;
13049
    programlockpulsewidth = 0;
13050
    programlockpolltimeout = 5;
13051
 
13052
    memory "eeprom"
13053
        paged           = no; /* leave this "no" */
13054
        page_size       = 4;  /* for parallel programming */
13055
        size            = 512;
13056
        num_pages       = 128;
13057
        min_write_delay = 9000;
13058
        max_write_delay = 9000;
13059
        readback_p1     = 0x00;
13060
        readback_p2     = 0x00;
13061
        read            = "  1   0   1   0      0   0   0   0",
13062
                          "  0   0   0   0    a11 a10  a9  a8",
13063
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13064
                          "  o   o   o   o      o   o   o   o";
13065
 
13066
        write           = "  1   1   0   0      0   0   0   0",
13067
                          "  0   0   0   0    a11 a10  a9  a8",
13068
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13069
                          "  i   i   i   i      i   i   i   i";
13070
 
13071
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
13072
			  "  0   0   0   0      0   0   0   0",
13073
			  "  0   0   0   0      0   0  a1  a0",
13074
			  "  i   i   i   i      i   i   i   i";
13075
 
13076
	writepage	= "  1   1   0   0      0   0   1   0",
13077
                          "  0   0   0   0    a11 a10  a9  a8",
13078
                          " a7  a6  a5  a4     a3  a2   0   0",
13079
			  "  x   x   x   x      x   x   x   x";
13080
 
13081
	mode		= 0x41;
13082
	delay		= 20;
13083
	blocksize	= 4;
13084
	readsize	= 256;
13085
      ;
13086
 
13087
    memory "flash"
13088
        paged           = yes;
13089
        size            = 8192;
13090
        page_size       = 128;
13091
        num_pages       = 64;
13092
        min_write_delay = 4500;
13093
        max_write_delay = 4500;
13094
        readback_p1     = 0x00;
13095
        readback_p2     = 0x00;
13096
        read_lo         = "  0   0   1   0      0   0   0   0",
13097
                          "a15 a14 a13 a12    a11 a10  a9  a8",
13098
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13099
                          "  o   o   o   o      o   o   o   o";
13100
 
13101
        read_hi         = "  0   0   1   0      1   0   0   0",
13102
                          "a15 a14 a13 a12    a11 a10  a9  a8",
13103
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13104
                          "  o   o   o   o      o   o   o   o";
13105
 
13106
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
13107
                          "  x   x   x   x      x   x   x   x",
13108
                          "  x   x  a5  a4     a3  a2  a1  a0",
13109
                          "  i   i   i   i      i   i   i   i";
13110
 
13111
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
13112
                          "  x   x   x   x      x   x   x   x",
13113
                          "  x   x  a5  a4     a3  a2  a1  a0",
13114
                          "  i   i   i   i      i   i   i   i";
13115
 
13116
        writepage       = "  0   1   0   0      1   1   0   0",
13117
                          "a15 a14 a13 a12    a11 a10  a9  a8",
13118
                          " a7  a6   x   x      x   x   x   x",
13119
                          "  x   x   x   x      x   x   x   x";
13120
 
13121
	mode		= 0x41;
13122
	delay		= 6;
13123
	blocksize	= 128;
13124
	readsize	= 256;
13125
      ;
13126
 
13127
    memory "lfuse"
13128
        size            = 1;
13129
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
13130
                          "x x x x  x x x x  i i i i  i i i i";
13131
 
13132
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
13133
                          "x x x x  x x x x  o o o o  o o o o";
13134
        min_write_delay = 9000;
13135
        max_write_delay = 9000;
13136
      ;
13137
 
13138
    memory "hfuse"
13139
        size            = 1;
13140
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
13141
                          "x x x x  x x x x  i i i i  i i i i";
13142
 
13143
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
13144
                          "x x x x  x x x x  o o o o  o o o o";
13145
        min_write_delay = 9000;
13146
        max_write_delay = 9000;
13147
      ;
13148
 
13149
    memory "efuse"
13150
        size            = 1;
13151
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
13152
                          "x x x x  x x x x  i i i i  i i i i";
13153
 
13154
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
13155
                          "x x x x  x x x x  o o o o  o o o o";
13156
        min_write_delay = 9000;
13157
        max_write_delay = 9000;
13158
      ;
13159
 
13160
    memory "lock"
13161
        size            = 1;
13162
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
13163
                          "x x x x  x x x x   x x o o  o o o o";
13164
 
13165
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
13166
                          "x x x x  x x x x   1 1 i i  i i i i";
13167
        min_write_delay = 9000;
13168
        max_write_delay = 9000;
13169
      ;
13170
 
13171
    memory "calibration"
13172
        size            = 1;
13173
        read            = "0 0 1 1  1 0 0 0    0 0 0 x  x x x x",
13174
                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
13175
      ;
13176
    memory "signature"
13177
        size            = 3;
13178
        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
13179
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
13180
      ;
13181
  ;
13182
 
13183
#------------------------------------------------------------
13184
# ATmega325
13185
#------------------------------------------------------------
13186
 
13187
part
13188
    id               = "m325";
13189
    desc             = "ATMEGA325";
13190
    signature        = 0x1e 0x95 0x05;
13191
    has_jtag         = yes;
13192
#   stk500_devcode   = 0x??; # No STK500v1 support?
13193
#   avr910_devcode   = 0x??; # Try the ATmega16 one
13194
    avr910_devcode   = 0x74;
13195
    pagel            = 0xd7;
13196
    bs2              = 0xa0;
13197
    chip_erase_delay = 9000;
13198
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
13199
                       "0 0 0 0  0 0 0 0    0 0 0 0  0 0 0 0";
13200
 
13201
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
13202
                       "0 0 0 0  0 0 0 0    0 0 0 0  0 0 0 0";
13203
 
13204
    timeout             = 200;
13205
    stabdelay           = 100;
13206
    cmdexedelay         = 25;
13207
    synchloops          = 32;
13208
    bytedelay           = 0;
13209
    pollindex           = 3;
13210
    pollvalue           = 0x53;
13211
    predelay            = 1;
13212
    postdelay           = 1;
13213
    pollmethod          = 1;
13214
 
13215
    pp_controlstack     =
13216
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
13217
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
13218
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
13219
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
13220
    hventerstabdelay    = 100;
13221
    progmodedelay       = 0;
13222
    latchcycles         = 5;
13223
    togglevtg           = 1;
13224
    poweroffdelay       = 15;
13225
    resetdelayms        = 1;
13226
    resetdelayus        = 0;
13227
    hvleavestabdelay    = 15;
13228
    chiperasepulsewidth = 0;
13229
    chiperasepolltimeout = 10;
13230
    programfusepulsewidth = 0;
13231
    programfusepolltimeout = 5;
13232
    programlockpulsewidth = 0;
13233
    programlockpolltimeout = 5;
13234
 
13235
    idr                 = 0x31;
13236
    spmcr               = 0x57;
13237
    allowfullpagebitstream = no;
13238
 
13239
    memory "eeprom"
13240
        paged           = no; /* leave this "no" */
13241
        page_size       = 4;  /* for parallel programming */
13242
        size            = 1024;
13243
        min_write_delay = 9000;
13244
        max_write_delay = 9000;
13245
        readback_p1     = 0xff;
13246
        readback_p2     = 0xff;
13247
        read            = "  1   0   1   0      0   0   0   0",
13248
                          "  0   0   0   0      0   0  a9  a8",
13249
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13250
                          "  o   o   o   o      o   o   o   o";
13251
 
13252
        write           = "  1   1   0   0      0   0   0   0",
13253
                          "  0   0   0   0      0   0  a9  a8",
13254
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13255
                          "  i   i   i   i      i   i   i   i";
13256
 
13257
        loadpage_lo     = "  1   1   0   0      0   0   0   1",
13258
                          "  0   0   0   0      0   0   0   0",
13259
                          "  0   0   0   0      0   0  a1  a0",
13260
                          "  i   i   i   i      i   i   i   i";
13261
 
13262
        writepage       = "  1   1   0   0      0   0   1   0",
13263
                          "  0   0   0   0      0   0  a9  a8",
13264
                          " a7  a6  a5  a4     a3  a2   0   0",
13265
                          "  x   x   x   x      x   x   x   x";
13266
 
13267
        mode            = 0x41;
13268
        delay           = 10;
13269
        blocksize       = 4;
13270
        readsize        = 256;
13271
      ;
13272
 
13273
    memory "flash"
13274
        paged           = yes;
13275
        size            = 32768;
13276
        page_size       = 128;
13277
        num_pages       = 256;
13278
        min_write_delay = 4500;
13279
        max_write_delay = 4500;
13280
        readback_p1     = 0xff;
13281
        readback_p2     = 0xff;
13282
        read_lo         = "  0   0   1   0      0   0   0   0",
13283
                          "  0 a14 a13 a12    a11 a10  a9  a8",
13284
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13285
                          "  o   o   o   o      o   o   o   o";
13286
 
13287
        read_hi         = "  0   0   1   0      1   0   0   0",
13288
                          "  0 a14 a13 a12    a11 a10  a9  a8",
13289
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13290
                          "  o   o   o   o      o   o   o   o";
13291
 
13292
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
13293
                          "  0   0   0   0      0   0   0   0",
13294
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13295
                          "  i   i   i   i      i   i   i   i";
13296
 
13297
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
13298
                          "  0   0   0   0      0   0   0   0",
13299
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13300
                          "  i   i   i   i      i   i   i   i";
13301
 
13302
        writepage       = "  0   1   0   0      1   1   0   0",
13303
                          "  0 a14 a13 a12    a11 a10  a9  a8",
13304
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13305
                          "  x   x   x   x      x   x   x   x";
13306
 
13307
        mode            = 0x41;
13308
        delay           = 10;
13309
        blocksize       = 128;
13310
        readsize        = 256;
13311
      ;
13312
 
13313
    memory "lock"
13314
        size            = 1;
13315
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
13316
                          "x x x x  x x x x   x x o o  o o o o";
13317
 
13318
        write           = "1 0 1 0  1 1 0 0   1 1 1 0  0 0 0 0",
13319
                          "0 0 0 0  0 0 0 0   1 1 i i  i i i i";
13320
        min_write_delay = 9000;
13321
        max_write_delay = 9000;
13322
      ;
13323
 
13324
    memory "lfuse"
13325
        size            = 1;
13326
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
13327
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
13328
 
13329
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
13330
                          "0 0 0 0  0 0 0 0   i i i i  i i i i";
13331
        min_write_delay = 9000;
13332
        max_write_delay = 9000;
13333
      ;
13334
 
13335
    memory "hfuse"
13336
        size            = 1;
13337
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
13338
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
13339
 
13340
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
13341
                          "0 0 0 0  0 0 0 0   i i i i  i i i i";
13342
        min_write_delay = 9000;
13343
        max_write_delay = 9000;
13344
      ;
13345
 
13346
    memory "efuse"
13347
        size            = 1;
13348
 
13349
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
13350
                          "0 0 0 0  0 0 0 0  o o o o  o o o o";
13351
 
13352
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
13353
                          "0 0 0 0  0 0 0 0  1 1 1 1  1 i i i";
13354
        min_write_delay = 9000;
13355
        max_write_delay = 9000;
13356
      ;
13357
 
13358
    memory "signature"
13359
        size            = 3;
13360
        read            = "0  0  1  1   0  0  0  0   0  0  0  0   0  0  0  0",
13361
                          "0  0  0  0   0  0 a1 a0   o  o  o  o   o  o  o  o";
13362
      ;
13363
 
13364
    memory "calibration"
13365
        size            = 1;
13366
 
13367
        read            = "0 0 1 1  1 0 0 0   0 0 0 0  0 0 0 0",
13368
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
13369
        ;
13370
  ;
13371
 
13372
#------------------------------------------------------------
13373
# ATmega645
13374
#------------------------------------------------------------
13375
 
13376
part
13377
    id               = "m645";
13378
    desc             = "ATMEGA645";
13379
    signature        = 0x1E 0x96 0x05;
13380
    has_jtag         = yes;
13381
#   stk500_devcode   = 0x??; # No STK500v1 support?
13382
#   avr910_devcode   = 0x??; # Try the ATmega16 one
13383
    avr910_devcode   = 0x74;
13384
    pagel            = 0xd7;
13385
    bs2              = 0xa0;
13386
    chip_erase_delay = 9000;
13387
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
13388
                       "0 0 0 0  0 0 0 0    0 0 0 0  0 0 0 0";
13389
 
13390
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
13391
                       "0 0 0 0  0 0 0 0    0 0 0 0  0 0 0 0";
13392
 
13393
    timeout             = 200;
13394
    stabdelay           = 100;
13395
    cmdexedelay         = 25;
13396
    synchloops          = 32;
13397
    bytedelay           = 0;
13398
    pollindex           = 3;
13399
    pollvalue           = 0x53;
13400
    predelay            = 1;
13401
    postdelay           = 1;
13402
    pollmethod          = 1;
13403
 
13404
    pp_controlstack     =
13405
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
13406
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
13407
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
13408
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
13409
    hventerstabdelay    = 100;
13410
    progmodedelay       = 0;
13411
    latchcycles         = 5;
13412
    togglevtg           = 1;
13413
    poweroffdelay       = 15;
13414
    resetdelayms        = 1;
13415
    resetdelayus        = 0;
13416
    hvleavestabdelay    = 15;
13417
    chiperasepulsewidth = 0;
13418
    chiperasepolltimeout = 10;
13419
    programfusepulsewidth = 0;
13420
    programfusepolltimeout = 5;
13421
    programlockpulsewidth = 0;
13422
    programlockpolltimeout = 5;
13423
 
13424
    idr                 = 0x31;
13425
    spmcr               = 0x57;
13426
    allowfullpagebitstream = no;
13427
 
13428
    memory "eeprom"
13429
        paged           = no; /* leave this "no" */
13430
        page_size       = 8;  /* for parallel programming */
13431
        size            = 2048;
13432
        min_write_delay = 9000;
13433
        max_write_delay = 9000;
13434
        readback_p1     = 0xff;
13435
        readback_p2     = 0xff;
13436
        read            = "  1   0   1   0      0   0   0   0",
13437
                          "  0   0   0   0      0 a10  a9  a8",
13438
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13439
                          "  o   o   o   o      o   o   o   o";
13440
 
13441
        write           = "  1   1   0   0      0   0   0   0",
13442
                          "  0   0   0   0      0 a10  a9  a8",
13443
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13444
                          "  i   i   i   i      i   i   i   i";
13445
 
13446
        loadpage_lo     = "  1   1   0   0      0   0   0   1",
13447
                          "  0   0   0   0      0   0   0   0",
13448
                          "  0   0   0   0      0  a2  a1  a0",
13449
                          "  i   i   i   i      i   i   i   i";
13450
 
13451
        writepage       = "  1   1   0   0      0   0   1   0",
13452
                          "  0   0   0   0      0 a10  a9  a8",
13453
                          " a7  a6  a5  a4     a3   0   0   0",
13454
                          "  x   x   x   x      x   x   x   x";
13455
 
13456
        mode            = 0x41;
13457
        delay           = 10;
13458
        blocksize       = 8;
13459
        readsize        = 256;
13460
      ;
13461
 
13462
    memory "flash"
13463
        paged           = yes;
13464
        size            = 65536;
13465
        page_size       = 256;
13466
        num_pages       = 256;
13467
        min_write_delay = 4500;
13468
        max_write_delay = 4500;
13469
        readback_p1     = 0xff;
13470
        readback_p2     = 0xff;
13471
        read_lo         = "   0   0   1   0      0   0   0   0",
13472
                          " a15 a14 a13 a12    a11 a10  a9  a8",
13473
                          "  a7  a6  a5  a4     a3  a2  a1  a0",
13474
                          "   o   o   o   o      o   o   o   o";
13475
 
13476
        read_hi         = "   0   0   1   0      1   0   0   0",
13477
                          " a15 a14 a13 a12    a11 a10  a9  a8",
13478
                          "  a7  a6  a5  a4     a3  a2  a1  a0",
13479
                          "   o   o   o   o      o   o   o   o";
13480
 
13481
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
13482
                          "  0   0   0   0      0   0   0   0",
13483
                          "  a7 a6  a5  a4     a3  a2  a1  a0",
13484
                          "  i   i   i   i      i   i   i   i";
13485
 
13486
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
13487
                          "  0   0   0   0      0   0   0   0",
13488
                          "  a7 a6  a5  a4     a3  a2  a1  a0",
13489
                          "  i   i   i   i      i   i   i   i";
13490
 
13491
        writepage       = "   0   1   0   0      1   1   0   0",
13492
                          " a15 a14 a13 a12    a11 a10  a9  a8",
13493
                          "  a7  a6  a5  a4     a3  a2  a1  a0",
13494
                          "   0   0   0   0      0   0   0   0";
13495
 
13496
        mode            = 0x41;
13497
        delay           = 10;
13498
        blocksize       = 128;
13499
        readsize        = 256;
13500
      ;
13501
 
13502
    memory "lock"
13503
        size            = 1;
13504
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
13505
                          "x x x x  x x x x   x x o o  o o o o";
13506
 
13507
        write           = "1 0 1 0  1 1 0 0   1 1 1 0  0 0 0 0",
13508
                          "0 0 0 0  0 0 0 0   1 1 i i  i i i i";
13509
        min_write_delay = 9000;
13510
        max_write_delay = 9000;
13511
      ;
13512
 
13513
    memory "lfuse"
13514
        size            = 1;
13515
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
13516
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
13517
 
13518
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
13519
                          "0 0 0 0  0 0 0 0   i i i i  i i i i";
13520
        min_write_delay = 9000;
13521
        max_write_delay = 9000;
13522
      ;
13523
 
13524
    memory "hfuse"
13525
        size            = 1;
13526
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
13527
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
13528
 
13529
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
13530
                          "0 0 0 0  0 0 0 0   i i i i  i i i i";
13531
        min_write_delay = 9000;
13532
        max_write_delay = 9000;
13533
      ;
13534
 
13535
    memory "efuse"
13536
        size            = 1;
13537
 
13538
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
13539
                          "0 0 0 0  0 0 0 0  o o o o  o o o o";
13540
 
13541
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
13542
                          "0 0 0 0  0 0 0 0  1 1 1 1  1 i i i";
13543
        min_write_delay = 9000;
13544
        max_write_delay = 9000;
13545
      ;
13546
 
13547
    memory "signature"
13548
        size            = 3;
13549
        read            = "0  0  1  1   0  0  0  0   0  0  0  0   0  0  0  0",
13550
                          "0  0  0  0   0  0 a1 a0   o  o  o  o   o  o  o  o";
13551
      ;
13552
 
13553
    memory "calibration"
13554
        size            = 1;
13555
 
13556
        read            = "0 0 1 1  1 0 0 0   0 0 0 0  0 0 0 0",
13557
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
13558
        ;
13559
  ;
13560
 
13561
#------------------------------------------------------------
13562
# ATmega3250
13563
#------------------------------------------------------------
13564
 
13565
part
13566
    id               = "m3250";
13567
    desc             = "ATMEGA3250";
13568
    signature        = 0x1E 0x95 0x06;
13569
    has_jtag         = yes;
13570
#   stk500_devcode   = 0x??; # No STK500v1 support?
13571
#   avr910_devcode   = 0x??; # Try the ATmega16 one
13572
    avr910_devcode   = 0x74;
13573
    pagel            = 0xd7;
13574
    bs2              = 0xa0;
13575
    chip_erase_delay = 9000;
13576
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
13577
                       "0 0 0 0  0 0 0 0    0 0 0 0  0 0 0 0";
13578
 
13579
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
13580
                       "0 0 0 0  0 0 0 0    0 0 0 0  0 0 0 0";
13581
 
13582
    timeout             = 200;
13583
    stabdelay           = 100;
13584
    cmdexedelay         = 25;
13585
    synchloops          = 32;
13586
    bytedelay           = 0;
13587
    pollindex           = 3;
13588
    pollvalue           = 0x53;
13589
    predelay            = 1;
13590
    postdelay           = 1;
13591
    pollmethod          = 1;
13592
 
13593
    pp_controlstack     =
13594
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
13595
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
13596
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
13597
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
13598
    hventerstabdelay    = 100;
13599
    progmodedelay       = 0;
13600
    latchcycles         = 5;
13601
    togglevtg           = 1;
13602
    poweroffdelay       = 15;
13603
    resetdelayms        = 1;
13604
    resetdelayus        = 0;
13605
    hvleavestabdelay    = 15;
13606
    chiperasepulsewidth = 0;
13607
    chiperasepolltimeout = 10;
13608
    programfusepulsewidth = 0;
13609
    programfusepolltimeout = 5;
13610
    programlockpulsewidth = 0;
13611
    programlockpolltimeout = 5;
13612
 
13613
    idr                 = 0x31;
13614
    spmcr               = 0x57;
13615
    allowfullpagebitstream = no;
13616
 
13617
    memory "eeprom"
13618
        paged           = no; /* leave this "no" */
13619
        page_size       = 4;  /* for parallel programming */
13620
        size            = 1024;
13621
        min_write_delay = 9000;
13622
        max_write_delay = 9000;
13623
        readback_p1     = 0xff;
13624
        readback_p2     = 0xff;
13625
        read            = "  1   0   1   0      0   0   0   0",
13626
                          "  0   0   0   0      0   0  a9  a8",
13627
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13628
                          "  o   o   o   o      o   o   o   o";
13629
 
13630
        write           = "  1   1   0   0      0   0   0   0",
13631
                          "  0   0   0   0      0   0  a9  a8",
13632
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13633
                          "  i   i   i   i      i   i   i   i";
13634
 
13635
        loadpage_lo     = "  1   1   0   0      0   0   0   1",
13636
                          "  0   0   0   0      0   0   0   0",
13637
                          "  0   0   0   0      0   0  a1  a0",
13638
                          "  i   i   i   i      i   i   i   i";
13639
 
13640
        writepage       = "  1   1   0   0      0   0   1   0",
13641
                          "  0   0   0   0      0   0  a9  a8",
13642
                          " a7  a6  a5  a4     a3  a2   0   0",
13643
                          "  x   x   x   x      x   x   x   x";
13644
 
13645
        mode            = 0x41;
13646
        delay           = 10;
13647
        blocksize       = 4;
13648
        readsize        = 256;
13649
      ;
13650
 
13651
    memory "flash"
13652
        paged           = yes;
13653
        size            = 32768;
13654
        page_size       = 128;
13655
        num_pages       = 256;
13656
        min_write_delay = 4500;
13657
        max_write_delay = 4500;
13658
        readback_p1     = 0xff;
13659
        readback_p2     = 0xff;
13660
        read_lo         = "  0   0   1   0      0   0   0   0",
13661
                          "  0 a14 a13 a12    a11 a10  a9  a8",
13662
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13663
                          "  o   o   o   o      o   o   o   o";
13664
 
13665
        read_hi         = "  0   0   1   0      1   0   0   0",
13666
                          "  0 a14 a13 a12    a11 a10  a9  a8",
13667
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13668
                          "  o   o   o   o      o   o   o   o";
13669
 
13670
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
13671
                          "  0   0   0   0      0   0   0   0",
13672
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13673
                          "  i   i   i   i      i   i   i   i";
13674
 
13675
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
13676
                          "  0   0   0   0      0   0   0   0",
13677
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13678
                          "  i   i   i   i      i   i   i   i";
13679
 
13680
        writepage       = "  0   1   0   0      1   1   0   0",
13681
                          "  0 a14 a13 a12    a11 a10  a9  a8",
13682
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13683
                          "  x   x   x   x      x   x   x   x";
13684
 
13685
        mode            = 0x41;
13686
        delay           = 10;
13687
        blocksize       = 128;
13688
        readsize        = 256;
13689
      ;
13690
 
13691
    memory "lock"
13692
        size            = 1;
13693
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
13694
                          "x x x x  x x x x   x x o o  o o o o";
13695
 
13696
        write           = "1 0 1 0  1 1 0 0   1 1 1 0  0 0 0 0",
13697
                          "0 0 0 0  0 0 0 0   1 1 i i  i i i i";
13698
        min_write_delay = 9000;
13699
        max_write_delay = 9000;
13700
      ;
13701
 
13702
    memory "lfuse"
13703
        size            = 1;
13704
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
13705
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
13706
 
13707
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
13708
                          "0 0 0 0  0 0 0 0   i i i i  i i i i";
13709
        min_write_delay = 9000;
13710
        max_write_delay = 9000;
13711
      ;
13712
 
13713
    memory "hfuse"
13714
        size            = 1;
13715
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
13716
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
13717
 
13718
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
13719
                          "0 0 0 0  0 0 0 0   i i i i  i i i i";
13720
        min_write_delay = 9000;
13721
        max_write_delay = 9000;
13722
      ;
13723
 
13724
    memory "efuse"
13725
        size            = 1;
13726
 
13727
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
13728
                          "0 0 0 0  0 0 0 0  o o o o  o o o o";
13729
 
13730
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
13731
                          "0 0 0 0  0 0 0 0  1 1 1 1  1 i i i";
13732
        min_write_delay = 9000;
13733
        max_write_delay = 9000;
13734
      ;
13735
 
13736
    memory "signature"
13737
        size            = 3;
13738
        read            = "0  0  1  1   0  0  0  0   0  0  0  0   0  0  0  0",
13739
                          "0  0  0  0   0  0 a1 a0   o  o  o  o   o  o  o  o";
13740
      ;
13741
 
13742
    memory "calibration"
13743
        size            = 1;
13744
 
13745
        read            = "0 0 1 1  1 0 0 0   0 0 0 0  0 0 0 0",
13746
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
13747
        ;
13748
  ;
13749
 
13750
#------------------------------------------------------------
13751
# ATmega6450
13752
#------------------------------------------------------------
13753
 
13754
part
13755
    id               = "m6450";
13756
    desc             = "ATMEGA6450";
13757
    signature        = 0x1E 0x96 0x06;
13758
    has_jtag         = yes;
13759
#   stk500_devcode   = 0x??; # No STK500v1 support?
13760
#   avr910_devcode   = 0x??; # Try the ATmega16 one
13761
    avr910_devcode   = 0x74;
13762
    pagel            = 0xd7;
13763
    bs2              = 0xa0;
13764
    chip_erase_delay = 9000;
13765
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
13766
                       "0 0 0 0  0 0 0 0    0 0 0 0  0 0 0 0";
13767
 
13768
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
13769
                       "0 0 0 0  0 0 0 0    0 0 0 0  0 0 0 0";
13770
 
13771
    timeout             = 200;
13772
    stabdelay           = 100;
13773
    cmdexedelay         = 25;
13774
    synchloops          = 32;
13775
    bytedelay           = 0;
13776
    pollindex           = 3;
13777
    pollvalue           = 0x53;
13778
    predelay            = 1;
13779
    postdelay           = 1;
13780
    pollmethod          = 1;
13781
 
13782
    pp_controlstack     =
13783
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
13784
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
13785
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
13786
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
13787
    hventerstabdelay    = 100;
13788
    progmodedelay       = 0;
13789
    latchcycles         = 5;
13790
    togglevtg           = 1;
13791
    poweroffdelay       = 15;
13792
    resetdelayms        = 1;
13793
    resetdelayus        = 0;
13794
    hvleavestabdelay    = 15;
13795
    chiperasepulsewidth = 0;
13796
    chiperasepolltimeout = 10;
13797
    programfusepulsewidth = 0;
13798
    programfusepolltimeout = 5;
13799
    programlockpulsewidth = 0;
13800
    programlockpolltimeout = 5;
13801
 
13802
    idr                 = 0x31;
13803
    spmcr               = 0x57;
13804
    allowfullpagebitstream = no;
13805
 
13806
    memory "eeprom"
13807
        paged           = no; /* leave this "no" */
13808
        page_size       = 8;  /* for parallel programming */
13809
        size            = 2048;
13810
        min_write_delay = 9000;
13811
        max_write_delay = 9000;
13812
        readback_p1     = 0xff;
13813
        readback_p2     = 0xff;
13814
        read            = "  1   0   1   0      0   0   0   0",
13815
                          "  0   0   0   0      0 a10  a9  a8",
13816
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13817
                          "  o   o   o   o      o   o   o   o";
13818
 
13819
        write           = "  1   1   0   0      0   0   0   0",
13820
                          "  0   0   0   0      0 a10  a9  a8",
13821
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13822
                          "  i   i   i   i      i   i   i   i";
13823
 
13824
        loadpage_lo     = "  1   1   0   0      0   0   0   1",
13825
                          "  0   0   0   0      0   0   0   0",
13826
                          "  0   0   0   0      0  a2  a1  a0",
13827
                          "  i   i   i   i      i   i   i   i";
13828
 
13829
        writepage       = "  1   1   0   0      0   0   1   0",
13830
                          "  0   0   0   0      0 a10  a9  a8",
13831
                          " a7  a6  a5  a4     a3   0   0   0",
13832
                          "  x   x   x   x      x   x   x   x";
13833
 
13834
        mode            = 0x41;
13835
        delay           = 10;
13836
        blocksize       = 4;
13837
        readsize        = 256;
13838
      ;
13839
 
13840
    memory "flash"
13841
        paged           = yes;
13842
        size            = 65536;
13843
        page_size       = 256;
13844
        num_pages       = 256;
13845
        min_write_delay = 4500;
13846
        max_write_delay = 4500;
13847
        readback_p1     = 0xff;
13848
        readback_p2     = 0xff;
13849
        read_lo         = "   0   0   1   0      0   0   0   0",
13850
                          " a15 a14 a13 a12    a11 a10  a9  a8",
13851
                          "  a7  a6  a5  a4     a3  a2  a1  a0",
13852
                          "   o   o   o   o      o   o   o   o";
13853
 
13854
        read_hi         = "   0   0   1   0      1   0   0   0",
13855
                          " a15 a14 a13 a12    a11 a10  a9  a8",
13856
                          "  a7  a6  a5  a4     a3  a2  a1  a0",
13857
                          "   o   o   o   o      o   o   o   o";
13858
 
13859
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
13860
                          "  0   0   0   0      0   0   0   0",
13861
                          "  a7 a6  a5  a4     a3  a2  a1  a0",
13862
                          "  i   i   i   i      i   i   i   i";
13863
 
13864
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
13865
                          "  0   0   0   0      0   0   0   0",
13866
                          "  a7 a6  a5  a4     a3  a2  a1  a0",
13867
                          "  i   i   i   i      i   i   i   i";
13868
 
13869
        writepage       = "   0   1   0   0      1   1   0   0",
13870
                          " a15 a14 a13 a12    a11 a10  a9  a8",
13871
                          "  a7  a6  a5  a4     a3  a2  a1  a0",
13872
                          "   0   0   0   0      0   0   0   0";
13873
 
13874
        mode            = 0x41;
13875
        delay           = 10;
13876
        blocksize       = 128;
13877
        readsize        = 256;
13878
      ;
13879
 
13880
    memory "lock"
13881
        size            = 1;
13882
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
13883
                          "x x x x  x x x x   x x o o  o o o o";
13884
 
13885
        write           = "1 0 1 0  1 1 0 0   1 1 1 0  0 0 0 0",
13886
                          "0 0 0 0  0 0 0 0   1 1 i i  i i i i";
13887
        min_write_delay = 9000;
13888
        max_write_delay = 9000;
13889
      ;
13890
 
13891
    memory "lfuse"
13892
        size            = 1;
13893
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
13894
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
13895
 
13896
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
13897
                          "0 0 0 0  0 0 0 0   i i i i  i i i i";
13898
        min_write_delay = 9000;
13899
        max_write_delay = 9000;
13900
      ;
13901
 
13902
    memory "hfuse"
13903
        size            = 1;
13904
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
13905
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
13906
 
13907
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
13908
                          "0 0 0 0  0 0 0 0   i i i i  i i i i";
13909
        min_write_delay = 9000;
13910
        max_write_delay = 9000;
13911
      ;
13912
 
13913
    memory "efuse"
13914
        size            = 1;
13915
 
13916
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
13917
                          "0 0 0 0  0 0 0 0  o o o o  o o o o";
13918
 
13919
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
13920
                          "0 0 0 0  0 0 0 0  1 1 1 1  1 i i i";
13921
        min_write_delay = 9000;
13922
        max_write_delay = 9000;
13923
      ;
13924
 
13925
    memory "signature"
13926
        size            = 3;
13927
        read            = "0  0  1  1   0  0  0  0   0  0  0  0   0  0  0  0",
13928
                          "0  0  0  0   0  0 a1 a0   o  o  o  o   o  o  o  o";
13929
      ;
13930
 
13931
    memory "calibration"
13932
        size            = 1;
13933
 
13934
        read            = "0 0 1 1  1 0 0 0   0 0 0 0  0 0 0 0",
13935
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
13936
        ;
13937
  ;
13938
 
13939
#------------------------------------------------------------
13940
# ATXMEGA64A1
13941
#------------------------------------------------------------
13942
 
13943
part
13944
    id		= "x64a1";
13945
    desc	= "ATXMEGA64A1";
13946
    signature	= 0x1e 0x96 0x4e;
13947
    has_jtag	= yes;
13948
    has_pdi	= yes;
13949
    nvm_base	= 0x01c0;
13950
 
13951
    memory "eeprom"
13952
        size		= 0x0800;
13953
        offset		= 0x08c0000;
13954
        page_size	= 0x20;
13955
        readsize	= 0x100;
13956
    ;
13957
 
13958
    memory "application"
13959
        size		= 0x00010000;
13960
        offset		= 0x0800000;
13961
        page_size	= 0x100;
13962
        readsize	= 0x100;
13963
    ;
13964
 
13965
    memory "apptable"
13966
        size		= 0x00001000;
13967
        offset		= 0x0080f000;
13968
        page_size	= 0x100;
13969
        readsize	= 0x100;
13970
    ;
13971
 
13972
    memory "boot"
13973
        size		= 0x00001000;
13974
        offset		= 0x00810000;
13975
        page_size	= 0x100;
13976
        readsize	= 0x100;
13977
    ;
13978
 
13979
    memory "flash"
13980
        size		= 0x00011000;
13981
        offset		= 0x0800000;
13982
        page_size	= 0x100;
13983
        readsize	= 0x100;
13984
    ;
13985
 
13986
    memory "prodsig"
13987
        size		= 0x200;
13988
        offset		= 0x8e0200;
13989
        page_size	= 0x100;
13990
        readsize	= 0x100;
13991
    ;
13992
 
13993
    memory "usersig"
13994
        size		= 0x200;
13995
        offset		= 0x8e0400;
13996
        page_size	= 0x100;
13997
        readsize	= 0x100;
13998
    ;
13999
 
14000
    memory "signature"
14001
        size		= 3;
14002
        offset		= 0x1000090;
14003
    ;
14004
 
14005
    memory "fuse0"
14006
        size		= 1;
14007
        offset		= 0x8f0020;
14008
    ;
14009
 
14010
    memory "fuse1"
14011
        size		= 1;
14012
        offset		= 0x8f0021;
14013
    ;
14014
 
14015
    memory "fuse2"
14016
        size		= 1;
14017
        offset		= 0x8f0022;
14018
    ;
14019
 
14020
    memory "fuse4"
14021
        size		= 1;
14022
        offset		= 0x8f0024;
14023
    ;
14024
 
14025
    memory "fuse5"
14026
        size		= 1;
14027
        offset		= 0x8f0025;
14028
    ;
14029
 
14030
    memory "lock"
14031
        size		= 1;
14032
        offset		= 0x8f0027;
14033
    ;
14034
;
14035
 
14036
#------------------------------------------------------------
14037
# ATXMEGA128A1
14038
#------------------------------------------------------------
14039
 
14040
part
14041
    id		= "x128a1";
14042
    desc	= "ATXMEGA128A1";
14043
    signature	= 0x1e 0x97 0x4c;
14044
    has_jtag	= yes;
14045
    has_pdi	= yes;
14046
    nvm_base	= 0x01c0;
14047
 
14048
    memory "eeprom"
14049
        size		= 0x0800;
14050
        offset		= 0x08c0000;
14051
        page_size	= 0x20;
14052
        readsize	= 0x100;
14053
    ;
14054
 
14055
    memory "application"
14056
        size		= 0x00020000;
14057
        offset		= 0x0800000;
14058
        page_size	= 0x100;
14059
        readsize	= 0x100;
14060
    ;
14061
 
14062
    memory "apptable"
14063
        size		= 0x00002000;
14064
        offset		= 0x0081e000;
14065
        page_size	= 0x100;
14066
        readsize	= 0x100;
14067
    ;
14068
 
14069
    memory "boot"
14070
        size		= 0x00002000;
14071
        offset		= 0x00820000;
14072
        page_size	= 0x100;
14073
        readsize	= 0x100;
14074
    ;
14075
 
14076
    memory "flash"
14077
        size		= 0x00022000;
14078
        offset		= 0x0800000;
14079
        page_size	= 0x100;
14080
        readsize	= 0x100;
14081
    ;
14082
 
14083
    memory "prodsig"
14084
        size		= 0x200;
14085
        offset		= 0x8e0200;
14086
        page_size	= 0x100;
14087
        readsize	= 0x100;
14088
    ;
14089
 
14090
    memory "usersig"
14091
        size		= 0x200;
14092
        offset		= 0x8e0400;
14093
        page_size	= 0x100;
14094
        readsize	= 0x100;
14095
    ;
14096
 
14097
    memory "signature"
14098
        size		= 3;
14099
        offset		= 0x1000090;
14100
    ;
14101
 
14102
    memory "fuse0"
14103
        size		= 1;
14104
        offset		= 0x8f0020;
14105
    ;
14106
 
14107
    memory "fuse1"
14108
        size		= 1;
14109
        offset		= 0x8f0021;
14110
    ;
14111
 
14112
    memory "fuse2"
14113
        size		= 1;
14114
        offset		= 0x8f0022;
14115
    ;
14116
 
14117
    memory "fuse4"
14118
        size		= 1;
14119
        offset		= 0x8f0024;
14120
    ;
14121
 
14122
    memory "fuse5"
14123
        size		= 1;
14124
        offset		= 0x8f0025;
14125
    ;
14126
 
14127
    memory "lock"
14128
        size		= 1;
14129
        offset		= 0x8f0027;
14130
    ;
14131
;
14132
 
14133
#------------------------------------------------------------
14134
# ATXMEGA128A1REVD
14135
#------------------------------------------------------------
14136
 
14137
part
14138
    id		= "x128a1d";
14139
    desc	= "ATXMEGA128A1REVD";
14140
    signature	= 0x1e 0x97 0x41;
14141
    has_jtag	= yes;
14142
    has_pdi	= yes;
14143
    nvm_base	= 0x01c0;
14144
 
14145
    memory "eeprom"
14146
        size		= 0x0800;
14147
        offset		= 0x08c0000;
14148
        page_size	= 0x20;
14149
        readsize	= 0x100;
14150
    ;
14151
 
14152
    memory "application"
14153
        size		= 0x00020000;
14154
        offset		= 0x0800000;
14155
        page_size	= 0x100;
14156
        readsize	= 0x100;
14157
    ;
14158
 
14159
    memory "apptable"
14160
        size		= 0x00002000;
14161
        offset		= 0x0081e000;
14162
        page_size	= 0x100;
14163
        readsize	= 0x100;
14164
    ;
14165
 
14166
    memory "boot"
14167
        size		= 0x00002000;
14168
        offset		= 0x00820000;
14169
        page_size	= 0x100;
14170
        readsize	= 0x100;
14171
    ;
14172
 
14173
    memory "flash"
14174
        size		= 0x00022000;
14175
        offset		= 0x0800000;
14176
        page_size	= 0x100;
14177
        readsize	= 0x100;
14178
    ;
14179
 
14180
    memory "prodsig"
14181
        size		= 0x200;
14182
        offset		= 0x8e0200;
14183
        page_size	= 0x100;
14184
        readsize	= 0x100;
14185
    ;
14186
 
14187
    memory "usersig"
14188
        size		= 0x200;
14189
        offset		= 0x8e0400;
14190
        page_size	= 0x100;
14191
        readsize	= 0x100;
14192
    ;
14193
 
14194
    memory "signature"
14195
        size		= 3;
14196
        offset		= 0x1000090;
14197
    ;
14198
 
14199
    memory "fuse0"
14200
        size		= 1;
14201
        offset		= 0x8f0020;
14202
    ;
14203
 
14204
    memory "fuse1"
14205
        size		= 1;
14206
        offset		= 0x8f0021;
14207
    ;
14208
 
14209
    memory "fuse2"
14210
        size		= 1;
14211
        offset		= 0x8f0022;
14212
    ;
14213
 
14214
    memory "fuse4"
14215
        size		= 1;
14216
        offset		= 0x8f0024;
14217
    ;
14218
 
14219
    memory "fuse5"
14220
        size		= 1;
14221
        offset		= 0x8f0025;
14222
    ;
14223
 
14224
    memory "lock"
14225
        size		= 1;
14226
        offset		= 0x8f0027;
14227
    ;
14228
;
14229
 
14230
#------------------------------------------------------------
14231
# ATXMEGA192A1
14232
#------------------------------------------------------------
14233
 
14234
part
14235
    id		= "x192a1";
14236
    desc	= "ATXMEGA192A1";
14237
    signature	= 0x1e 0x97 0x4e;
14238
    has_jtag	= yes;
14239
    has_pdi	= yes;
14240
    nvm_base	= 0x01c0;
14241
 
14242
    memory "eeprom"
14243
        size		= 0x0800;
14244
        offset		= 0x08c0000;
14245
        page_size	= 0x20;
14246
        readsize	= 0x100;
14247
    ;
14248
 
14249
    memory "application"
14250
        size		= 0x00030000;
14251
        offset		= 0x0800000;
14252
        page_size	= 0x100;
14253
        readsize	= 0x100;
14254
    ;
14255
 
14256
    memory "apptable"
14257
        size		= 0x00002000;
14258
        offset		= 0x0082e000;
14259
        page_size	= 0x100;
14260
        readsize	= 0x100;
14261
    ;
14262
 
14263
    memory "boot"
14264
        size		= 0x00002000;
14265
        offset		= 0x00830000;
14266
        page_size	= 0x100;
14267
        readsize	= 0x100;
14268
    ;
14269
 
14270
    memory "flash"
14271
        size		= 0x00032000;
14272
        offset		= 0x0800000;
14273
        page_size	= 0x100;
14274
        readsize	= 0x100;
14275
    ;
14276
 
14277
    memory "prodsig"
14278
        size		= 0x200;
14279
        offset		= 0x8e0200;
14280
        page_size	= 0x100;
14281
        readsize	= 0x100;
14282
    ;
14283
 
14284
    memory "usersig"
14285
        size		= 0x200;
14286
        offset		= 0x8e0400;
14287
        page_size	= 0x100;
14288
        readsize	= 0x100;
14289
    ;
14290
 
14291
    memory "signature"
14292
        size		= 3;
14293
        offset		= 0x1000090;
14294
    ;
14295
 
14296
    memory "fuse0"
14297
        size		= 1;
14298
        offset		= 0x8f0020;
14299
    ;
14300
 
14301
    memory "fuse1"
14302
        size		= 1;
14303
        offset		= 0x8f0021;
14304
    ;
14305
 
14306
    memory "fuse2"
14307
        size		= 1;
14308
        offset		= 0x8f0022;
14309
    ;
14310
 
14311
    memory "fuse4"
14312
        size		= 1;
14313
        offset		= 0x8f0024;
14314
    ;
14315
 
14316
    memory "fuse5"
14317
        size		= 1;
14318
        offset		= 0x8f0025;
14319
    ;
14320
 
14321
    memory "lock"
14322
        size		= 1;
14323
        offset		= 0x8f0027;
14324
    ;
14325
;
14326
 
14327
#------------------------------------------------------------
14328
# ATXMEGA256A1
14329
#------------------------------------------------------------
14330
 
14331
part
14332
    id		= "x256a1";
14333
    desc	= "ATXMEGA256A1";
14334
    signature	= 0x1e 0x98 0x46;
14335
    has_jtag	= yes;
14336
    has_pdi	= yes;
14337
    nvm_base	= 0x01c0;
14338
 
14339
    memory "eeprom"
14340
        size		= 0x1000;
14341
        offset		= 0x08c0000;
14342
        page_size	= 0x20;
14343
        readsize	= 0x100;
14344
    ;
14345
 
14346
    memory "application"
14347
        size		= 0x00040000;
14348
        offset		= 0x0800000;
14349
        page_size	= 0x100;
14350
        readsize	= 0x100;
14351
    ;
14352
 
14353
    memory "apptable"
14354
        size		= 0x00002000;
14355
        offset		= 0x0083e000;
14356
        page_size	= 0x100;
14357
        readsize	= 0x100;
14358
    ;
14359
 
14360
    memory "boot"
14361
        size		= 0x00002000;
14362
        offset		= 0x00840000;
14363
        page_size	= 0x100;
14364
        readsize	= 0x100;
14365
    ;
14366
 
14367
    memory "flash"
14368
        size		= 0x00042000;
14369
        offset		= 0x0800000;
14370
        page_size	= 0x100;
14371
        readsize	= 0x100;
14372
    ;
14373
 
14374
    memory "prodsig"
14375
        size		= 0x200;
14376
        offset		= 0x8e0200;
14377
        page_size	= 0x100;
14378
        readsize	= 0x100;
14379
    ;
14380
 
14381
    memory "usersig"
14382
        size		= 0x200;
14383
        offset		= 0x8e0400;
14384
        page_size	= 0x100;
14385
        readsize	= 0x100;
14386
    ;
14387
 
14388
    memory "signature"
14389
        size		= 3;
14390
        offset		= 0x1000090;
14391
    ;
14392
 
14393
    memory "fuse0"
14394
        size		= 1;
14395
        offset		= 0x8f0020;
14396
    ;
14397
 
14398
    memory "fuse1"
14399
        size		= 1;
14400
        offset		= 0x8f0021;
14401
    ;
14402
 
14403
    memory "fuse2"
14404
        size		= 1;
14405
        offset		= 0x8f0022;
14406
    ;
14407
 
14408
    memory "fuse4"
14409
        size		= 1;
14410
        offset		= 0x8f0024;
14411
    ;
14412
 
14413
    memory "fuse5"
14414
        size		= 1;
14415
        offset		= 0x8f0025;
14416
    ;
14417
 
14418
    memory "lock"
14419
        size		= 1;
14420
        offset		= 0x8f0027;
14421
    ;
14422
;
14423
 
14424
#------------------------------------------------------------
14425
# ATXMEGA64A3
14426
#------------------------------------------------------------
14427
 
14428
part
14429
    id		= "x64a3";
14430
    desc	= "ATXMEGA64A3";
14431
    signature	= 0x1e 0x96 0x42;
14432
    has_jtag	= yes;
14433
    has_pdi	= yes;
14434
    nvm_base	= 0x01c0;
14435
 
14436
    memory "eeprom"
14437
        size		= 0x0800;
14438
        offset		= 0x08c0000;
14439
        page_size	= 0x20;
14440
        readsize	= 0x100;
14441
    ;
14442
 
14443
    memory "application"
14444
        size		= 0x00010000;
14445
        offset		= 0x0800000;
14446
        page_size	= 0x100;
14447
        readsize	= 0x100;
14448
    ;
14449
 
14450
    memory "apptable"
14451
        size		= 0x00001000;
14452
        offset		= 0x0080f000;
14453
        page_size	= 0x100;
14454
        readsize	= 0x100;
14455
    ;
14456
 
14457
    memory "boot"
14458
        size		= 0x00001000;
14459
        offset		= 0x00810000;
14460
        page_size	= 0x100;
14461
        readsize	= 0x100;
14462
    ;
14463
 
14464
    memory "flash"
14465
        size		= 0x00011000;
14466
        offset		= 0x0800000;
14467
        page_size	= 0x100;
14468
        readsize	= 0x100;
14469
    ;
14470
 
14471
    memory "prodsig"
14472
        size		= 0x200;
14473
        offset		= 0x8e0200;
14474
        page_size	= 0x100;
14475
        readsize	= 0x100;
14476
    ;
14477
 
14478
    memory "usersig"
14479
        size		= 0x200;
14480
        offset		= 0x8e0400;
14481
        page_size	= 0x100;
14482
        readsize	= 0x100;
14483
    ;
14484
 
14485
    memory "signature"
14486
        size		= 3;
14487
        offset		= 0x1000090;
14488
    ;
14489
 
14490
    memory "fuse0"
14491
        size		= 1;
14492
        offset		= 0x8f0020;
14493
    ;
14494
 
14495
    memory "fuse1"
14496
        size		= 1;
14497
        offset		= 0x8f0021;
14498
    ;
14499
 
14500
    memory "fuse2"
14501
        size		= 1;
14502
        offset		= 0x8f0022;
14503
    ;
14504
 
14505
    memory "fuse4"
14506
        size		= 1;
14507
        offset		= 0x8f0024;
14508
    ;
14509
 
14510
    memory "fuse5"
14511
        size		= 1;
14512
        offset		= 0x8f0025;
14513
    ;
14514
 
14515
    memory "lock"
14516
        size		= 1;
14517
        offset		= 0x8f0027;
14518
    ;
14519
;
14520
 
14521
#------------------------------------------------------------
14522
# ATXMEGA128A3
14523
#------------------------------------------------------------
14524
 
14525
part
14526
    id		= "x128a3";
14527
    desc	= "ATXMEGA128A3";
14528
    signature	= 0x1e 0x97 0x42;
14529
    has_jtag	= yes;
14530
    has_pdi	= yes;
14531
    nvm_base	= 0x01c0;
14532
 
14533
    memory "eeprom"
14534
        size		= 0x0800;
14535
        offset		= 0x08c0000;
14536
        page_size	= 0x20;
14537
        readsize	= 0x100;
14538
    ;
14539
 
14540
    memory "application"
14541
        size		= 0x00020000;
14542
        offset		= 0x0800000;
14543
        page_size	= 0x100;
14544
        readsize	= 0x100;
14545
    ;
14546
 
14547
    memory "apptable"
14548
        size		= 0x00002000;
14549
        offset		= 0x0081e000;
14550
        page_size	= 0x100;
14551
        readsize	= 0x100;
14552
    ;
14553
 
14554
    memory "boot"
14555
        size		= 0x00002000;
14556
        offset		= 0x00820000;
14557
        page_size	= 0x100;
14558
        readsize	= 0x100;
14559
    ;
14560
 
14561
    memory "flash"
14562
        size		= 0x00022000;
14563
        offset		= 0x0800000;
14564
        page_size	= 0x100;
14565
        readsize	= 0x100;
14566
    ;
14567
 
14568
    memory "prodsig"
14569
        size		= 0x200;
14570
        offset		= 0x8e0200;
14571
        page_size	= 0x100;
14572
        readsize	= 0x100;
14573
    ;
14574
 
14575
    memory "usersig"
14576
        size		= 0x200;
14577
        offset		= 0x8e0400;
14578
        page_size	= 0x100;
14579
        readsize	= 0x100;
14580
    ;
14581
 
14582
    memory "signature"
14583
        size		= 3;
14584
        offset		= 0x1000090;
14585
    ;
14586
 
14587
    memory "fuse0"
14588
        size		= 1;
14589
        offset		= 0x8f0020;
14590
    ;
14591
 
14592
    memory "fuse1"
14593
        size		= 1;
14594
        offset		= 0x8f0021;
14595
    ;
14596
 
14597
    memory "fuse2"
14598
        size		= 1;
14599
        offset		= 0x8f0022;
14600
    ;
14601
 
14602
    memory "fuse4"
14603
        size		= 1;
14604
        offset		= 0x8f0024;
14605
    ;
14606
 
14607
    memory "fuse5"
14608
        size		= 1;
14609
        offset		= 0x8f0025;
14610
    ;
14611
 
14612
    memory "lock"
14613
        size		= 1;
14614
        offset		= 0x8f0027;
14615
    ;
14616
;
14617
 
14618
#------------------------------------------------------------
14619
# ATXMEGA192A3
14620
#------------------------------------------------------------
14621
 
14622
part
14623
    id		= "x192a3";
14624
    desc	= "ATXMEGA192A3";
14625
    signature	= 0x1e 0x97 0x44;
14626
    has_jtag	= yes;
14627
    has_pdi	= yes;
14628
    nvm_base	= 0x01c0;
14629
 
14630
    memory "eeprom"
14631
        size		= 0x0800;
14632
        offset		= 0x08c0000;
14633
        page_size	= 0x20;
14634
        readsize	= 0x100;
14635
    ;
14636
 
14637
    memory "application"
14638
        size		= 0x00030000;
14639
        offset		= 0x0800000;
14640
        page_size	= 0x100;
14641
        readsize	= 0x100;
14642
    ;
14643
 
14644
    memory "apptable"
14645
        size		= 0x00002000;
14646
        offset		= 0x0082e000;
14647
        page_size	= 0x100;
14648
        readsize	= 0x100;
14649
    ;
14650
 
14651
    memory "boot"
14652
        size		= 0x00002000;
14653
        offset		= 0x00830000;
14654
        page_size	= 0x100;
14655
        readsize	= 0x100;
14656
    ;
14657
 
14658
    memory "flash"
14659
        size		= 0x00032000;
14660
        offset		= 0x0800000;
14661
        page_size	= 0x100;
14662
        readsize	= 0x100;
14663
    ;
14664
 
14665
    memory "prodsig"
14666
        size		= 0x200;
14667
        offset		= 0x8e0200;
14668
        page_size	= 0x100;
14669
        readsize	= 0x100;
14670
    ;
14671
 
14672
    memory "usersig"
14673
        size		= 0x200;
14674
        offset		= 0x8e0400;
14675
        page_size	= 0x100;
14676
        readsize	= 0x100;
14677
    ;
14678
 
14679
    memory "signature"
14680
        size		= 3;
14681
        offset		= 0x1000090;
14682
    ;
14683
 
14684
    memory "fuse0"
14685
        size		= 1;
14686
        offset		= 0x8f0020;
14687
    ;
14688
 
14689
    memory "fuse1"
14690
        size		= 1;
14691
        offset		= 0x8f0021;
14692
    ;
14693
 
14694
    memory "fuse2"
14695
        size		= 1;
14696
        offset		= 0x8f0022;
14697
    ;
14698
 
14699
    memory "fuse4"
14700
        size		= 1;
14701
        offset		= 0x8f0024;
14702
    ;
14703
 
14704
    memory "fuse5"
14705
        size		= 1;
14706
        offset		= 0x8f0025;
14707
    ;
14708
 
14709
    memory "lock"
14710
        size		= 1;
14711
        offset		= 0x8f0027;
14712
    ;
14713
;
14714
 
14715
#------------------------------------------------------------
14716
# ATXMEGA256A3
14717
#------------------------------------------------------------
14718
 
14719
part
14720
    id		= "x256a3";
14721
    desc	= "ATXMEGA256A3";
14722
    signature	= 0x1e 0x98 0x42;
14723
    has_jtag	= yes;
14724
    has_pdi	= yes;
14725
    nvm_base	= 0x01c0;
14726
 
14727
    memory "eeprom"
14728
        size		= 0x1000;
14729
        offset		= 0x08c0000;
14730
        page_size	= 0x20;
14731
        readsize	= 0x100;
14732
    ;
14733
 
14734
    memory "application"
14735
        size		= 0x00040000;
14736
        offset		= 0x0800000;
14737
        page_size	= 0x100;
14738
        readsize	= 0x100;
14739
    ;
14740
 
14741
    memory "apptable"
14742
        size		= 0x00002000;
14743
        offset		= 0x0083e000;
14744
        page_size	= 0x100;
14745
        readsize	= 0x100;
14746
    ;
14747
 
14748
    memory "boot"
14749
        size		= 0x00002000;
14750
        offset		= 0x00840000;
14751
        page_size	= 0x100;
14752
        readsize	= 0x100;
14753
    ;
14754
 
14755
    memory "flash"
14756
        size		= 0x00042000;
14757
        offset		= 0x0800000;
14758
        page_size	= 0x100;
14759
        readsize	= 0x100;
14760
    ;
14761
 
14762
    memory "prodsig"
14763
        size		= 0x200;
14764
        offset		= 0x8e0200;
14765
        page_size	= 0x100;
14766
        readsize	= 0x100;
14767
    ;
14768
 
14769
    memory "usersig"
14770
        size		= 0x200;
14771
        offset		= 0x8e0400;
14772
        page_size	= 0x100;
14773
        readsize	= 0x100;
14774
    ;
14775
 
14776
    memory "signature"
14777
        size		= 3;
14778
        offset		= 0x1000090;
14779
    ;
14780
 
14781
    memory "fuse0"
14782
        size		= 1;
14783
        offset		= 0x8f0020;
14784
    ;
14785
 
14786
    memory "fuse1"
14787
        size		= 1;
14788
        offset		= 0x8f0021;
14789
    ;
14790
 
14791
    memory "fuse2"
14792
        size		= 1;
14793
        offset		= 0x8f0022;
14794
    ;
14795
 
14796
    memory "fuse4"
14797
        size		= 1;
14798
        offset		= 0x8f0024;
14799
    ;
14800
 
14801
    memory "fuse5"
14802
        size		= 1;
14803
        offset		= 0x8f0025;
14804
    ;
14805
 
14806
    memory "lock"
14807
        size		= 1;
14808
        offset		= 0x8f0027;
14809
    ;
14810
;
14811
 
14812
#------------------------------------------------------------
14813
# ATXMEGA256A3B
14814
#------------------------------------------------------------
14815
 
14816
part
14817
    id		= "x256a3b";
14818
    desc	= "ATXMEGA256A3B";
14819
    signature	= 0x1e 0x98 0x43;
14820
    has_jtag	= yes;
14821
    has_pdi	= yes;
14822
    nvm_base	= 0x01c0;
14823
 
14824
    memory "eeprom"
14825
        size		= 0x1000;
14826
        offset		= 0x08c0000;
14827
        page_size	= 0x20;
14828
        readsize	= 0x100;
14829
    ;
14830
 
14831
    memory "application"
14832
        size		= 0x00040000;
14833
        offset		= 0x0800000;
14834
        page_size	= 0x100;
14835
        readsize	= 0x100;
14836
    ;
14837
 
14838
    memory "apptable"
14839
        size		= 0x00002000;
14840
        offset		= 0x0083e000;
14841
        page_size	= 0x100;
14842
        readsize	= 0x100;
14843
    ;
14844
 
14845
    memory "boot"
14846
        size		= 0x00002000;
14847
        offset		= 0x00840000;
14848
        page_size	= 0x100;
14849
        readsize	= 0x100;
14850
    ;
14851
 
14852
    memory "flash"
14853
        size		= 0x00042000;
14854
        offset		= 0x0800000;
14855
        page_size	= 0x100;
14856
        readsize	= 0x100;
14857
    ;
14858
 
14859
    memory "prodsig"
14860
        size		= 0x200;
14861
        offset		= 0x8e0200;
14862
        page_size	= 0x100;
14863
        readsize	= 0x100;
14864
    ;
14865
 
14866
    memory "usersig"
14867
        size		= 0x200;
14868
        offset		= 0x8e0400;
14869
        page_size	= 0x100;
14870
        readsize	= 0x100;
14871
    ;
14872
 
14873
    memory "signature"
14874
        size		= 3;
14875
        offset		= 0x1000090;
14876
    ;
14877
 
14878
    memory "fuse0"
14879
        size		= 1;
14880
        offset		= 0x8f0020;
14881
    ;
14882
 
14883
    memory "fuse1"
14884
        size		= 1;
14885
        offset		= 0x8f0021;
14886
    ;
14887
 
14888
    memory "fuse2"
14889
        size		= 1;
14890
        offset		= 0x8f0022;
14891
    ;
14892
 
14893
    memory "fuse4"
14894
        size		= 1;
14895
        offset		= 0x8f0024;
14896
    ;
14897
 
14898
    memory "fuse5"
14899
        size		= 1;
14900
        offset		= 0x8f0025;
14901
    ;
14902
 
14903
    memory "lock"
14904
        size		= 1;
14905
        offset		= 0x8f0027;
14906
    ;
14907
;
14908
 
14909
#------------------------------------------------------------
14910
# ATXMEGA16A4
14911
#------------------------------------------------------------
14912
 
14913
part
14914
    id		= "x16a4";
14915
    desc	= "ATXMEGA16A4";
14916
    signature	= 0x1e 0x94 0x41;
14917
    has_jtag	= yes;
14918
    has_pdi	= yes;
14919
    nvm_base	= 0x01c0;
14920
 
14921
    memory "eeprom"
14922
        size		= 0x0400;
14923
        offset		= 0x08c0000;
14924
        page_size	= 0x20;
14925
        readsize	= 0x100;
14926
    ;
14927
 
14928
    memory "application"
14929
        size		= 0x00004000;
14930
        offset		= 0x0800000;
14931
        page_size	= 0x100;
14932
        readsize	= 0x100;
14933
    ;
14934
 
14935
    memory "apptable"
14936
        size		= 0x00001000;
14937
        offset		= 0x00803000;
14938
        page_size	= 0x100;
14939
        readsize	= 0x100;
14940
    ;
14941
 
14942
    memory "boot"
14943
        size		= 0x00001000;
14944
        offset		= 0x00804000;
14945
        page_size	= 0x100;
14946
        readsize	= 0x100;
14947
    ;
14948
 
14949
    memory "flash"
14950
        size		= 0x00005000;
14951
        offset		= 0x0800000;
14952
        page_size	= 0x100;
14953
        readsize	= 0x100;
14954
    ;
14955
 
14956
    memory "prodsig"
14957
        size		= 0x200;
14958
        offset		= 0x8e0200;
14959
        page_size	= 0x100;
14960
        readsize	= 0x100;
14961
    ;
14962
 
14963
    memory "usersig"
14964
        size		= 0x200;
14965
        offset		= 0x8e0400;
14966
        page_size	= 0x100;
14967
        readsize	= 0x100;
14968
    ;
14969
 
14970
    memory "signature"
14971
        size		= 3;
14972
        offset		= 0x1000090;
14973
    ;
14974
 
14975
    memory "fuse0"
14976
        size		= 1;
14977
        offset		= 0x8f0020;
14978
    ;
14979
 
14980
    memory "fuse1"
14981
        size		= 1;
14982
        offset		= 0x8f0021;
14983
    ;
14984
 
14985
    memory "fuse2"
14986
        size		= 1;
14987
        offset		= 0x8f0022;
14988
    ;
14989
 
14990
    memory "fuse4"
14991
        size		= 1;
14992
        offset		= 0x8f0024;
14993
    ;
14994
 
14995
    memory "fuse5"
14996
        size		= 1;
14997
        offset		= 0x8f0025;
14998
    ;
14999
 
15000
    memory "lock"
15001
        size		= 1;
15002
        offset		= 0x8f0027;
15003
    ;
15004
;
15005
 
15006
#------------------------------------------------------------
15007
# ATXMEGA32A4
15008
#------------------------------------------------------------
15009
 
15010
part
15011
    id		= "x32a4";
15012
    desc	= "ATXMEGA32A4";
15013
    signature	= 0x1e 0x95 0x41;
15014
    has_jtag	= yes;
15015
    has_pdi	= yes;
15016
    nvm_base	= 0x01c0;
15017
 
15018
    memory "eeprom"
15019
        size		= 0x0400;
15020
        offset		= 0x08c0000;
15021
        page_size	= 0x20;
15022
        readsize	= 0x100;
15023
    ;
15024
 
15025
    memory "application"
15026
        size		= 0x00008000;
15027
        offset		= 0x0800000;
15028
        page_size	= 0x100;
15029
        readsize	= 0x100;
15030
    ;
15031
 
15032
    memory "apptable"
15033
        size		= 0x00001000;
15034
        offset		= 0x00807000;
15035
        page_size	= 0x100;
15036
        readsize	= 0x100;
15037
    ;
15038
 
15039
    memory "boot"
15040
        size		= 0x00001000;
15041
        offset		= 0x00808000;
15042
        page_size	= 0x100;
15043
        readsize	= 0x100;
15044
    ;
15045
 
15046
    memory "flash"
15047
        size		= 0x00009000;
15048
        offset		= 0x0800000;
15049
        page_size	= 0x100;
15050
        readsize	= 0x100;
15051
    ;
15052
 
15053
    memory "prodsig"
15054
        size		= 0x200;
15055
        offset		= 0x8e0200;
15056
        page_size	= 0x100;
15057
        readsize	= 0x100;
15058
    ;
15059
 
15060
    memory "usersig"
15061
        size		= 0x200;
15062
        offset		= 0x8e0400;
15063
        page_size	= 0x100;
15064
        readsize	= 0x100;
15065
    ;
15066
 
15067
    memory "signature"
15068
        size		= 3;
15069
        offset		= 0x1000090;
15070
    ;
15071
 
15072
    memory "fuse0"
15073
        size		= 1;
15074
        offset		= 0x8f0020;
15075
    ;
15076
 
15077
    memory "fuse1"
15078
        size		= 1;
15079
        offset		= 0x8f0021;
15080
    ;
15081
 
15082
    memory "fuse2"
15083
        size		= 1;
15084
        offset		= 0x8f0022;
15085
    ;
15086
 
15087
    memory "fuse4"
15088
        size		= 1;
15089
        offset		= 0x8f0024;
15090
    ;
15091
 
15092
    memory "fuse5"
15093
        size		= 1;
15094
        offset		= 0x8f0025;
15095
    ;
15096
 
15097
    memory "lock"
15098
        size		= 1;
15099
        offset		= 0x8f0027;
15100
    ;
15101
;
15102
 
15103
#------------------------------------------------------------
15104
# ATXMEGA64A4
15105
#------------------------------------------------------------
15106
 
15107
part
15108
    id		= "x64a4";
15109
    desc	= "ATXMEGA64A4";
15110
    signature	= 0x1e 0x96 0x46;
15111
    has_jtag	= yes;
15112
    has_pdi	= yes;
15113
    nvm_base	= 0x01c0;
15114
 
15115
    memory "eeprom"
15116
        size		= 0x0800;
15117
        offset		= 0x08c0000;
15118
        page_size	= 0x20;
15119
        readsize	= 0x100;
15120
    ;
15121
 
15122
    memory "application"
15123
        size		= 0x00010000;
15124
        offset		= 0x0800000;
15125
        page_size	= 0x100;
15126
        readsize	= 0x100;
15127
    ;
15128
 
15129
    memory "apptable"
15130
        size		= 0x00001000;
15131
        offset		= 0x0080f000;
15132
        page_size	= 0x100;
15133
        readsize	= 0x100;
15134
    ;
15135
 
15136
    memory "boot"
15137
        size		= 0x00001000;
15138
        offset		= 0x00810000;
15139
        page_size	= 0x100;
15140
        readsize	= 0x100;
15141
    ;
15142
 
15143
    memory "flash"
15144
        size		= 0x00011000;
15145
        offset		= 0x0800000;
15146
        page_size	= 0x100;
15147
        readsize	= 0x100;
15148
    ;
15149
 
15150
    memory "prodsig"
15151
        size		= 0x200;
15152
        offset		= 0x8e0200;
15153
        page_size	= 0x100;
15154
        readsize	= 0x100;
15155
    ;
15156
 
15157
    memory "usersig"
15158
        size		= 0x200;
15159
        offset		= 0x8e0400;
15160
        page_size	= 0x100;
15161
        readsize	= 0x100;
15162
    ;
15163
 
15164
    memory "signature"
15165
        size		= 3;
15166
        offset		= 0x1000090;
15167
    ;
15168
 
15169
    memory "fuse0"
15170
        size		= 1;
15171
        offset		= 0x8f0020;
15172
    ;
15173
 
15174
    memory "fuse1"
15175
        size		= 1;
15176
        offset		= 0x8f0021;
15177
    ;
15178
 
15179
    memory "fuse2"
15180
        size		= 1;
15181
        offset		= 0x8f0022;
15182
    ;
15183
 
15184
    memory "fuse4"
15185
        size		= 1;
15186
        offset		= 0x8f0024;
15187
    ;
15188
 
15189
    memory "fuse5"
15190
        size		= 1;
15191
        offset		= 0x8f0025;
15192
    ;
15193
 
15194
    memory "lock"
15195
        size		= 1;
15196
        offset		= 0x8f0027;
15197
    ;
15198
;
15199
 
15200
#------------------------------------------------------------
15201
# ATXMEGA128A4
15202
#------------------------------------------------------------
15203
 
15204
part
15205
    id		= "x128a4";
15206
    desc	= "ATXMEGA128A4";
15207
    signature	= 0x1e 0x97 0x46;
15208
    has_jtag	= yes;
15209
    has_pdi	= yes;
15210
    nvm_base	= 0x01c0;
15211
 
15212
    memory "eeprom"
15213
        size		= 0x0800;
15214
        offset		= 0x08c0000;
15215
        page_size	= 0x20;
15216
        readsize	= 0x100;
15217
    ;
15218
 
15219
    memory "application"
15220
        size		= 0x00020000;
15221
        offset		= 0x0800000;
15222
        page_size	= 0x100;
15223
        readsize	= 0x100;
15224
    ;
15225
 
15226
    memory "apptable"
15227
        size		= 0x00002000;
15228
        offset		= 0x0081e000;
15229
        page_size	= 0x100;
15230
        readsize	= 0x100;
15231
    ;
15232
 
15233
    memory "boot"
15234
        size		= 0x00002000;
15235
        offset		= 0x00820000;
15236
        page_size	= 0x100;
15237
        readsize	= 0x100;
15238
    ;
15239
 
15240
    memory "flash"
15241
        size		= 0x00022000;
15242
        offset		= 0x0800000;
15243
        page_size	= 0x100;
15244
        readsize	= 0x100;
15245
    ;
15246
 
15247
    memory "prodsig"
15248
        size		= 0x200;
15249
        offset		= 0x8e0200;
15250
        page_size	= 0x100;
15251
        readsize	= 0x100;
15252
    ;
15253
 
15254
    memory "usersig"
15255
        size		= 0x200;
15256
        offset		= 0x8e0400;
15257
        page_size	= 0x100;
15258
        readsize	= 0x100;
15259
    ;
15260
 
15261
    memory "signature"
15262
        size		= 3;
15263
        offset		= 0x1000090;
15264
    ;
15265
 
15266
    memory "fuse0"
15267
        size		= 1;
15268
        offset		= 0x8f0020;
15269
    ;
15270
 
15271
    memory "fuse1"
15272
        size		= 1;
15273
        offset		= 0x8f0021;
15274
    ;
15275
 
15276
    memory "fuse2"
15277
        size		= 1;
15278
        offset		= 0x8f0022;
15279
    ;
15280
 
15281
    memory "fuse4"
15282
        size		= 1;
15283
        offset		= 0x8f0024;
15284
    ;
15285
 
15286
    memory "fuse5"
15287
        size		= 1;
15288
        offset		= 0x8f0025;
15289
    ;
15290
 
15291
    memory "lock"
15292
        size		= 1;
15293
        offset		= 0x8f0027;
15294
    ;
15295
;
15296
 
15297
 
15298
#------------------------------------------------------------
15299
# AVR32UC3A0512
15300
#------------------------------------------------------------
15301
 
15302
part
15303
    id		= "ucr2";
15304
    desc	= "32UC3A0512";
15305
    signature	= 0xED 0xC0 0x3F;
15306
    has_jtag	= yes;
15307
    is_avr32    = yes;
15308
 
15309
    memory "flash"
15310
        paged           = yes;
15311
        page_size		= 512;               # bytes
15312
        readsize		= 512;				 # bytes
15313
        num_pages       = 1024;              # could be set dynamicly
15314
        size			= 0x00080000;		 # could be set dynamicly
15315
        offset			= 0x80000000;
15316
    ;
15317
;
15318
 
15319
#------------------------------------------------------------
15320
# ATtiny4
15321
#------------------------------------------------------------
15322
 
15323
part
15324
    id		= "t4";
15325
    desc	= "ATtiny4";
15326
    signature	= 0x1e 0x8f 0x0a;
15327
    has_tpi	= yes;
15328
 
15329
    memory "flash"
15330
        size		= 512;
15331
        offset		= 0x4000;
15332
        page_size	= 16;
15333
        blocksize	= 128;
15334
    ;
15335
 
15336
    memory "signature"
15337
        size		= 3;
15338
        offset		= 0x3fc0;
15339
    ;
15340
 
15341
    memory "fuse"
15342
        size		= 1;
15343
        offset		= 0x3f40;
15344
	blocksize	= 4;
15345
    ;
15346
 
15347
    memory "calibration"
15348
        size		= 1;
15349
        offset		= 0x3f80;
15350
    ;
15351
 
15352
    memory "lockbits"
15353
        size		= 1;
15354
        offset		= 0x3f00;
15355
    ;
15356
;
15357
 
15358
 
15359
#------------------------------------------------------------
15360
# ATtiny5
15361
#------------------------------------------------------------
15362
 
15363
part
15364
    id		= "t5";
15365
    desc	= "ATtiny5";
15366
    signature	= 0x1e 0x8f 0x09;
15367
    has_tpi	= yes;
15368
 
15369
    memory "flash"
15370
        size		= 512;
15371
        offset		= 0x4000;
15372
        page_size	= 16;
15373
        blocksize	= 128;
15374
    ;
15375
 
15376
    memory "signature"
15377
        size		= 3;
15378
        offset		= 0x3fc0;
15379
    ;
15380
 
15381
    memory "fuse"
15382
        size		= 1;
15383
        offset		= 0x3f40;
15384
	blocksize	= 4;
15385
    ;
15386
 
15387
    memory "calibration"
15388
        size		= 1;
15389
        offset		= 0x3f80;
15390
    ;
15391
 
15392
    memory "lockbits"
15393
        size		= 1;
15394
        offset		= 0x3f00;
15395
    ;
15396
;
15397
 
15398
 
15399
#------------------------------------------------------------
15400
# ATtiny9
15401
#------------------------------------------------------------
15402
 
15403
part
15404
    id		= "t8";
15405
    desc	= "ATtiny9";
15406
    signature	= 0x1e 0x90 0x08;
15407
    has_tpi	= yes;
15408
 
15409
    memory "flash"
15410
        size		= 1024;
15411
        offset		= 0x4000;
15412
        page_size	= 16;
15413
        blocksize	= 128;
15414
    ;
15415
 
15416
    memory "signature"
15417
        size		= 3;
15418
        offset		= 0x3fc0;
15419
    ;
15420
 
15421
    memory "fuse"
15422
        size		= 1;
15423
        offset		= 0x3f40;
15424
	blocksize	= 4;
15425
    ;
15426
 
15427
    memory "calibration"
15428
        size		= 1;
15429
        offset		= 0x3f80;
15430
    ;
15431
 
15432
    memory "lockbits"
15433
        size		= 1;
15434
        offset		= 0x3f00;
15435
    ;
15436
;
15437
 
15438
 
15439
#------------------------------------------------------------
15440
# ATtiny10
15441
#------------------------------------------------------------
15442
 
15443
part
15444
    id		= "t10";
15445
    desc	= "ATtiny10";
15446
    signature	= 0x1e 0x90 0x03;
15447
    has_tpi	= yes;
15448
 
15449
    memory "flash"
15450
        size		= 1024;
15451
        offset		= 0x4000;
15452
        page_size	= 16;
15453
        blocksize	= 128;
15454
    ;
15455
 
15456
    memory "signature"
15457
        size		= 3;
15458
        offset		= 0x3fc0;
15459
    ;
15460
 
15461
    memory "fuse"
15462
        size		= 1;
15463
        offset		= 0x3f40;
15464
	blocksize	= 4;
15465
    ;
15466
 
15467
    memory "calibration"
15468
        size		= 1;
15469
        offset		= 0x3f80;
15470
    ;
15471
 
15472
    memory "lockbits"
15473
        size		= 1;
15474
        offset		= 0x3f00;
15475
    ;
15476
;
15477
 
15478