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   = "unknown";
310
default_serial     = "unknown";
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
 
596
#
597
# some ultra cheap programmers use bitbanging on the
598
# serialport.
599
#
600
# PC - DB9 - Pins for RS232:
601
#
602
# GND   5   -- |O
603
#              |   O| <-   9   RI
604
# DTR   4   <- |O   |
605
#              |   O| <-   8   CTS
606
# TXD   3   <- |O   |
607
#              |   O| ->   7   RTS
608
# RXD   2   -> |O   |
609
#              |   O| <-   6   DSR
610
# DCD   1   -> |O
611
#
612
# Using RXD is currently not supported.
613
# Using RI is not supported under Win32 but is supported under Posix.
614
 
615
# serial ponyprog design (dasa2 in uisp)
616
# reset=!txd sck=rts mosi=dtr miso=cts
617
 
618
programmer
619
  id    = "ponyser";
620
  desc  = "design ponyprog serial, reset=!txd sck=rts mosi=dtr miso=cts";
621
  type  = serbb;
622
  reset = ~3;
623
  sck   = 7;
624
  mosi  = 4;
625
  miso  = 8;
626
;
627
 
628
# Same as above, different name
629
# reset=!txd sck=rts mosi=dtr miso=cts
630
 
631
programmer
632
  id    = "siprog";
633
  desc  = "Lancos SI-Prog <http://www.lancos.com/siprogsch.html>";
634
  type  = serbb;
635
  reset = ~3;
636
  sck   = 7;
637
  mosi  = 4;
638
  miso  = 8;
639
;
640
 
641
# unknown (dasa in uisp)
642
# reset=rts sck=dtr mosi=txd miso=cts
643
 
644
programmer
645
  id    = "dasa";
646
  desc  = "serial port banging, reset=rts sck=dtr mosi=txd miso=cts";
647
  type  = serbb;
648
  reset = 7;
649
  sck   = 4;
650
  mosi  = 3;
651
  miso  = 8;
652
;
653
 
654
# unknown (dasa3 in uisp)
655
# reset=!dtr sck=rts mosi=txd miso=cts
656
 
657
programmer
658
  id    = "dasa3";
659
  desc  = "serial port banging, reset=!dtr sck=rts mosi=txd miso=cts";
660
  type  = serbb;
661
  reset = ~4;
662
  sck   = 7;
663
  mosi  = 3;
664
  miso  = 8;
665
;
666
 
667
# C2N232i (jumper configuration "auto")
668
# reset=dtr sck=!rts mosi=!txd miso=!cts
669
 
670
programmer
671
  id    = "c2n232i";
672
  desc  = "serial port banging, reset=dtr sck=!rts mosi=!txd miso=!cts";
673
  type  = serbb;
674
  reset = 4;
675
  sck   = ~7;
676
  mosi  = ~3;
677
  miso  = ~8;
678
;
679
 
680
#
681
# PART DEFINITIONS
682
#
683
 
684
#------------------------------------------------------------
685
# ATtiny11
686
#------------------------------------------------------------
687
 
688
# This is an HVSP-only device.
689
 
690
part
691
    id                  = "t11";
692
    desc                = "ATtiny11";
693
    stk500_devcode      = 0x11;
694
    signature           = 0x1e 0x90 0x04;
695
    chip_erase_delay    = 20000;
696
 
697
    timeout		= 200;
698
    hvsp_controlstack     =
699
        0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00,
700
        0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78,
701
        0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
702
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
703
    hventerstabdelay    = 100;
704
    progmodedelay       = 0;
705
    hvspcmdexedelay     = 0;
706
    synchcycles         = 6;
707
    latchcycles         = 1;
708
    togglevtg           = 1;
709
    poweroffdelay       = 25;
710
    resetdelayms        = 0;
711
    resetdelayus        = 50;
712
    hvleavestabdelay    = 100;
713
    resetdelay          = 25;
714
    chiperasepolltimeout = 40;
715
    chiperasetime       = 0;
716
    programfusepolltimeout = 25;
717
    programlockpolltimeout = 25;
718
 
719
    memory "eeprom"
720
        size            = 64;
721
	blocksize	= 64;
722
	readsize	= 256;
723
	delay		= 5;
724
    ;
725
 
726
    memory "flash"
727
        size            = 1024;
728
	blocksize	= 128;
729
	readsize	= 256;
730
	delay		= 3;
731
    ;
732
 
733
    memory "signature"
734
        size            = 3;
735
    ;
736
 
737
    memory "lock"
738
        size            = 1;
739
    ;
740
 
741
    memory "calibration"
742
        size            = 1;
743
    ;
744
 
745
    memory "fuse"
746
        size            = 1;
747
    ;
748
;
749
 
750
#------------------------------------------------------------
751
# ATtiny12
752
#------------------------------------------------------------
753
 
754
part
755
    id                  = "t12";
756
    desc                = "ATtiny12";
757
    stk500_devcode      = 0x12;
758
    avr910_devcode      = 0x55;
759
    signature           = 0x1e 0x90 0x05;
760
    chip_erase_delay    = 20000;
761
    pgm_enable          = "1 0 1 0  1 1 0 0   0 1 0 1  0 0 1 1",
762
                          "x x x x  x x x x   x x x x  x x x x";
763
 
764
    chip_erase          = "1 0 1 0  1 1 0 0   1 0 0 x  x x x x",
765
                          "x x x x  x x x x   x x x x  x x x x";
766
 
767
    timeout		= 200;
768
    stabdelay		= 100;
769
    cmdexedelay		= 25;
770
    synchloops		= 32;
771
    bytedelay		= 0;
772
    pollindex		= 3;
773
    pollvalue		= 0x53;
774
    predelay		= 1;
775
    postdelay		= 1;
776
    pollmethod		= 0;
777
 
778
    hvsp_controlstack   =
779
        0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00,
780
        0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78,
781
        0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
782
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
783
    hventerstabdelay    = 100;
784
    hvspcmdexedelay     = 0;
785
    synchcycles         = 6;
786
    latchcycles         = 1;
787
    togglevtg           = 1;
788
    poweroffdelay       = 25;
789
    resetdelayms        = 0;
790
    resetdelayus        = 50;
791
    hvleavestabdelay    = 100;
792
    resetdelay          = 25;
793
    chiperasepolltimeout = 40;
794
    chiperasetime       = 0;
795
    programfusepolltimeout = 25;
796
    programlockpolltimeout = 25;
797
 
798
    memory "eeprom"
799
        size            = 64;
800
        min_write_delay = 9000;
801
        max_write_delay = 20000;
802
        readback_p1     = 0xff;
803
        readback_p2     = 0xff;
804
        read            = "1  0  1  0   0  0  0  0    x x x x  x x x x",
805
                          "x  x a5 a4  a3 a2 a1 a0    o o o o  o o o o";
806
 
807
        write           = "1  1  0  0   0  0  0  0    x x x x  x x x x",
808
                          "x  x a5 a4  a3 a2 a1 a0    i i i i  i i i i";
809
 
810
	mode		= 0x04;
811
	delay		= 8;
812
	blocksize	= 64;
813
	readsize	= 256;
814
    ;
815
 
816
    memory "flash"
817
        size            = 1024;
818
        min_write_delay = 4500;
819
        max_write_delay = 20000;
820
        readback_p1     = 0xff;
821
        readback_p2     = 0xff;
822
        read_lo         = "  0  0  1  0   0  0  0  0",
823
                          "  x  x  x  x   x  x  x a8",
824
                          " a7 a6 a5 a4  a3 a2 a1 a0",
825
                          "  o  o  o  o   o  o  o  o";
826
 
827
        read_hi         = "  0  0  1  0   1  0  0  0",
828
                          "  x  x  x  x   x  x  x a8",
829
                          " a7 a6 a5 a4  a3 a2 a1 a0",
830
                          "  o  o  o  o   o  o  o  o";
831
 
832
        write_lo        = "  0  1  0  0   0  0  0  0",
833
                          "  x  x  x  x   x  x  x a8",
834
                          " a7 a6 a5 a4  a3 a2 a1 a0",
835
                          "  i  i  i  i   i  i  i  i";
836
 
837
        write_hi        = "  0  1  0  0   1  0  0  0",
838
                          "  x  x  x  x   x  x  x a8",
839
                          " a7 a6 a5 a4  a3 a2 a1 a0",
840
                          "  i  i  i  i   i  i  i  i";
841
 
842
	mode		= 0x04;
843
	delay		= 5;
844
	blocksize	= 128;
845
	readsize	= 256;
846
    ;
847
 
848
    memory "signature"
849
        size            = 3;
850
        read            = "0  0  1  1   0  0  0  0    x x x x  x x x x",
851
                          "0  0  0  0   0  0 a1 a0    o o o o  o o o o";
852
    ;
853
 
854
    memory "lock"
855
        size            = 1;
856
        read            = "0  1  0  1   1  0  0  0    x x x x  x x x x",
857
                          "x  x  x  x   x  x  x  x    x x x x  x o o x";
858
 
859
        write           = "1  0  1  0   1  1  0  0    1 1 1 1  1 i i 1",
860
                          "x  x  x  x   x  x  x  x    x x x x  x x x x";
861
        min_write_delay = 9000;
862
        max_write_delay = 9000;
863
    ;
864
 
865
    memory "calibration"
866
        size            = 1;
867
        read            = "0  0  1  1   1  0  0  0    x x x x  x x x x",
868
                          "0  0  0  0   0  0  0  0    o o o o  o o o o";
869
    ;
870
 
871
    memory "fuse"
872
        size            = 1;
873
        read            = "0  1  0  1   0  0  0  0    x x x x  x x x x",
874
                          "x  x  x  x   x  x  x  x    o o o o  o o o o";
875
 
876
        write           = "1  0  1  0   1  1  0  0    1 0 1 x  x x x x",
877
                          "x  x  x  x   x  x  x  x    i i i i  i i i i";
878
        min_write_delay = 9000;
879
        max_write_delay = 9000;
880
    ;
881
;
882
 
883
#------------------------------------------------------------
884
# ATtiny13
885
#------------------------------------------------------------
886
 
887
part
888
    id                  = "t13";
889
    desc                = "ATtiny13";
890
     has_debugwire = yes;
891
     flash_instr   = 0xB4, 0x0E, 0x1E;
892
     eeprom_instr  = 0xBB, 0xFE, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
893
	             0xBC, 0x0E, 0xB4, 0x0E, 0xBA, 0x0D, 0xBB, 0xBC,
894
	             0x99, 0xE1, 0xBB, 0xAC;
895
    stk500_devcode      = 0x14;
896
    signature           = 0x1e 0x90 0x07;
897
    chip_erase_delay    = 4000;
898
    pgm_enable          = "1 0 1 0  1 1 0 0   0 1 0 1  0 0 1 1",
899
                          "x x x x  x x x x   x x x x  x x x x";
900
 
901
    chip_erase          = "1 0 1 0  1 1 0 0   1 0 0 x  x x x x",
902
                          "x x x x  x x x x   x x x x  x x x x";
903
 
904
    timeout		= 200;
905
    stabdelay		= 100;
906
    cmdexedelay		= 25;
907
    synchloops		= 32;
908
    bytedelay		= 0;
909
    pollindex		= 3;
910
    pollvalue		= 0x53;
911
    predelay		= 1;
912
    postdelay		= 1;
913
    pollmethod		= 1;
914
 
915
    hvsp_controlstack     =
916
	0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
917
        0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
918
        0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
919
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
920
    hventerstabdelay    = 100;
921
    progmodedelay       = 0;
922
    hvspcmdexedelay     = 0;
923
    synchcycles         = 6;
924
    latchcycles         = 1;
925
    togglevtg           = 1;
926
    poweroffdelay       = 25;
927
    resetdelayms        = 0;
928
    resetdelayus        = 90;
929
    hvleavestabdelay    = 100;
930
    resetdelay          = 25;
931
    chiperasepolltimeout = 40;
932
    chiperasetime       = 0;
933
    programfusepolltimeout = 25;
934
    programlockpolltimeout = 25;
935
 
936
    memory "eeprom"
937
        size            = 64;
938
        page_size       = 4;
939
        min_write_delay = 4000;
940
        max_write_delay = 4000;
941
        readback_p1     = 0xff;
942
        readback_p2     = 0xff;
943
        read            = "1  0  1  0   0  0  0  0    0 0 0 x  x x x x",
944
                          "x  x a5 a4  a3 a2 a1 a0    o o o o  o o o o";
945
 
946
        write           = "1  1  0  0   0  0  0  0    0 0 0 x  x x x x",
947
                          "x  x a5 a4  a3 a2 a1 a0    i i i i  i i i i";
948
 
949
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
950
			  "  0   0   0   0      0   0   0   0",
951
			  "  0   0   0   0      0   0  a1  a0",
952
			  "  i   i   i   i      i   i   i   i";
953
 
954
	writepage	= "  1   1   0   0      0   0   1   0",
955
			  "  0   0   x   x      x   x   x   x",
956
			  "  x   x  a5  a4     a3  a2   0   0",
957
			  "  x   x   x   x      x   x   x   x";
958
 
959
	mode		= 0x41;
960
	delay		= 5;
961
	blocksize	= 4;
962
	readsize	= 256;
963
    ;
964
 
965
    memory "flash"
966
        paged           = yes;
967
        size            = 1024;
968
        page_size       = 32;
969
        num_pages       = 32;
970
        min_write_delay = 4500;
971
        max_write_delay = 4500;
972
        readback_p1     = 0xff;
973
        readback_p2     = 0xff;
974
        read_lo         = "  0  0  1  0   0  0  0  0",
975
                          "  0  0  0  0   0  0  0 a8",
976
                          " a7 a6 a5 a4  a3 a2 a1 a0",
977
                          "  o  o  o  o   o  o  o  o";
978
 
979
        read_hi         = "  0  0  1  0   1  0  0  0",
980
                          "  0  0  0  0   0  0  0 a8",
981
                          " a7 a6 a5 a4  a3 a2 a1 a0",
982
                          "  o  o  o  o   o  o  o  o";
983
 
984
        loadpage_lo     = "  0  1  0  0   0  0  0  0",
985
                          "  0  0  0  x   x  x  x  x",
986
                          "  x  x  x  x  a3 a2 a1 a0",
987
                          "  i  i  i  i   i  i  i  i";
988
 
989
        loadpage_hi     = "  0  1  0  0   1  0  0  0",
990
                          "  0  0  0  x   x  x  x  x",
991
                          "  x  x  x  x  a3 a2 a1 a0",
992
                          "  i  i  i  i   i  i  i  i";
993
 
994
        writepage       = "  0  1  0  0   1  1  0  0",
995
                          "  0  0  0  0   0  0  0 a8",
996
                          " a7 a6 a5 a4   x  x  x  x",
997
                          "  x  x  x  x   x  x  x  x";
998
 
999
	mode		= 0x41;
1000
	delay		= 6;
1001
	blocksize	= 32;
1002
	readsize	= 256;
1003
    ;
1004
 
1005
    memory "signature"
1006
        size            = 3;
1007
        read            = "0  0  1  1   0  0  0  0    0 0 0 x  x x x x",
1008
                          "x  x  x  x   x  x a1 a0    o o o o  o o o o";
1009
    ;
1010
 
1011
    memory "lock"
1012
        size            = 1;
1013
        min_write_delay = 4500;
1014
        max_write_delay = 4500;
1015
 
1016
	read            = "0  1  0  1   1  0  0  0    0 0 0 0  0 0 0 0",
1017
                          "x  x  x  x   x  x  x  x    x x o o  o o o o";
1018
 
1019
        write           = "1  0  1  0   1  1  0  0    1 1 1 x  x x x x",
1020
                          "x  x  x  x   x  x  x  x    1 1 i i  i i i i";
1021
    ;
1022
 
1023
    memory "calibration"
1024
        size            = 2;
1025
        read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
1026
                          "0  0  0  0   0  0  0 a0    o o o o  o o o o";
1027
    ;
1028
 
1029
    memory "lfuse"
1030
        size            = 1;
1031
        min_write_delay = 4500;
1032
        max_write_delay = 4500;
1033
 
1034
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
1035
                          "x x x x  x x x x  i i i i  i i i i";
1036
 
1037
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
1038
                          "x x x x  x x x x  o o o o  o o o o";
1039
      ;
1040
 
1041
    memory "hfuse"
1042
        size            = 1;
1043
        min_write_delay = 4500;
1044
        max_write_delay = 4500;
1045
 
1046
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
1047
                          "x x x x  x x x x  i i i i  i i i i";
1048
 
1049
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
1050
                          "x x x x  x x x x  o o o o  o o o o";
1051
      ;
1052
 
1053
;
1054
 
1055
 
1056
#------------------------------------------------------------
1057
# ATtiny15
1058
#------------------------------------------------------------
1059
 
1060
part
1061
    id                  = "t15";
1062
    desc                = "ATtiny15";
1063
    stk500_devcode      = 0x13;
1064
    avr910_devcode      = 0x56;
1065
    signature           = 0x1e 0x90 0x06;
1066
    chip_erase_delay    = 8200;
1067
    pgm_enable          = "1 0 1 0  1 1 0 0   0 1 0 1  0 0 1 1",
1068
                          "x x x x  x x x x   x x x x  x x x x";
1069
 
1070
    chip_erase          = "1 0 1 0  1 1 0 0   1 0 0 x  x x x x",
1071
                          "x x x x  x x x x   x x x x  x x x x";
1072
 
1073
    timeout		= 200;
1074
    stabdelay		= 100;
1075
    cmdexedelay		= 25;
1076
    synchloops		= 32;
1077
    bytedelay		= 0;
1078
    pollindex		= 3;
1079
    pollvalue		= 0x53;
1080
    predelay		= 1;
1081
    postdelay		= 1;
1082
    pollmethod		= 0;
1083
 
1084
    hvsp_controlstack   =
1085
        0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00,
1086
        0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78,
1087
        0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
1088
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
1089
    hventerstabdelay    = 100;
1090
    hvspcmdexedelay     = 5;
1091
    synchcycles         = 6;
1092
    latchcycles         = 16;
1093
    togglevtg           = 1;
1094
    poweroffdelay       = 25;
1095
    resetdelayms        = 0;
1096
    resetdelayus        = 50;
1097
    hvleavestabdelay    = 100;
1098
    resetdelay          = 25;
1099
    chiperasepolltimeout = 40;
1100
    chiperasetime       = 0;
1101
    programfusepolltimeout = 25;
1102
    programlockpolltimeout = 25;
1103
 
1104
    memory "eeprom"
1105
        size            = 64;
1106
        min_write_delay = 8200;
1107
        max_write_delay = 8200;
1108
        readback_p1     = 0xff;
1109
        readback_p2     = 0xff;
1110
        read            = "1  0  1  0   0  0  0  0    x x x x  x x x x",
1111
                          "x  x a5 a4  a3 a2 a1 a0    o o o o  o o o o";
1112
 
1113
        write           = "1  1  0  0   0  0  0  0    x x x x  x x x x",
1114
                          "x  x a5 a4  a3 a2 a1 a0    i i i i  i i i i";
1115
 
1116
	mode		= 0x04;
1117
	delay		= 10;
1118
	blocksize	= 64;
1119
	readsize	= 256;
1120
    ;
1121
 
1122
    memory "flash"
1123
        size            = 1024;
1124
        min_write_delay = 4100;
1125
        max_write_delay = 4100;
1126
        readback_p1     = 0xff;
1127
        readback_p2     = 0xff;
1128
        read_lo         = "  0  0  1  0   0  0  0  0",
1129
                          "  x  x  x  x   x  x  x a8",
1130
                          " a7 a6 a5 a4  a3 a2 a1 a0",
1131
                          "  o  o  o  o   o  o  o  o";
1132
 
1133
        read_hi         = "  0  0  1  0   1  0  0  0",
1134
                          "  x  x  x  x   x  x  x a8",
1135
                          " a7 a6 a5 a4  a3 a2 a1 a0",
1136
                          "  o  o  o  o   o  o  o  o";
1137
 
1138
        write_lo        = "  0  1  0  0   0  0  0  0",
1139
                          "  x  x  x  x   x  x  x a8",
1140
                          " a7 a6 a5 a4  a3 a2 a1 a0",
1141
                          "  i  i  i  i   i  i  i  i";
1142
 
1143
        write_hi        = "  0  1  0  0   1  0  0  0",
1144
                          "  x  x  x  x   x  x  x a8",
1145
                          " a7 a6 a5 a4  a3 a2 a1 a0",
1146
                          "  i  i  i  i   i  i  i  i";
1147
 
1148
	mode		= 0x04;
1149
	delay		= 5;
1150
	blocksize	= 128;
1151
	readsize	= 256;
1152
    ;
1153
 
1154
    memory "signature"
1155
        size            = 3;
1156
        read            = "0  0  1  1   0  0  0  0    x x x x  x x x x",
1157
                          "0  0  0  0   0  0 a1 a0    o o o o  o o o o";
1158
    ;
1159
 
1160
    memory "lock"
1161
        size            = 1;
1162
        read            = "0  1  0  1   1  0  0  0    x x x x  x x x x",
1163
                          "x  x  x  x   x  x  x  x    x x x x  x o o x";
1164
 
1165
        write           = "1  0  1  0   1  1  0  0    1 1 1 1  1 i i 1",
1166
                          "x  x  x  x   x  x  x  x    x x x x  x x x x";
1167
        min_write_delay = 9000;
1168
        max_write_delay = 9000;
1169
    ;
1170
 
1171
    memory "calibration"
1172
        size            = 1;
1173
        read            = "0  0  1  1   1  0  0  0    x x x x  x x x x",
1174
                          "0  0  0  0   0  0  0  0    o o o o  o o o o";
1175
    ;
1176
 
1177
    memory "fuse"
1178
        size            = 1;
1179
        read            = "0  1  0  1   0  0  0  0    x x x x  x x x x",
1180
                          "x  x  x  x   x  x  x  x    o o o o  x x o o";
1181
 
1182
        write           = "1  0  1  0   1  1  0  0    1 0 1 x  x x x x",
1183
                          "x  x  x  x   x  x  x  x    i i i i  1 1 i i";
1184
        min_write_delay = 9000;
1185
        max_write_delay = 9000;
1186
    ;
1187
;
1188
 
1189
#------------------------------------------------------------
1190
# AT90s1200
1191
#------------------------------------------------------------
1192
 
1193
part
1194
    id               = "1200";
1195
    desc             = "AT90S1200";
1196
    stk500_devcode   = 0x33;
1197
    avr910_devcode   = 0x13;
1198
    signature        = 0x1e 0x90 0x01;
1199
    pagel            = 0xd7;
1200
    bs2              = 0xa0;
1201
    chip_erase_delay = 20000;
1202
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
1203
                       "x x x x  x x x x    x x x x  x x x x";
1204
 
1205
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
1206
                       "x x x x  x x x x    x x x x  x x x x";
1207
 
1208
    timeout		= 200;
1209
    stabdelay		= 100;
1210
    cmdexedelay		= 25;
1211
    synchloops		= 1;
1212
    bytedelay		= 0;
1213
    pollindex		= 0;
1214
    pollvalue		= 0xFF;
1215
    predelay		= 1;
1216
    postdelay		= 1;
1217
    pollmethod		= 0;
1218
 
1219
    pp_controlstack     =
1220
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
1221
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
1222
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
1223
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
1224
    hventerstabdelay    = 100;
1225
    progmodedelay       = 0;
1226
    latchcycles         = 0;
1227
    togglevtg           = 0;
1228
    poweroffdelay       = 0;
1229
    resetdelayms        = 0;
1230
    resetdelayus        = 0;
1231
    hvleavestabdelay    = 15;
1232
    chiperasepulsewidth = 15;
1233
    chiperasepolltimeout = 0;
1234
    programfusepulsewidth = 2;
1235
    programfusepolltimeout = 0;
1236
    programlockpulsewidth = 0;
1237
    programlockpolltimeout = 1;
1238
 
1239
    memory "eeprom"
1240
        size            = 64;
1241
        min_write_delay = 4000;
1242
        max_write_delay = 9000;
1243
        readback_p1     = 0x00;
1244
        readback_p2     = 0xff;
1245
        read            = "1 0  1  0   0  0  0  0   x x x x  x x x x",
1246
                          "x x a5 a4  a3 a2 a1 a0   o o o o  o o o o";
1247
 
1248
        write           = "1 1  0  0   0  0  0  0   x x x x  x x x x",
1249
                          "x x a5 a4  a3 a2 a1 a0   i i i i  i i i i";
1250
 
1251
	mode		= 0x04;
1252
	delay		= 20;
1253
	blocksize	= 32;
1254
	readsize	= 256;
1255
      ;
1256
    memory "flash"
1257
        size            = 1024;
1258
        min_write_delay = 4000;
1259
        max_write_delay = 9000;
1260
        readback_p1     = 0xff;
1261
        readback_p2     = 0xff;
1262
        read_lo         = "  0   0   1   0    0   0   0   0",
1263
                          "  x   x   x   x    x   x   x  a8",
1264
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1265
                          "  o   o   o   o    o   o   o   o";
1266
 
1267
        read_hi         = "  0   0   1   0    1   0   0   0",
1268
                          "  x   x   x   x    x   x   x  a8",
1269
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1270
                          "  o   o   o   o    o   o   o   o";
1271
 
1272
        write_lo        = "  0   1   0   0    0   0   0   0",
1273
                          "  x   x   x   x    x   x   x  a8",
1274
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1275
                          "  i   i   i   i    i   i   i   i";
1276
 
1277
        write_hi        = "  0   1   0   0    1   0   0   0",
1278
                          "  x   x   x   x    x   x   x  a8",
1279
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1280
                          "  i   i   i   i    i   i   i   i";
1281
 
1282
	mode		= 0x02;
1283
	delay		= 15;
1284
	blocksize	= 128;
1285
	readsize	= 256;
1286
      ;
1287
    memory "signature"
1288
        size            = 3;
1289
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
1290
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
1291
      ;
1292
    memory "fuse"
1293
        size            = 1;
1294
      ;
1295
    memory "lock"
1296
        size            = 1;
1297
        min_write_delay = 9000;
1298
        max_write_delay = 20000;
1299
        write           = "1 0 1 0  1 1 0 0   1 1 1 1  1 i i 1",
1300
                          "x x x x  x x x x   x x x x  x x x x";
1301
      ;
1302
  ;
1303
 
1304
#------------------------------------------------------------
1305
# AT90s4414
1306
#------------------------------------------------------------
1307
 
1308
part
1309
    id               = "4414";
1310
    desc             = "AT90S4414";
1311
    stk500_devcode   = 0x50;
1312
    avr910_devcode   = 0x28;
1313
    signature        = 0x1e 0x92 0x01;
1314
    chip_erase_delay = 20000;
1315
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
1316
                       "x x x x  x x x x    x x x x  x x x x";
1317
 
1318
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
1319
                       "x x x x  x x x x    x x x x  x x x x";
1320
 
1321
    timeout		= 200;
1322
    stabdelay		= 100;
1323
    cmdexedelay		= 25;
1324
    synchloops		= 32;
1325
    bytedelay		= 0;
1326
    pollindex		= 3;
1327
    pollvalue		= 0x53;
1328
    predelay		= 1;
1329
    postdelay		= 1;
1330
    pollmethod		= 0;
1331
 
1332
    pp_controlstack     =
1333
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
1334
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
1335
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
1336
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01;
1337
    hventerstabdelay    = 100;
1338
    progmodedelay       = 0;
1339
    latchcycles         = 0;
1340
    togglevtg           = 0;
1341
    poweroffdelay       = 0;
1342
    resetdelayms        = 0;
1343
    resetdelayus        = 0;
1344
    hvleavestabdelay    = 15;
1345
    chiperasepulsewidth = 15;
1346
    chiperasepolltimeout = 0;
1347
    programfusepulsewidth = 2;
1348
    programfusepolltimeout = 0;
1349
    programlockpulsewidth = 0;
1350
    programlockpolltimeout = 1;
1351
 
1352
    memory "eeprom"
1353
        size            = 256;
1354
        min_write_delay = 9000;
1355
        max_write_delay = 20000;
1356
        readback_p1     = 0x80;
1357
        readback_p2     = 0x7f;
1358
        read            = " 1  0  1  0   0  0  0  0  x x x x  x x x a8",
1359
                          "a7 a6 a5 a4 a3 a2 a1 a0   o o o o  o o o o";
1360
 
1361
        write           = " 1  1  0  0   0  0  0  0   x x x x  x x x a8",
1362
                          "a7 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
1363
 
1364
	mode		= 0x04;
1365
	delay		= 12;
1366
	blocksize	= 64;
1367
	readsize	= 256;
1368
      ;
1369
    memory "flash"
1370
        size            = 4096;
1371
        min_write_delay = 9000;
1372
        max_write_delay = 20000;
1373
        readback_p1     = 0x7f;
1374
        readback_p2     = 0x7f;
1375
        read_lo         = "  0   0   1   0    0   0   0   0",
1376
                          "  x   x   x   x  a11 a10  a9  a8",
1377
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1378
                          "  o   o   o   o    o   o   o   o";
1379
 
1380
        read_hi         = "  0   0   1   0    1   0   0   0",
1381
                          "  x   x   x   x  a11 a10  a9  a8",
1382
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1383
                          "  o   o   o   o    o   o   o   o";
1384
 
1385
        write_lo        = "  0   1   0   0    0   0   0   0",
1386
                          "  x   x   x   x  a11 a10  a9  a8",
1387
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1388
                          "  i   i   i   i    i   i   i   i";
1389
 
1390
        write_hi        = "  0   1   0   0    1   0   0   0",
1391
                          "  x   x   x   x  a11 a10  a9  a8",
1392
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1393
                          "  i   i   i   i    i   i   i   i";
1394
 
1395
	mode		= 0x04;
1396
	delay		= 12;
1397
	blocksize	= 64;
1398
	readsize	= 256;
1399
      ;
1400
    memory "signature"
1401
        size            = 3;
1402
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
1403
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
1404
      ;
1405
    memory "fuse"
1406
	size		= 1;
1407
      ;
1408
    memory "lock"
1409
	size		= 1;
1410
	write		= "1  0  1  0   1  1  0  0   1  1  1  1   1  i  i  1",
1411
			  "x  x  x  x   x  x  x  x   x  x  x  x   x  x  x  x";
1412
        min_write_delay = 9000;
1413
        max_write_delay = 9000;
1414
      ;
1415
  ;
1416
 
1417
#------------------------------------------------------------
1418
# AT90s2313
1419
#------------------------------------------------------------
1420
 
1421
part
1422
    id               = "2313";
1423
    desc             = "AT90S2313";
1424
    stk500_devcode   = 0x40;
1425
    avr910_devcode   = 0x20;
1426
    signature        = 0x1e 0x91 0x01;
1427
    chip_erase_delay = 20000;
1428
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
1429
                       "x x x x  x x x x    x x x x  x x x x";
1430
 
1431
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
1432
                       "x x x x  x x x x    x x x x  x x x x";
1433
 
1434
    timeout		= 200;
1435
    stabdelay		= 100;
1436
    cmdexedelay		= 25;
1437
    synchloops		= 32;
1438
    bytedelay		= 0;
1439
    pollindex		= 3;
1440
    pollvalue		= 0x53;
1441
    predelay		= 1;
1442
    postdelay		= 1;
1443
    pollmethod		= 0;
1444
 
1445
    pp_controlstack     =
1446
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
1447
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
1448
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
1449
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
1450
    hventerstabdelay    = 100;
1451
    progmodedelay       = 0;
1452
    latchcycles         = 0;
1453
    togglevtg           = 0;
1454
    poweroffdelay       = 0;
1455
    resetdelayms        = 0;
1456
    resetdelayus        = 0;
1457
    hvleavestabdelay    = 15;
1458
    chiperasepulsewidth = 15;
1459
    chiperasepolltimeout = 0;
1460
    programfusepulsewidth = 2;
1461
    programfusepolltimeout = 0;
1462
    programlockpulsewidth = 0;
1463
    programlockpolltimeout = 1;
1464
 
1465
    memory "eeprom"
1466
        size            = 128;
1467
        min_write_delay = 4000;
1468
        max_write_delay = 9000;
1469
        readback_p1     = 0x80;
1470
        readback_p2     = 0x7f;
1471
        read            = "1  0  1  0   0  0  0  0   x x x x  x x x x",
1472
                          "x a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
1473
 
1474
        write           = "1  1  0  0   0  0  0  0   x x x x  x x x x",
1475
                          "x a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
1476
 
1477
	mode		= 0x04;
1478
	delay		= 12;
1479
	blocksize	= 64;
1480
	readsize	= 256;
1481
      ;
1482
    memory "flash"
1483
        size            = 2048;
1484
        min_write_delay = 4000;
1485
        max_write_delay = 9000;
1486
        readback_p1     = 0x7f;
1487
        readback_p2     = 0x7f;
1488
        read_lo         = "  0   0   1   0    0   0   0   0",
1489
                          "  x   x   x   x    x   x  a9  a8",
1490
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1491
                          "  o   o   o   o    o   o   o   o";
1492
 
1493
        read_hi         = "  0   0   1   0    1   0   0   0",
1494
                          "  x   x   x   x    x   x  a9  a8",
1495
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1496
                          "  o   o   o   o    o   o   o   o";
1497
 
1498
        write_lo        = "  0   1   0   0    0   0   0   0",
1499
                          "  x   x   x   x    x   x  a9  a8",
1500
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1501
                          "  i   i   i   i    i   i   i   i";
1502
 
1503
        write_hi        = "  0   1   0   0    1   0   0   0",
1504
                          "  x   x   x   x    x   x  a9  a8",
1505
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1506
                          "  i   i   i   i    i   i   i   i";
1507
 
1508
	mode		= 0x04;
1509
	delay		= 12;
1510
	blocksize	= 128;
1511
	readsize	= 256;
1512
      ;
1513
    memory "signature"
1514
        size            = 3;
1515
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
1516
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
1517
      ;
1518
    memory "fuse"
1519
        size            = 1;
1520
      ;
1521
    memory "lock"
1522
        size            = 1;
1523
        write           = "1 0 1 0  1 1 0 0  1 1 1 x  x i i x",
1524
                          "x x x x  x x x x  x x x x  x x x x";
1525
        min_write_delay = 9000;
1526
        max_write_delay = 9000;
1527
      ;
1528
  ;
1529
 
1530
#------------------------------------------------------------
1531
# AT90s2333
1532
#------------------------------------------------------------
1533
 
1534
part
1535
    id               = "2333";
1536
##### WARNING: No XML file for device 'AT90S2333'! #####
1537
    desc             = "AT90S2333";
1538
    stk500_devcode   = 0x42;
1539
    avr910_devcode   = 0x34;
1540
    signature        = 0x1e 0x91 0x05;
1541
    chip_erase_delay = 20000;
1542
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
1543
                       "x x x x  x x x x    x x x x  x x x x";
1544
 
1545
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
1546
                       "x x x x  x x x x    x x x x  x x x x";
1547
 
1548
    timeout		= 200;
1549
    stabdelay		= 100;
1550
    cmdexedelay		= 25;
1551
    synchloops		= 32;
1552
    bytedelay		= 0;
1553
    pollindex		= 3;
1554
    pollvalue		= 0x53;
1555
    predelay		= 1;
1556
    postdelay		= 1;
1557
    pollmethod		= 0;
1558
 
1559
    pp_controlstack     =
1560
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
1561
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
1562
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
1563
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
1564
    hventerstabdelay    = 100;
1565
    progmodedelay       = 0;
1566
    latchcycles         = 0;
1567
    togglevtg           = 0;
1568
    poweroffdelay       = 0;
1569
    resetdelayms        = 0;
1570
    resetdelayus        = 0;
1571
    hvleavestabdelay    = 15;
1572
    chiperasepulsewidth = 15;
1573
    chiperasepolltimeout = 0;
1574
    programfusepulsewidth = 2;
1575
    programfusepolltimeout = 0;
1576
    programlockpulsewidth = 0;
1577
    programlockpolltimeout = 1;
1578
 
1579
    memory "eeprom"
1580
        size            = 128;
1581
        min_write_delay = 9000;
1582
        max_write_delay = 20000;
1583
        readback_p1     = 0x00;
1584
        readback_p2     = 0xff;
1585
        read            = "1  0  1  0   0  0  0  0   x x x x  x x x x",
1586
                          "x a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
1587
 
1588
        write           = "1  1  0  0   0  0  0  0   x x x x  x x x x",
1589
                          "x a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
1590
 
1591
	mode		= 0x04;
1592
	delay		= 12;
1593
	blocksize	= 128;
1594
	readsize	= 256;
1595
      ;
1596
 
1597
    memory "flash"
1598
        size            = 2048;
1599
        min_write_delay = 9000;
1600
        max_write_delay = 20000;
1601
        readback_p1     = 0xff;
1602
        readback_p2     = 0xff;
1603
        read_lo         = "  0   0   1   0    0   0   0   0",
1604
                          "  x   x   x   x    x   x  a9  a8",
1605
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1606
                          "  o   o   o   o    o   o   o   o";
1607
 
1608
        read_hi         = "  0   0   1   0    1   0   0   0",
1609
                          "  x   x   x   x    x   x  a9  a8",
1610
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1611
                          "  o   o   o   o    o   o   o   o";
1612
 
1613
        write_lo        = "  0   1   0   0    0   0   0   0",
1614
                          "  x   x   x   x    x   x  a9  a8",
1615
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1616
                          "  i   i   i   i    i   i   i   i";
1617
 
1618
        write_hi        = "  0   1   0   0    1   0   0   0",
1619
                          "  x   x   x   x    x   x  a9  a8",
1620
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1621
                          "  i   i   i   i    i   i   i   i";
1622
 
1623
	mode		= 0x04;
1624
	delay		= 12;
1625
	blocksize	= 128;
1626
	readsize	= 256;
1627
      ;
1628
 
1629
    memory "signature"
1630
        size            = 3;
1631
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
1632
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
1633
      ;
1634
    memory "fuse"
1635
        size            = 1;
1636
        min_write_delay = 9000;
1637
        max_write_delay = 20000;
1638
        pwroff_after_write = yes;
1639
        read            = "0 1 0 1  0 0 0 0   x x x x  x x x x",
1640
                          "x x x x  x x x x   x x o o  o o o o";
1641
 
1642
        write           = "1 0 1 0  1 1 0 0   1 0 1 i  i i i i",
1643
                          "x x x x  x x x x   x x x x  x x x x";
1644
      ;
1645
    memory "lock"
1646
        size            = 1;
1647
        min_write_delay = 9000;
1648
        max_write_delay = 20000;
1649
        read            = "0 1 0 1  1 0 0 0   x x x x  x x x x",
1650
                          "x x x x  x x x x   x x x x  x o o x";
1651
 
1652
        write           = "1 0 1 0  1 1 0 0   1 1 1 1  1 i i 1",
1653
                          "x x x x  x x x x   x x x x  x x x x";
1654
      ;
1655
  ;
1656
 
1657
 
1658
#------------------------------------------------------------
1659
# AT90s2343 (also AT90s2323 and ATtiny22)
1660
#------------------------------------------------------------
1661
 
1662
part
1663
    id               = "2343";
1664
    desc             = "AT90S2343";
1665
    stk500_devcode   = 0x43;
1666
    avr910_devcode   = 0x4c;
1667
    signature        = 0x1e 0x91 0x03;
1668
    chip_erase_delay = 18000;
1669
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
1670
                       "x x x x  x x x x    x x x x  x x x x";
1671
 
1672
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
1673
                       "x x x x  x x x x    x x x x  x x x x";
1674
 
1675
    timeout		= 200;
1676
    stabdelay		= 100;
1677
    cmdexedelay		= 25;
1678
    synchloops		= 32;
1679
    bytedelay		= 0;
1680
    pollindex		= 3;
1681
    pollvalue		= 0x53;
1682
    predelay		= 1;
1683
    postdelay		= 1;
1684
    pollmethod		= 0;
1685
 
1686
    hvsp_controlstack   =
1687
        0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00,
1688
        0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78,
1689
        0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
1690
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
1691
    hventerstabdelay    = 100;
1692
    hvspcmdexedelay     = 0;
1693
    synchcycles         = 6;
1694
    latchcycles         = 1;
1695
    togglevtg           = 0;
1696
    poweroffdelay       = 25;
1697
    resetdelayms        = 0;
1698
    resetdelayus        = 50;
1699
    hvleavestabdelay    = 100;
1700
    resetdelay          = 25;
1701
    chiperasepolltimeout = 40;
1702
    chiperasetime       = 0;
1703
    programfusepolltimeout = 25;
1704
    programlockpolltimeout = 25;
1705
 
1706
    memory "eeprom"
1707
        size            = 128;
1708
        min_write_delay = 9000;
1709
        max_write_delay = 20000;
1710
        readback_p1     = 0x00;
1711
        readback_p2     = 0xff;
1712
        read            = "1  0  1  0   0  0  0  0   0 0 0 0  0 0 0 0",
1713
                          "x a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
1714
 
1715
        write           = "1  1  0  0   0  0  0  0   0 0 0 0  0 0 0 0",
1716
                          "x a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
1717
 
1718
	mode		= 0x04;
1719
	delay		= 12;
1720
	blocksize	= 64;
1721
	readsize	= 256;
1722
      ;
1723
    memory "flash"
1724
        size            = 2048;
1725
        min_write_delay = 9000;
1726
        max_write_delay = 20000;
1727
        readback_p1     = 0xff;
1728
        readback_p2     = 0xff;
1729
        read_lo         = "  0   0   1   0    0   0   0   0",
1730
                          "  x   x   x   x    x   x  a9  a8",
1731
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1732
                          "  o   o   o   o    o   o   o   o";
1733
 
1734
        read_hi         = "  0   0   1   0    1   0   0   0",
1735
                          "  x   x   x   x    x   x  a9  a8",
1736
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1737
                          "  o   o   o   o    o   o   o   o";
1738
 
1739
        write_lo        = "  0   1   0   0    0   0   0   0",
1740
                          "  x   x   x   x    x   x  a9  a8",
1741
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1742
                          "  i   i   i   i    i   i   i   i";
1743
 
1744
        write_hi        = "  0   1   0   0    1   0   0   0",
1745
                          "  x   x   x   x    x   x  a9  a8",
1746
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1747
                          "  i   i   i   i    i   i   i   i";
1748
 
1749
	mode		= 0x04;
1750
	delay		= 12;
1751
	blocksize	= 128;
1752
	readsize	= 128;
1753
      ;
1754
    memory "signature"
1755
        size            = 3;
1756
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
1757
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
1758
      ;
1759
    memory "fuse"
1760
        size            = 1;
1761
        min_write_delay = 9000;
1762
        max_write_delay = 20000;
1763
        read            = "0 1 0 1  1 0 0 0   x x x x  x x x x",
1764
                          "x x x x  x x x x   o o o x  x x x o";
1765
 
1766
        write           = "1 0 1 0  1 1 0 0   1 0 1 1  1 1 1 i",
1767
                          "x x x x  x x x x   x x x x  x x x x";
1768
      ;
1769
    memory "lock"
1770
        size            = 1;
1771
        min_write_delay = 9000;
1772
        max_write_delay = 20000;
1773
        read            = "0 1 0 1  1 0 0 0   x x x x  x x x x",
1774
                          "x x x x  x x x x   o o o x  x x x o";
1775
 
1776
        write           = "1 0 1 0  1 1 0 0   1 1 1 1  1 i i 1",
1777
                          "x x x x  x x x x   x x x x  x x x x";
1778
      ;
1779
  ;
1780
 
1781
 
1782
#------------------------------------------------------------
1783
# AT90s4433
1784
#------------------------------------------------------------
1785
 
1786
part
1787
    id               = "4433";
1788
    desc             = "AT90S4433";
1789
    stk500_devcode   = 0x51;
1790
    avr910_devcode   = 0x30;
1791
    signature        = 0x1e 0x92 0x03;
1792
    chip_erase_delay = 20000;
1793
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
1794
                       "x x x x  x x x x    x x x x  x x x x";
1795
 
1796
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
1797
                       "x x x x  x x x x    x x x x  x x x x";
1798
 
1799
    timeout		= 200;
1800
    stabdelay		= 100;
1801
    cmdexedelay		= 25;
1802
    synchloops		= 32;
1803
    bytedelay		= 0;
1804
    pollindex		= 3;
1805
    pollvalue		= 0x53;
1806
    predelay		= 1;
1807
    postdelay		= 1;
1808
    pollmethod		= 0;
1809
 
1810
    pp_controlstack     =
1811
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
1812
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
1813
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
1814
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
1815
    hventerstabdelay    = 100;
1816
    progmodedelay       = 0;
1817
    latchcycles         = 0;
1818
    togglevtg           = 0;
1819
    poweroffdelay       = 0;
1820
    resetdelayms        = 0;
1821
    resetdelayus        = 0;
1822
    hvleavestabdelay    = 15;
1823
    chiperasepulsewidth = 15;
1824
    chiperasepolltimeout = 0;
1825
    programfusepulsewidth = 2;
1826
    programfusepolltimeout = 0;
1827
    programlockpulsewidth = 0;
1828
    programlockpolltimeout = 1;
1829
 
1830
    memory "eeprom"
1831
        size            = 256;
1832
        min_write_delay = 9000;
1833
        max_write_delay = 20000;
1834
        readback_p1     = 0x00;
1835
        readback_p2     = 0xff;
1836
        read            = " 1  0  1  0   0  0  0  0   x x x x  x x x x",
1837
                          "a7 a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
1838
 
1839
        write           = " 1  1  0  0   0  0  0  0   x x x x  x x x x",
1840
                          "a7 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
1841
 
1842
	mode		= 0x04;
1843
	delay		= 12;
1844
	blocksize	= 128;
1845
	readsize	= 256;
1846
      ;
1847
    memory "flash"
1848
        size            = 4096;
1849
        min_write_delay = 9000;
1850
        max_write_delay = 20000;
1851
        readback_p1     = 0xff;
1852
        readback_p2     = 0xff;
1853
        read_lo         = "  0   0   1   0    0   0   0   0",
1854
                          "  x   x   x   x    x a10  a9  a8",
1855
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1856
                          "  o   o   o   o    o   o   o   o";
1857
 
1858
        read_hi         = "  0   0   1   0    1   0   0   0",
1859
                          "  x   x   x   x    x a10  a9  a8",
1860
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1861
                          "  o   o   o   o    o   o   o   o";
1862
 
1863
        write_lo        = "  0   1   0   0    0   0   0   0",
1864
                          "  x   x   x   x    x a10  a9  a8",
1865
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1866
                          "  i   i   i   i    i   i   i   i";
1867
 
1868
        write_hi        = "  0   1   0   0    1   0   0   0",
1869
                          "  x   x   x   x    x a10  a9  a8",
1870
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1871
                          "  i   i   i   i    i   i   i   i";
1872
 
1873
	mode		= 0x04;
1874
	delay		= 12;
1875
	blocksize	= 128;
1876
	readsize	= 256;
1877
      ;
1878
    memory "signature"
1879
        size            = 3;
1880
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
1881
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
1882
      ;
1883
    memory "fuse"
1884
        size            = 1;
1885
        min_write_delay = 9000;
1886
        max_write_delay = 20000;
1887
        pwroff_after_write = yes;
1888
        read            = "0 1 0 1  0 0 0 0   x x x x  x x x x",
1889
                          "x x x x  x x x x   x x o o  o o o o";
1890
 
1891
        write           = "1 0 1 0  1 1 0 0   1 0 1 i  i i i i",
1892
                          "x x x x  x x x x   x x x x  x x x x";
1893
      ;
1894
    memory "lock"
1895
        size            = 1;
1896
        min_write_delay = 9000;
1897
        max_write_delay = 20000;
1898
        read            = "0 1 0 1  1 0 0 0   x x x x  x x x x",
1899
                          "x x x x  x x x x   x x x x  x o o x";
1900
 
1901
        write           = "1 0 1 0  1 1 0 0   1 1 1 1  1 i i 1",
1902
                          "x x x x  x x x x   x x x x  x x x x";
1903
      ;
1904
  ;
1905
 
1906
#------------------------------------------------------------
1907
# AT90s4434
1908
#------------------------------------------------------------
1909
 
1910
part
1911
    id               = "4434";
1912
##### WARNING: No XML file for device 'AT90S4434'! #####
1913
    desc             = "AT90S4434";
1914
    stk500_devcode   = 0x52;
1915
    avr910_devcode   = 0x6c;
1916
    signature        = 0x1e 0x92 0x02;
1917
    chip_erase_delay = 20000;
1918
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
1919
                       "x x x x  x x x x    x x x x  x x x x";
1920
 
1921
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
1922
                       "x x x x  x x x x    x x x x  x x x x";
1923
 
1924
    memory "eeprom"
1925
        size            = 256;
1926
        min_write_delay = 9000;
1927
        max_write_delay = 20000;
1928
        readback_p1     = 0x00;
1929
        readback_p2     = 0xff;
1930
        read            = " 1  0  1  0   0  0  0  0   x x x x  x x x x",
1931
                          "a7 a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
1932
 
1933
        write           = " 1  1  0  0   0  0  0  0   x x x x  x x x x",
1934
                          "a7 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
1935
      ;
1936
    memory "flash"
1937
        size            = 4096;
1938
        min_write_delay = 9000;
1939
        max_write_delay = 20000;
1940
        readback_p1     = 0xff;
1941
        readback_p2     = 0xff;
1942
        read_lo         = "  0   0   1   0    0   0   0   0",
1943
                          "  x   x   x   x    x a10  a9  a8",
1944
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1945
                          "  o   o   o   o    o   o   o   o";
1946
 
1947
        read_hi         = "  0   0   1   0    1   0   0   0",
1948
                          "  x   x   x   x    x a10  a9  a8",
1949
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1950
                          "  o   o   o   o    o   o   o   o";
1951
 
1952
        write_lo        = "  0   1   0   0    0   0   0   0",
1953
                          "  x   x   x   x    x a10  a9  a8",
1954
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1955
                          "  i   i   i   i    i   i   i   i";
1956
 
1957
        write_hi        = "  0   1   0   0    1   0   0   0",
1958
                          "  x   x   x   x    x a10  a9  a8",
1959
                          " a7  a6  a5  a4   a3  a2  a1  a0",
1960
                          "  i   i   i   i    i   i   i   i";
1961
      ;
1962
    memory "signature"
1963
        size            = 3;
1964
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
1965
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
1966
      ;
1967
    memory "fuse"
1968
        size            = 1;
1969
        min_write_delay = 9000;
1970
        max_write_delay = 20000;
1971
        read            = "0 1 0 1  0 0 0 0   x x x x  x x x x",
1972
                          "x x x x  x x x x   x x o o  o o o o";
1973
 
1974
        write           = "1 0 1 0  1 1 0 0   1 0 1 i  i i i i",
1975
                          "x x x x  x x x x   x x x x  x x x x";
1976
      ;
1977
    memory "lock"
1978
        size            = 1;
1979
        min_write_delay = 9000;
1980
        max_write_delay = 20000;
1981
        read            = "0 1 0 1  1 0 0 0   x x x x  x x x x",
1982
                          "x x x x  x x x x   x x x x  x o o x";
1983
 
1984
        write           = "1 0 1 0  1 1 0 0   1 1 1 1  1 i i 1",
1985
                          "x x x x  x x x x   x x x x  x x x x";
1986
      ;
1987
  ;
1988
 
1989
#------------------------------------------------------------
1990
# AT90s8515
1991
#------------------------------------------------------------
1992
 
1993
part
1994
    id               = "8515";
1995
    desc             = "AT90S8515";
1996
    stk500_devcode   = 0x60;
1997
    avr910_devcode   = 0x38;
1998
    signature        = 0x1e 0x93 0x01;
1999
    chip_erase_delay = 20000;
2000
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
2001
                       "x x x x  x x x x    x x x x  x x x x";
2002
 
2003
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
2004
                       "x x x x  x x x x    x x x x  x x x x";
2005
 
2006
    timeout		= 200;
2007
    stabdelay		= 100;
2008
    cmdexedelay		= 25;
2009
    synchloops		= 32;
2010
    bytedelay		= 0;
2011
    pollindex		= 3;
2012
    pollvalue		= 0x53;
2013
    predelay		= 1;
2014
    postdelay		= 1;
2015
    pollmethod		= 0;
2016
 
2017
    pp_controlstack     =
2018
	0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
2019
	0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
2020
	0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
2021
	0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
2022
    hventerstabdelay    = 100;
2023
    progmodedelay       = 0;
2024
    latchcycles         = 0;
2025
    togglevtg           = 0;
2026
    poweroffdelay       = 0;
2027
    resetdelayms        = 0;
2028
    resetdelayus        = 0;
2029
    hvleavestabdelay    = 15;
2030
    resetdelay          = 15;
2031
    chiperasepulsewidth = 15;
2032
    chiperasepolltimeout = 0;
2033
    programfusepulsewidth = 2;
2034
    programfusepolltimeout = 0;
2035
    programlockpulsewidth = 0;
2036
    programlockpolltimeout = 1;
2037
 
2038
    memory "eeprom"
2039
        size            = 512;
2040
        min_write_delay = 4000;
2041
        max_write_delay = 9000;
2042
        readback_p1     = 0x80;
2043
        readback_p2     = 0x7f;
2044
        read            = " 1  0  1  0   0  0  0  0  x x x x  x x x a8",
2045
                          "a7 a6 a5 a4 a3 a2 a1 a0   o o o o  o o o o";
2046
 
2047
        write           = " 1  1  0  0   0  0  0  0   x x x x  x x x a8",
2048
                          "a7 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
2049
 
2050
	mode		= 0x04;
2051
	delay		= 12;
2052
	blocksize	= 128;
2053
	readsize	= 256;
2054
      ;
2055
    memory "flash"
2056
        size            = 8192;
2057
        min_write_delay = 4000;
2058
        max_write_delay = 9000;
2059
        readback_p1     = 0x7f;
2060
        readback_p2     = 0x7f;
2061
        read_lo         = "  0   0   1   0    0   0   0   0",
2062
                          "  x   x   x   x  a11 a10  a9  a8",
2063
                          " a7  a6  a5  a4   a3  a2  a1  a0",
2064
                          "  o   o   o   o    o   o   o   o";
2065
 
2066
        read_hi         = "  0   0   1   0    1   0   0   0",
2067
                          "  x   x   x   x  a11 a10  a9  a8",
2068
                          " a7  a6  a5  a4   a3  a2  a1  a0",
2069
                          "  o   o   o   o    o   o   o   o";
2070
 
2071
        write_lo        = "  0   1   0   0    0   0   0   0",
2072
                          "  x   x   x   x  a11 a10  a9  a8",
2073
                          " a7  a6  a5  a4   a3  a2  a1  a0",
2074
                          "  i   i   i   i    i   i   i   i";
2075
 
2076
        write_hi        = "  0   1   0   0    1   0   0   0",
2077
                          "  x   x   x   x  a11 a10  a9  a8",
2078
                          " a7  a6  a5  a4   a3  a2  a1  a0",
2079
                          "  i   i   i   i    i   i   i   i";
2080
 
2081
	mode		= 0x04;
2082
	delay		= 12;
2083
	blocksize	= 128;
2084
	readsize	= 256;
2085
      ;
2086
    memory "signature"
2087
        size            = 3;
2088
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
2089
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
2090
      ;
2091
    memory "fuse"
2092
	size		= 1;
2093
      ;
2094
    memory "lock"
2095
	size		= 1;
2096
	write		= "1  0  1  0   1  1  0  0   1  1  1  1   1  i  i  1",
2097
			  "x  x  x  x   x  x  x  x   x  x  x  x   x  x  x  x";
2098
        min_write_delay = 9000;
2099
        max_write_delay = 9000;
2100
      ;
2101
  ;
2102
 
2103
#------------------------------------------------------------
2104
# AT90s8535
2105
#------------------------------------------------------------
2106
 
2107
part
2108
    id               = "8535";
2109
    desc             = "AT90S8535";
2110
    stk500_devcode   = 0x61;
2111
    avr910_devcode   = 0x68;
2112
    signature        = 0x1e 0x93 0x03;
2113
    chip_erase_delay = 20000;
2114
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
2115
                       "x x x x  x x x x    x x x x  x x x x";
2116
 
2117
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
2118
                       "x x x x  x x x x    x x x x  x x x x";
2119
 
2120
    timeout		= 200;
2121
    stabdelay		= 100;
2122
    cmdexedelay		= 25;
2123
    synchloops		= 32;
2124
    bytedelay		= 0;
2125
    pollindex		= 3;
2126
    pollvalue		= 0x53;
2127
    predelay		= 1;
2128
    postdelay		= 1;
2129
    pollmethod		= 0;
2130
 
2131
    pp_controlstack     =
2132
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
2133
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
2134
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
2135
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
2136
    hventerstabdelay    = 100;
2137
    progmodedelay       = 0;
2138
    latchcycles         = 0;
2139
    togglevtg           = 0;
2140
    poweroffdelay       = 0;
2141
    resetdelayms        = 0;
2142
    resetdelayus        = 0;
2143
    hvleavestabdelay    = 15;
2144
    chiperasepulsewidth = 15;
2145
    chiperasepolltimeout = 0;
2146
    programfusepulsewidth = 2;
2147
    programfusepolltimeout = 0;
2148
    programlockpulsewidth = 0;
2149
    programlockpolltimeout = 1;
2150
 
2151
    memory "eeprom"
2152
        size            = 512;
2153
        min_write_delay = 9000;
2154
        max_write_delay = 20000;
2155
        readback_p1     = 0x00;
2156
        readback_p2     = 0xff;
2157
        read            = " 1  0  1  0   0  0  0  0   x x x x  x x x a8",
2158
                          "a7 a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
2159
 
2160
        write           = " 1  1  0  0   0  0  0  0   x x x x  x x x a8",
2161
                          "a7 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
2162
 
2163
	mode		= 0x04;
2164
	delay		= 12;
2165
	blocksize	= 128;
2166
	readsize	= 256;
2167
      ;
2168
    memory "flash"
2169
        size            = 8192;
2170
        min_write_delay = 9000;
2171
        max_write_delay = 20000;
2172
        readback_p1     = 0xff;
2173
        readback_p2     = 0xff;
2174
        read_lo         = "  0   0   1   0    0   0   0   0",
2175
                          "  x   x   x   x  a11 a10  a9  a8",
2176
                          " a7  a6  a5  a4   a3  a2  a1  a0",
2177
                          "  o   o   o   o    o   o   o   o";
2178
 
2179
        read_hi         = "  0   0   1   0    1   0   0   0",
2180
                          "  x   x   x   x  a11 a10  a9  a8",
2181
                          " a7  a6  a5  a4   a3  a2  a1  a0",
2182
                          "  o   o   o   o    o   o   o   o";
2183
 
2184
        write_lo        = "  0   1   0   0    0   0   0   0",
2185
                          "  x   x   x   x  a11 a10  a9  a8",
2186
                          " a7  a6  a5  a4   a3  a2  a1  a0",
2187
                          "  i   i   i   i    i   i   i   i";
2188
 
2189
        write_hi        = "  0   1   0   0    1   0   0   0",
2190
                          "  x   x   x   x  a11 a10  a9  a8",
2191
                          " a7  a6  a5  a4   a3  a2  a1  a0",
2192
                          "  i   i   i   i    i   i   i   i";
2193
 
2194
	mode		= 0x04;
2195
	delay		= 12;
2196
	blocksize	= 128;
2197
	readsize	= 256;
2198
      ;
2199
    memory "signature"
2200
        size            = 3;
2201
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
2202
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
2203
      ;
2204
    memory "fuse"
2205
	size		= 1;
2206
	read		= "0  1  0  1   1  0  0  0   x  x  x  x   x  x  x  x",
2207
			  "x  x  x  x   x  x  x  x   x  x  x  x   x  x  x  o";
2208
	write		= "1  0  1  0   1  1  0  0   1  0  1  1   1  1  1  i",
2209
			  "x  x  x  x   x  x  x  x   x  x  x  x   x  x  x  x";
2210
        min_write_delay = 9000;
2211
        max_write_delay = 9000;
2212
      ;
2213
    memory "lock"
2214
	size		= 1;
2215
	read		= "0  1  0  1   1  0  0  0   x  x  x  x   x  x  x  x",
2216
			  "x  x  x  x   x  x  x  x   o  o  x  x   x  x  x  x";
2217
	write		= "1  0  1  0   1  1  0  0   1  1  1  1   1  i  i  1",
2218
			  "x  x  x  x   x  x  x  x   x  x  x  x   x  x  x  x";
2219
        min_write_delay = 9000;
2220
        max_write_delay = 9000;
2221
      ;
2222
  ;
2223
 
2224
#------------------------------------------------------------
2225
# ATmega103
2226
#------------------------------------------------------------
2227
 
2228
part
2229
    id               = "m103";
2230
    desc             = "ATMEGA103";
2231
    stk500_devcode   = 0xB1;
2232
    avr910_devcode   = 0x41;
2233
    signature        = 0x1e 0x97 0x01;
2234
    chip_erase_delay = 112000;
2235
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
2236
                       "x x x x  x x x x    x x x x  x x x x";
2237
 
2238
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
2239
                       "x x x x  x x x x    x x x x  x x x x";
2240
 
2241
    timeout		= 200;
2242
    stabdelay		= 100;
2243
    cmdexedelay		= 25;
2244
    synchloops		= 32;
2245
    bytedelay		= 0;
2246
    pollindex		= 3;
2247
    pollvalue		= 0x53;
2248
    predelay		= 1;
2249
    postdelay		= 1;
2250
    pollmethod		= 0;
2251
 
2252
    pp_controlstack     =
2253
        0x0E, 0x1E, 0x8E, 0x9E, 0x2E, 0x3E, 0xAE, 0xBE,
2254
        0x4E, 0x5E, 0xCE, 0xDE, 0x6E, 0x7E, 0xEE, 0xDE,
2255
        0x66, 0x76, 0xE6, 0xF6, 0x6A, 0x7A, 0xEA, 0x7A,
2256
        0x7F, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
2257
    hventerstabdelay    = 100;
2258
    progmodedelay       = 0;
2259
    latchcycles         = 0;
2260
    togglevtg           = 0;
2261
    poweroffdelay       = 0;
2262
    resetdelayms        = 0;
2263
    resetdelayus        = 0;
2264
    hvleavestabdelay    = 15;
2265
    chiperasepulsewidth = 15;
2266
    chiperasepolltimeout = 0;
2267
    programfusepulsewidth = 2;
2268
    programfusepolltimeout = 0;
2269
    programlockpulsewidth = 0;
2270
    programlockpolltimeout = 10;
2271
 
2272
    memory "eeprom"
2273
        size            = 4096;
2274
        min_write_delay = 4000;
2275
        max_write_delay = 9000;
2276
        readback_p1     = 0x80;
2277
        readback_p2     = 0x7f;
2278
	read            = "  1   0   1   0      0   0   0   0",
2279
                          "  x   x   x   x    a11 a10  a9  a8",
2280
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2281
                          "  o   o   o   o      o   o   o   o";
2282
 
2283
	write           = "  1   1   0   0      0   0   0   0",
2284
                          "  x   x   x   x    a11 a10  a9  a8",
2285
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2286
                          "  i   i   i   i      i   i   i   i";
2287
 
2288
	mode		= 0x04;
2289
	delay		= 12;
2290
	blocksize	= 64;
2291
	readsize	= 256;
2292
      ;
2293
 
2294
    memory "flash"
2295
        paged           = yes;
2296
        size            = 131072;
2297
        page_size       = 256;
2298
        num_pages       = 512;
2299
        min_write_delay = 22000;
2300
        max_write_delay = 56000;
2301
        readback_p1     = 0xff;
2302
        readback_p2     = 0xff;
2303
        read_lo         = "  0   0   1   0      0   0   0   0",
2304
                          "a15 a14 a13 a12    a11 a10  a9  a8",
2305
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2306
                          "  o   o   o   o      o   o   o   o";
2307
 
2308
        read_hi         = "  0   0   1   0      1   0   0   0",
2309
                          "a15 a14 a13 a12    a11 a10  a9  a8",
2310
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2311
                          "  o   o   o   o      o   o   o   o";
2312
 
2313
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
2314
                          "  x   x   x   x      x   x   x   x",
2315
                          "  x  a6  a5  a4     a3  a2  a1  a0",
2316
                          "  i   i   i   i      i   i   i   i";
2317
 
2318
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
2319
                          "  x   x   x   x      x   x   x   x",
2320
                          "  x  a6  a5  a4     a3  a2  a1  a0",
2321
                          "  i   i   i   i      i   i   i   i";
2322
 
2323
        writepage       = "  0   1   0   0      1   1   0   0",
2324
                          "a15 a14 a13 a12    a11 a10  a9  a8",
2325
                          " a7   x   x   x      x   x   x   x",
2326
                          "  x   x   x   x      x   x   x   x";
2327
 
2328
	mode		= 0x11;
2329
	delay		= 70;
2330
	blocksize	= 256;
2331
	readsize	= 256;
2332
      ;
2333
 
2334
    memory "fuse"
2335
        size            = 1;
2336
        read            = "0 1 0 1  0 0 0 0  x x x x  x x x x",
2337
                          "x x x x  x x x x  x x o x  o 1 o o";
2338
 
2339
        write           = "1 0 1 0  1 1 0 0  1 0 1 1  i 1 i i",
2340
                          "x x x x  x x x x  x x x x  x x x x";
2341
        min_write_delay = 9000;
2342
        max_write_delay = 9000;
2343
      ;
2344
 
2345
    memory "lock"
2346
        size            = 1;
2347
        read            = "0 1 0 1  1 0 0 0   x x x x  x x x x",
2348
                          "x x x x  x x x x   x x x x  x o o x";
2349
 
2350
        write           = "1 0 1 0  1 1 0 0   1 1 1 1  1 i i 1",
2351
                          "x x x x  x x x x   x x x x  x x x x";
2352
        min_write_delay = 9000;
2353
        max_write_delay = 9000;
2354
      ;
2355
 
2356
    memory "signature"
2357
        size            = 3;
2358
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
2359
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
2360
      ;
2361
  ;
2362
 
2363
 
2364
#------------------------------------------------------------
2365
# ATmega64
2366
#------------------------------------------------------------
2367
 
2368
part
2369
    id               = "m64";
2370
    desc             = "ATMEGA64";
2371
    has_jtag         = yes;
2372
    stk500_devcode   = 0xA0;
2373
    avr910_devcode   = 0x45;
2374
    signature        = 0x1e 0x96 0x02;
2375
    chip_erase_delay = 9000;
2376
    pagel            = 0xD7;
2377
    bs2              = 0xA0;
2378
    reset            = dedicated;
2379
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
2380
                       "x x x x  x x x x    x x x x  x x x x";
2381
 
2382
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
2383
                       "x x x x  x x x x    x x x x  x x x x";
2384
 
2385
    timeout		= 200;
2386
    stabdelay		= 100;
2387
    cmdexedelay		= 25;
2388
    synchloops		= 32;
2389
    bytedelay		= 0;
2390
    pollindex		= 3;
2391
    pollvalue		= 0x53;
2392
    predelay		= 1;
2393
    postdelay		= 1;
2394
    pollmethod		= 0;
2395
 
2396
    pp_controlstack     =
2397
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
2398
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
2399
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
2400
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
2401
    hventerstabdelay    = 100;
2402
    progmodedelay       = 0;
2403
    latchcycles         = 6;
2404
    togglevtg           = 0;
2405
    poweroffdelay       = 0;
2406
    resetdelayms        = 0;
2407
    resetdelayus        = 0;
2408
    hvleavestabdelay    = 15;
2409
    chiperasepulsewidth = 0;
2410
    chiperasepolltimeout = 10;
2411
    programfusepulsewidth = 0;
2412
    programfusepolltimeout = 5;
2413
    programlockpulsewidth = 0;
2414
    programlockpolltimeout = 5;
2415
 
2416
    idr                 = 0x22;
2417
    spmcr               = 0x68;
2418
    allowfullpagebitstream = yes;
2419
 
2420
    memory "eeprom"
2421
        paged           = no; /* leave this "no" */
2422
        page_size       = 8;  /* for parallel programming */
2423
        size            = 2048;
2424
        min_write_delay = 9000;
2425
        max_write_delay = 9000;
2426
        readback_p1     = 0xff;
2427
        readback_p2     = 0xff;
2428
        read            = "  1   0   1   0      0   0   0   0",
2429
                          "  x   x   x   x    a11 a10  a9  a8",
2430
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2431
                          "  o   o   o   o      o   o   o   o";
2432
 
2433
        write           = "  1   1   0   0      0   0   0   0",
2434
                          "  x   x   x   x    a11 a10  a9  a8",
2435
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2436
                          "  i   i   i   i      i   i   i   i";
2437
 
2438
	mode		= 0x04;
2439
	delay		= 20;
2440
	blocksize	= 64;
2441
	readsize	= 256;
2442
      ;
2443
 
2444
    memory "flash"
2445
        paged           = yes;
2446
        size            = 65536;
2447
        page_size       = 256;
2448
        num_pages       = 256;
2449
        min_write_delay = 4500;
2450
        max_write_delay = 4500;
2451
        readback_p1     = 0xff;
2452
        readback_p2     = 0xff;
2453
        read_lo         = "  0   0   1   0      0   0   0   0",
2454
                          "  x a14 a13 a12    a11 a10  a9  a8",
2455
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2456
                          "  o   o   o   o      o   o   o   o";
2457
 
2458
        read_hi         = "  0   0   1   0      1   0   0   0",
2459
                          "  x a14 a13 a12    a11 a10  a9  a8",
2460
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2461
                          "  o   o   o   o      o   o   o   o";
2462
 
2463
 
2464
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
2465
                          "  x   x   x   x      x   x   x   x",
2466
                          "  x  a6  a5  a4     a3  a2  a1  a0",
2467
                          "  i   i   i   i      i   i   i   i";
2468
 
2469
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
2470
                          "  x   x   x   x      x   x   x   x",
2471
                          "  x  a6  a5  a4     a3  a2  a1  a0",
2472
                          "  i   i   i   i      i   i   i   i";
2473
 
2474
        writepage       = "  0   1   0   0      1   1   0   0",
2475
                          "  x a14 a13 a12    a11 a10  a9  a8",
2476
                          " a7   x   x   x      x   x   x   x",
2477
                          "  x   x   x   x      x   x   x   x";
2478
 
2479
	mode		= 0x21;
2480
	delay		= 6;
2481
	blocksize	= 128;
2482
	readsize	= 256;
2483
      ;
2484
 
2485
    memory "lfuse"
2486
        size            = 1;
2487
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
2488
                          "x x x x  x x x x  i i i i  i i i i";
2489
 
2490
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
2491
                          "x x x x  x x x x  o o o o  o o o o";
2492
        min_write_delay = 9000;
2493
        max_write_delay = 9000;
2494
      ;
2495
 
2496
    memory "hfuse"
2497
        size            = 1;
2498
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
2499
                          "x x x x  x x x x  i i i i  i i i i";
2500
 
2501
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
2502
                          "x x x x  x x x x  o o o o  o o o o";
2503
        min_write_delay = 9000;
2504
        max_write_delay = 9000;
2505
      ;
2506
 
2507
    memory "efuse"
2508
        size            = 1;
2509
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
2510
                          "x x x x  x x x x  x x x x  x x i i";
2511
 
2512
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
2513
                          "x x x x  x x x x  o o o o  o o o o";
2514
        min_write_delay = 9000;
2515
        max_write_delay = 9000;
2516
      ;
2517
 
2518
    memory "lock"
2519
        size            = 1;
2520
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
2521
                          "x x x x  x x x x   x x o o  o o o o";
2522
 
2523
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
2524
                          "x x x x  x x x x   1 1 i i  i i i i";
2525
        min_write_delay = 9000;
2526
        max_write_delay = 9000;
2527
      ;
2528
 
2529
    memory "calibration"
2530
        size            = 4;
2531
        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
2532
                          "0 0 0 0  0 0 a1 a0  o o o o  o o o o";
2533
      ;
2534
 
2535
    memory "signature"
2536
        size            = 3;
2537
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
2538
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
2539
      ;
2540
  ;
2541
 
2542
 
2543
 
2544
 
2545
#------------------------------------------------------------
2546
# ATmega128
2547
#------------------------------------------------------------
2548
 
2549
part
2550
    id               = "m128";
2551
    desc             = "ATMEGA128";
2552
    has_jtag         = yes;
2553
    stk500_devcode   = 0xB2;
2554
    avr910_devcode   = 0x43;
2555
    signature        = 0x1e 0x97 0x02;
2556
    chip_erase_delay = 9000;
2557
    pagel            = 0xD7;
2558
    bs2              = 0xA0;
2559
    reset            = dedicated;
2560
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
2561
                       "x x x x  x x x x    x x x x  x x x x";
2562
 
2563
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
2564
                       "x x x x  x x x x    x x x x  x x x x";
2565
 
2566
    timeout		= 200;
2567
    stabdelay		= 100;
2568
    cmdexedelay		= 25;
2569
    synchloops		= 32;
2570
    bytedelay		= 0;
2571
    pollindex		= 3;
2572
    pollvalue		= 0x53;
2573
    predelay		= 1;
2574
    postdelay		= 1;
2575
    pollmethod		= 0;
2576
 
2577
    pp_controlstack     =
2578
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
2579
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
2580
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
2581
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
2582
    hventerstabdelay    = 100;
2583
    progmodedelay       = 0;
2584
    latchcycles         = 6;
2585
    togglevtg           = 0;
2586
    poweroffdelay       = 0;
2587
    resetdelayms        = 0;
2588
    resetdelayus        = 0;
2589
    hvleavestabdelay    = 15;
2590
    chiperasepulsewidth = 0;
2591
    chiperasepolltimeout = 10;
2592
    programfusepulsewidth = 0;
2593
    programfusepolltimeout = 5;
2594
    programlockpulsewidth = 0;
2595
    programlockpolltimeout = 5;
2596
 
2597
    idr                 = 0x22;
2598
    spmcr               = 0x68;
2599
    rampz               = 0x3b;
2600
    allowfullpagebitstream = yes;
2601
 
2602
    memory "eeprom"
2603
        paged           = no; /* leave this "no" */
2604
        page_size       = 8;  /* for parallel programming */
2605
        size            = 4096;
2606
        min_write_delay = 9000;
2607
        max_write_delay = 9000;
2608
        readback_p1     = 0xff;
2609
        readback_p2     = 0xff;
2610
        read            = "  1   0   1   0      0   0   0   0",
2611
                          "  x   x   x   x    a11 a10  a9  a8",
2612
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2613
                          "  o   o   o   o      o   o   o   o";
2614
 
2615
        write           = "  1   1   0   0      0   0   0   0",
2616
                          "  x   x   x   x    a11 a10  a9  a8",
2617
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2618
                          "  i   i   i   i      i   i   i   i";
2619
 
2620
	mode		= 0x04;
2621
	delay		= 12;
2622
	blocksize	= 64;
2623
	readsize	= 256;
2624
      ;
2625
 
2626
    memory "flash"
2627
        paged           = yes;
2628
        size            = 131072;
2629
        page_size       = 256;
2630
        num_pages       = 512;
2631
        min_write_delay = 4500;
2632
        max_write_delay = 4500;
2633
        readback_p1     = 0xff;
2634
        readback_p2     = 0xff;
2635
        read_lo         = "  0   0   1   0      0   0   0   0",
2636
                          "a15 a14 a13 a12    a11 a10  a9  a8",
2637
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2638
                          "  o   o   o   o      o   o   o   o";
2639
 
2640
        read_hi         = "  0   0   1   0      1   0   0   0",
2641
                          "a15 a14 a13 a12    a11 a10  a9  a8",
2642
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2643
                          "  o   o   o   o      o   o   o   o";
2644
 
2645
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
2646
                          "  x   x   x   x      x   x   x   x",
2647
                          "  x  a6  a5  a4     a3  a2  a1  a0",
2648
                          "  i   i   i   i      i   i   i   i";
2649
 
2650
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
2651
                          "  x   x   x   x      x   x   x   x",
2652
                          "  x  a6  a5  a4     a3  a2  a1  a0",
2653
                          "  i   i   i   i      i   i   i   i";
2654
 
2655
        writepage       = "  0   1   0   0      1   1   0   0",
2656
                          "a15 a14 a13 a12    a11 a10  a9  a8",
2657
                          " a7   x   x   x      x   x   x   x",
2658
                          "  x   x   x   x      x   x   x   x";
2659
 
2660
	mode		= 0x21;
2661
	delay		= 6;
2662
	blocksize	= 128;
2663
	readsize	= 256;
2664
      ;
2665
 
2666
    memory "lfuse"
2667
        size            = 1;
2668
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
2669
                          "x x x x  x x x x  i i i i  i i i i";
2670
 
2671
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
2672
                          "x x x x  x x x x  o o o o  o o o o";
2673
        min_write_delay = 9000;
2674
        max_write_delay = 9000;
2675
      ;
2676
 
2677
    memory "hfuse"
2678
        size            = 1;
2679
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
2680
                          "x x x x  x x x x  i i i i  i i i i";
2681
 
2682
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
2683
                          "x x x x  x x x x  o o o o  o o o o";
2684
        min_write_delay = 9000;
2685
        max_write_delay = 9000;
2686
      ;
2687
 
2688
    memory "efuse"
2689
        size            = 1;
2690
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
2691
                          "x x x x  x x x x  x x x x  x x i i";
2692
 
2693
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
2694
                          "x x x x  x x x x  o o o o  o o o o";
2695
        min_write_delay = 9000;
2696
        max_write_delay = 9000;
2697
      ;
2698
 
2699
    memory "lock"
2700
        size            = 1;
2701
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
2702
                          "x x x x  x x x x   x x o o  o o o o";
2703
 
2704
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
2705
                          "x x x x  x x x x   1 1 i i  i i i i";
2706
        min_write_delay = 9000;
2707
        max_write_delay = 9000;
2708
      ;
2709
 
2710
    memory "calibration"
2711
        size            = 4;
2712
        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
2713
                          "0 0 0 0  0 0 a1 a0  o o o o  o o o o";
2714
      ;
2715
 
2716
    memory "signature"
2717
        size            = 3;
2718
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
2719
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
2720
      ;
2721
  ;
2722
 
2723
#------------------------------------------------------------
2724
# AT90CAN128
2725
#------------------------------------------------------------
2726
 
2727
part
2728
    id               = "c128";
2729
    desc             = "AT90CAN128";
2730
    has_jtag         = yes;
2731
    stk500_devcode   = 0xB3;
2732
#    avr910_devcode   = 0x43;
2733
    signature        = 0x1e 0x97 0x81;
2734
    chip_erase_delay = 9000;
2735
    pagel            = 0xD7;
2736
    bs2              = 0xA0;
2737
    reset            = dedicated;
2738
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
2739
                       "x x x x  x x x x    x x x x  x x x x";
2740
 
2741
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
2742
                       "x x x x  x x x x    x x x x  x x x x";
2743
 
2744
    timeout		= 200;
2745
    stabdelay		= 100;
2746
    cmdexedelay		= 25;
2747
    synchloops		= 32;
2748
    bytedelay		= 0;
2749
    pollindex		= 3;
2750
    pollvalue		= 0x53;
2751
    predelay		= 1;
2752
    postdelay		= 1;
2753
    pollmethod		= 1;
2754
 
2755
    pp_controlstack     =
2756
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
2757
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
2758
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
2759
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01;
2760
    hventerstabdelay    = 100;
2761
    progmodedelay       = 0;
2762
    latchcycles         = 6;
2763
    togglevtg           = 0;
2764
    poweroffdelay       = 0;
2765
    resetdelayms        = 0;
2766
    resetdelayus        = 0;
2767
    hvleavestabdelay    = 15;
2768
    chiperasepulsewidth = 0;
2769
    chiperasepolltimeout = 10;
2770
    programfusepulsewidth = 0;
2771
    programfusepolltimeout = 5;
2772
    programlockpulsewidth = 0;
2773
    programlockpolltimeout = 5;
2774
 
2775
    idr                 = 0x31;
2776
    spmcr               = 0x57;
2777
    rampz               = 0x3b;
2778
    eecr                = 0x3f;
2779
    allowfullpagebitstream = no;
2780
 
2781
    memory "eeprom"
2782
        paged           = no; /* leave this "no" */
2783
        page_size       = 8;  /* for parallel programming */
2784
        size            = 4096;
2785
        min_write_delay = 9000;
2786
        max_write_delay = 9000;
2787
        readback_p1     = 0xff;
2788
        readback_p2     = 0xff;
2789
	read            = "  1   0   1   0      0   0   0   0",
2790
                          "  0   0   0   x    a11 a10  a9  a8",
2791
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2792
                          "  o   o   o   o      o   o   o   o";
2793
 
2794
	write           = "  1   1   0   0      0   0   0   0",
2795
                          "  0   0   0   x    a11 a10  a9  a8",
2796
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2797
                          "  i   i   i   i      i   i   i   i";
2798
 
2799
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
2800
			  "  0   0   0   0      0   0   0   0",
2801
			  "  0   0   0   0      0  a2  a1  a0",
2802
			  "  i   i   i   i      i   i   i   i";
2803
 
2804
	writepage	= "  1   1   0   0      0   0   1   0",
2805
			  "  0   0   x   x    a11 a10  a9  a8",
2806
			  " a7  a6  a5  a4     a3   0   0   0",
2807
			  "  x   x   x   x      x   x   x   x";
2808
 
2809
 
2810
	mode		= 0x41;
2811
	delay		= 20;
2812
	blocksize	= 8;
2813
	readsize	= 256;
2814
      ;
2815
 
2816
    memory "flash"
2817
        paged           = yes;
2818
        size            = 131072;
2819
        page_size       = 256;
2820
        num_pages       = 512;
2821
        min_write_delay = 4500;
2822
        max_write_delay = 4500;
2823
        readback_p1     = 0xff;
2824
        readback_p2     = 0xff;
2825
        read_lo         = "  0   0   1   0      0   0   0   0",
2826
                          "a15 a14 a13 a12    a11 a10  a9  a8",
2827
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2828
                          "  o   o   o   o      o   o   o   o";
2829
 
2830
        read_hi         = "  0   0   1   0      1   0   0   0",
2831
                          "a15 a14 a13 a12    a11 a10  a9  a8",
2832
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2833
                          "  o   o   o   o      o   o   o   o";
2834
 
2835
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
2836
                          "  0   0   0   x      x   x   x   x",
2837
                          "  x  a6  a5  a4     a3  a2  a1  a0",
2838
                          "  i   i   i   i      i   i   i   i";
2839
 
2840
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
2841
                          "  0   0   0   x      x   x   x   x",
2842
                          "  x  a6  a5  a4     a3  a2  a1  a0",
2843
                          "  i   i   i   i      i   i   i   i";
2844
 
2845
        writepage       = "  0   1   0   0      1   1   0   0",
2846
                          "a15 a14 a13 a12    a11 a10  a9  a8",
2847
                          " a7   x   x   x      x   x   x   x",
2848
                          "  x   x   x   x      x   x   x   x";
2849
 
2850
	mode		= 0x41;
2851
	delay		= 6;
2852
	blocksize	= 256;
2853
	readsize	= 256;
2854
      ;
2855
 
2856
    memory "lfuse"
2857
        size            = 1;
2858
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
2859
                          "x x x x  x x x x  i i i i  i i i i";
2860
 
2861
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
2862
                          "x x x x  x x x x  o o o o  o o o o";
2863
        min_write_delay = 9000;
2864
        max_write_delay = 9000;
2865
      ;
2866
 
2867
    memory "hfuse"
2868
        size            = 1;
2869
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
2870
                          "x x x x  x x x x  i i i i  i i i i";
2871
 
2872
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
2873
                          "x x x x  x x x x  o o o o  o o o o";
2874
        min_write_delay = 9000;
2875
        max_write_delay = 9000;
2876
      ;
2877
 
2878
    memory "efuse"
2879
        size            = 1;
2880
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
2881
                          "x x x x  x x x x  x x x x  i i i i";
2882
 
2883
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
2884
                          "x x x x  x x x x  o o o o  o o o o";
2885
        min_write_delay = 9000;
2886
        max_write_delay = 9000;
2887
      ;
2888
 
2889
    memory "lock"
2890
        size            = 1;
2891
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
2892
                          "x x x x  x x x x   x x o o  o o o o";
2893
 
2894
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
2895
                          "x x x x  x x x x   1 1 i i  i i i i";
2896
        min_write_delay = 9000;
2897
        max_write_delay = 9000;
2898
      ;
2899
 
2900
    memory "calibration"
2901
        size            = 1;
2902
        read            = "0 0 1 1  1 0 0 0  0 0 0 x  x x x x",
2903
                          "0 0 0 0  0 0 0 0  o o o o  o o o o";
2904
      ;
2905
 
2906
    memory "signature"
2907
        size            = 3;
2908
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
2909
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
2910
      ;
2911
  ;
2912
 
2913
#------------------------------------------------------------
2914
# AT90CAN64
2915
#------------------------------------------------------------
2916
 
2917
part
2918
    id               = "c64";
2919
    desc             = "AT90CAN64";
2920
    has_jtag         = yes;
2921
    stk500_devcode   = 0xB3;
2922
#    avr910_devcode   = 0x43;
2923
    signature        = 0x1e 0x96 0x81;
2924
    chip_erase_delay = 9000;
2925
    pagel            = 0xD7;
2926
    bs2              = 0xA0;
2927
    reset            = dedicated;
2928
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
2929
                       "x x x x  x x x x    x x x x  x x x x";
2930
 
2931
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
2932
                       "x x x x  x x x x    x x x x  x x x x";
2933
 
2934
    timeout		= 200;
2935
    stabdelay		= 100;
2936
    cmdexedelay		= 25;
2937
    synchloops		= 32;
2938
    bytedelay		= 0;
2939
    pollindex		= 3;
2940
    pollvalue		= 0x53;
2941
    predelay		= 1;
2942
    postdelay		= 1;
2943
    pollmethod		= 1;
2944
 
2945
    pp_controlstack     =
2946
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
2947
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
2948
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
2949
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01;
2950
    hventerstabdelay    = 100;
2951
    progmodedelay       = 0;
2952
    latchcycles         = 6;
2953
    togglevtg           = 0;
2954
    poweroffdelay       = 0;
2955
    resetdelayms        = 0;
2956
    resetdelayus        = 0;
2957
    hvleavestabdelay    = 15;
2958
    chiperasepulsewidth = 0;
2959
    chiperasepolltimeout = 10;
2960
    programfusepulsewidth = 0;
2961
    programfusepolltimeout = 5;
2962
    programlockpulsewidth = 0;
2963
    programlockpolltimeout = 5;
2964
 
2965
    idr                 = 0x31;
2966
    spmcr               = 0x57;
2967
    rampz               = 0x3b;
2968
    eecr                = 0x3f;
2969
    allowfullpagebitstream = no;
2970
 
2971
    memory "eeprom"
2972
        paged           = no; /* leave this "no" */
2973
        page_size       = 8;  /* for parallel programming */
2974
        size            = 2048;
2975
        min_write_delay = 9000;
2976
        max_write_delay = 9000;
2977
        readback_p1     = 0xff;
2978
        readback_p2     = 0xff;
2979
	read            = "  1   0   1   0      0   0   0   0",
2980
                          "  0   0   0   x      x a10  a9  a8",
2981
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2982
                          "  o   o   o   o      o   o   o   o";
2983
 
2984
	write           = "  1   1   0   0      0   0   0   0",
2985
                          "  0   0   0   x      x a10  a9  a8",
2986
                          " a7  a6  a5  a4     a3  a2  a1  a0",
2987
                          "  i   i   i   i      i   i   i   i";
2988
 
2989
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
2990
			  "  0   0   0   0      0   0   0   0",
2991
			  "  0   0   0   0      0  a2  a1  a0",
2992
			  "  i   i   i   i      i   i   i   i";
2993
 
2994
	writepage	= "  1   1   0   0      0   0   1   0",
2995
			  "  0   0   x   x      x a10  a9  a8",
2996
			  " a7  a6  a5  a4     a3   0   0   0",
2997
			  "  x   x   x   x      x   x   x   x";
2998
 
2999
 
3000
	mode		= 0x41;
3001
	delay		= 20;
3002
	blocksize	= 8;
3003
	readsize	= 256;
3004
      ;
3005
 
3006
    memory "flash"
3007
        paged           = yes;
3008
        size            = 65536;
3009
        page_size       = 256;
3010
        num_pages       = 256;
3011
        min_write_delay = 4500;
3012
        max_write_delay = 4500;
3013
        readback_p1     = 0xff;
3014
        readback_p2     = 0xff;
3015
        read_lo         = "  0   0   1   0      0   0   0   0",
3016
                          "a15 a14 a13 a12    a11 a10  a9  a8",
3017
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3018
                          "  o   o   o   o      o   o   o   o";
3019
 
3020
        read_hi         = "  0   0   1   0      1   0   0   0",
3021
                          "a15 a14 a13 a12    a11 a10  a9  a8",
3022
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3023
                          "  o   o   o   o      o   o   o   o";
3024
 
3025
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
3026
                          "  0   0   0   x      x   x   x   x",
3027
                          "  x  a6  a5  a4     a3  a2  a1  a0",
3028
                          "  i   i   i   i      i   i   i   i";
3029
 
3030
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
3031
                          "  0   0   0   x      x   x   x   x",
3032
                          "  x  a6  a5  a4     a3  a2  a1  a0",
3033
                          "  i   i   i   i      i   i   i   i";
3034
 
3035
        writepage       = "  0   1   0   0      1   1   0   0",
3036
                          "a15 a14 a13 a12    a11 a10  a9  a8",
3037
                          " a7   x   x   x      x   x   x   x",
3038
                          "  x   x   x   x      x   x   x   x";
3039
 
3040
	mode		= 0x41;
3041
	delay		= 6;
3042
	blocksize	= 256;
3043
	readsize	= 256;
3044
      ;
3045
 
3046
    memory "lfuse"
3047
        size            = 1;
3048
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
3049
                          "x x x x  x x x x  i i i i  i i i i";
3050
 
3051
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
3052
                          "x x x x  x x x x  o o o o  o o o o";
3053
        min_write_delay = 9000;
3054
        max_write_delay = 9000;
3055
      ;
3056
 
3057
    memory "hfuse"
3058
        size            = 1;
3059
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
3060
                          "x x x x  x x x x  i i i i  i i i i";
3061
 
3062
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
3063
                          "x x x x  x x x x  o o o o  o o o o";
3064
        min_write_delay = 9000;
3065
        max_write_delay = 9000;
3066
      ;
3067
 
3068
    memory "efuse"
3069
        size            = 1;
3070
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
3071
                          "x x x x  x x x x  x x x x  i i i i";
3072
 
3073
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
3074
                          "x x x x  x x x x  o o o o  o o o o";
3075
        min_write_delay = 9000;
3076
        max_write_delay = 9000;
3077
      ;
3078
 
3079
    memory "lock"
3080
        size            = 1;
3081
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
3082
                          "x x x x  x x x x   x x o o  o o o o";
3083
 
3084
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
3085
                          "x x x x  x x x x   1 1 i i  i i i i";
3086
        min_write_delay = 9000;
3087
        max_write_delay = 9000;
3088
      ;
3089
 
3090
    memory "calibration"
3091
        size            = 1;
3092
        read            = "0 0 1 1  1 0 0 0  0 0 0 x  x x x x",
3093
                          "0 0 0 0  0 0 0 0  o o o o  o o o o";
3094
      ;
3095
 
3096
    memory "signature"
3097
        size            = 3;
3098
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
3099
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
3100
      ;
3101
  ;
3102
 
3103
#------------------------------------------------------------
3104
# AT90CAN32
3105
#------------------------------------------------------------
3106
 
3107
part
3108
    id               = "c32";
3109
    desc             = "AT90CAN32";
3110
    has_jtag         = yes;
3111
    stk500_devcode   = 0xB3;
3112
#    avr910_devcode   = 0x43;
3113
    signature        = 0x1e 0x95 0x81;
3114
    chip_erase_delay = 9000;
3115
    pagel            = 0xD7;
3116
    bs2              = 0xA0;
3117
    reset            = dedicated;
3118
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
3119
                       "x x x x  x x x x    x x x x  x x x x";
3120
 
3121
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
3122
                       "x x x x  x x x x    x x x x  x x x x";
3123
 
3124
    timeout		= 200;
3125
    stabdelay		= 100;
3126
    cmdexedelay		= 25;
3127
    synchloops		= 32;
3128
    bytedelay		= 0;
3129
    pollindex		= 3;
3130
    pollvalue		= 0x53;
3131
    predelay		= 1;
3132
    postdelay		= 1;
3133
    pollmethod		= 1;
3134
 
3135
    pp_controlstack     =
3136
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
3137
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
3138
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
3139
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01;
3140
    hventerstabdelay    = 100;
3141
    progmodedelay       = 0;
3142
    latchcycles         = 6;
3143
    togglevtg           = 0;
3144
    poweroffdelay       = 0;
3145
    resetdelayms        = 0;
3146
    resetdelayus        = 0;
3147
    hvleavestabdelay    = 15;
3148
    chiperasepulsewidth = 0;
3149
    chiperasepolltimeout = 10;
3150
    programfusepulsewidth = 0;
3151
    programfusepolltimeout = 5;
3152
    programlockpulsewidth = 0;
3153
    programlockpolltimeout = 5;
3154
 
3155
    idr                 = 0x31;
3156
    spmcr               = 0x57;
3157
    rampz               = 0x3b;
3158
    eecr                = 0x3f;
3159
    allowfullpagebitstream = no;
3160
 
3161
    memory "eeprom"
3162
        paged           = no; /* leave this "no" */
3163
        page_size       = 8;  /* for parallel programming */
3164
        size            = 1024;
3165
        min_write_delay = 9000;
3166
        max_write_delay = 9000;
3167
        readback_p1     = 0xff;
3168
        readback_p2     = 0xff;
3169
	read            = "  1   0   1   0      0   0   0   0",
3170
                          "  0   0   0   x      x   x  a9  a8",
3171
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3172
                          "  o   o   o   o      o   o   o   o";
3173
 
3174
	write           = "  1   1   0   0      0   0   0   0",
3175
                          "  0   0   0   x      x   x  a9  a8",
3176
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3177
                          "  i   i   i   i      i   i   i   i";
3178
 
3179
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
3180
			  "  0   0   0   0      0   0   0   0",
3181
			  "  0   0   0   0      0  a2  a1  a0",
3182
			  "  i   i   i   i      i   i   i   i";
3183
 
3184
	writepage	= "  1   1   0   0      0   0   1   0",
3185
			  "  0   0   x   x      x   x  a9  a8",
3186
			  " a7  a6  a5  a4     a3   0   0   0",
3187
			  "  x   x   x   x      x   x   x   x";
3188
 
3189
 
3190
	mode		= 0x41;
3191
	delay		= 20;
3192
	blocksize	= 8;
3193
	readsize	= 256;
3194
      ;
3195
 
3196
    memory "flash"
3197
        paged           = yes;
3198
        size            = 32768;
3199
        page_size       = 256;
3200
        num_pages       = 128;
3201
        min_write_delay = 4500;
3202
        max_write_delay = 4500;
3203
        readback_p1     = 0xff;
3204
        readback_p2     = 0xff;
3205
        read_lo         = "  0   0   1   0      0   0   0   0",
3206
                          "a15 a14 a13 a12    a11 a10  a9  a8",
3207
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3208
                          "  o   o   o   o      o   o   o   o";
3209
 
3210
        read_hi         = "  0   0   1   0      1   0   0   0",
3211
                          "a15 a14 a13 a12    a11 a10  a9  a8",
3212
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3213
                          "  o   o   o   o      o   o   o   o";
3214
 
3215
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
3216
                          "  0   0   0   x      x   x   x   x",
3217
                          "  x  a6  a5  a4     a3  a2  a1  a0",
3218
                          "  i   i   i   i      i   i   i   i";
3219
 
3220
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
3221
                          "  0   0   0   x      x   x   x   x",
3222
                          "  x  a6  a5  a4     a3  a2  a1  a0",
3223
                          "  i   i   i   i      i   i   i   i";
3224
 
3225
        writepage       = "  0   1   0   0      1   1   0   0",
3226
                          "a15 a14 a13 a12    a11 a10  a9  a8",
3227
                          " a7   x   x   x      x   x   x   x",
3228
                          "  x   x   x   x      x   x   x   x";
3229
 
3230
	mode		= 0x41;
3231
	delay		= 6;
3232
	blocksize	= 256;
3233
	readsize	= 256;
3234
      ;
3235
 
3236
    memory "lfuse"
3237
        size            = 1;
3238
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
3239
                          "x x x x  x x x x  i i i i  i i i i";
3240
 
3241
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
3242
                          "x x x x  x x x x  o o o o  o o o o";
3243
        min_write_delay = 9000;
3244
        max_write_delay = 9000;
3245
      ;
3246
 
3247
    memory "hfuse"
3248
        size            = 1;
3249
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
3250
                          "x x x x  x x x x  i i i i  i i i i";
3251
 
3252
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
3253
                          "x x x x  x x x x  o o o o  o o o o";
3254
        min_write_delay = 9000;
3255
        max_write_delay = 9000;
3256
      ;
3257
 
3258
    memory "efuse"
3259
        size            = 1;
3260
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
3261
                          "x x x x  x x x x  x x x x  i i i i";
3262
 
3263
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
3264
                          "x x x x  x x x x  o o o o  o o o o";
3265
        min_write_delay = 9000;
3266
        max_write_delay = 9000;
3267
      ;
3268
 
3269
    memory "lock"
3270
        size            = 1;
3271
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
3272
                          "x x x x  x x x x   x x o o  o o o o";
3273
 
3274
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
3275
                          "x x x x  x x x x   1 1 i i  i i i i";
3276
        min_write_delay = 9000;
3277
        max_write_delay = 9000;
3278
      ;
3279
 
3280
    memory "calibration"
3281
        size            = 1;
3282
        read            = "0 0 1 1  1 0 0 0  0 0 0 x  x x x x",
3283
                          "0 0 0 0  0 0 0 0  o o o o  o o o o";
3284
      ;
3285
 
3286
    memory "signature"
3287
        size            = 3;
3288
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
3289
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
3290
      ;
3291
  ;
3292
 
3293
 
3294
#------------------------------------------------------------
3295
# ATmega16
3296
#------------------------------------------------------------
3297
 
3298
part
3299
    id               = "m16";
3300
    desc             = "ATMEGA16";
3301
    has_jtag         = yes;
3302
    stk500_devcode   = 0x82;
3303
    avr910_devcode   = 0x74;
3304
    signature        = 0x1e 0x94 0x03;
3305
    pagel            = 0xd7;
3306
    bs2              = 0xa0;
3307
    chip_erase_delay = 9000;
3308
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
3309
                       "x x x x  x x x x    x x x x  x x x x";
3310
 
3311
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
3312
                       "x x x x  x x x x    x x x x  x x x x";
3313
 
3314
    timeout		= 200;
3315
    stabdelay		= 100;
3316
    cmdexedelay		= 25;
3317
    synchloops		= 32;
3318
    bytedelay		= 0;
3319
    pollindex		= 3;
3320
    pollvalue		= 0x53;
3321
    predelay		= 1;
3322
    postdelay		= 1;
3323
    pollmethod		= 0;
3324
 
3325
    pp_controlstack     =
3326
	0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
3327
	0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
3328
	0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
3329
	0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
3330
    hventerstabdelay    = 100;
3331
    progmodedelay       = 100;
3332
    latchcycles         = 6;
3333
    togglevtg           = 0;
3334
    poweroffdelay       = 0;
3335
    resetdelayms        = 0;
3336
    resetdelayus        = 0;
3337
    hvleavestabdelay    = 15;
3338
    resetdelay          = 15;
3339
    chiperasepulsewidth = 0;
3340
    chiperasepolltimeout = 10;
3341
    programfusepulsewidth = 0;
3342
    programfusepolltimeout = 5;
3343
    programlockpulsewidth = 0;
3344
    programlockpolltimeout = 5;
3345
 
3346
    idr                 = 0x31;
3347
    spmcr               = 0x57;
3348
    allowfullpagebitstream = yes;
3349
 
3350
    memory "eeprom"
3351
        paged           = no; /* leave this "no" */
3352
        page_size       = 4;  /* for parallel programming */
3353
        size            = 512;
3354
        min_write_delay = 9000;
3355
        max_write_delay = 9000;
3356
        readback_p1     = 0xff;
3357
        readback_p2     = 0xff;
3358
	read            = "  1   0   1   0      0   0   0   0",
3359
                          "  0   0   x   x      x   x  a9  a8",
3360
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3361
                          "  o   o   o   o      o   o   o   o";
3362
 
3363
	write           = "  1   1   0   0      0   0   0   0",
3364
                          "  0   0   x   x      x   x  a9  a8",
3365
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3366
                          "  i   i   i   i      i   i   i   i";
3367
 
3368
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
3369
			  "  0   0   0   0      0   0   0   0",
3370
			  "  0   0   0   0      0   0  a1  a0",
3371
			  "  i   i   i   i      i   i   i   i";
3372
 
3373
	writepage	= "  1   1   0   0      0   0   1   0",
3374
			  "  0   0   x   x      x   x  a9  a8",
3375
			  " a7  a6  a5  a4     a3  a2   0   0",
3376
			  "  x   x   x   x      x   x   x   x";
3377
 
3378
	mode		= 0x04;
3379
	delay		= 10;
3380
	blocksize	= 128;
3381
	readsize	= 256;
3382
      ;
3383
 
3384
    memory "flash"
3385
        paged           = yes;
3386
        size            = 16384;
3387
        page_size       = 128;
3388
        num_pages       = 128;
3389
        min_write_delay = 4500;
3390
        max_write_delay = 4500;
3391
        readback_p1     = 0xff;
3392
        readback_p2     = 0xff;
3393
        read_lo         = "  0   0   1   0      0   0   0   0",
3394
                          "  0   0 a13 a12    a11 a10  a9  a8",
3395
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3396
                          "  o   o   o   o      o   o   o   o";
3397
 
3398
        read_hi         = "  0   0   1   0      1   0   0   0",
3399
                          "  0   0 a13 a12    a11 a10  a9  a8",
3400
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3401
                          "  o   o   o   o      o   o   o   o";
3402
 
3403
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
3404
                          "  0   0   x   x      x   x   x   x",
3405
                          "  x   x  a5  a4     a3  a2  a1  a0",
3406
                          "  i   i   i   i      i   i   i   i";
3407
 
3408
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
3409
                          "  0   0   x   x      x   x   x   x",
3410
                          "  x   x  a5  a4     a3  a2  a1  a0",
3411
                          "  i   i   i   i      i   i   i   i";
3412
 
3413
        writepage       = "  0   1   0   0      1   1   0   0",
3414
                          "  0   0 a13 a12    a11 a10  a9  a8",
3415
                          " a7  a6   x   x      x   x   x   x",
3416
                          "  x   x   x   x      x   x   x   x";
3417
 
3418
	mode		= 0x21;
3419
	delay		= 6;
3420
	blocksize	= 128;
3421
	readsize	= 256;
3422
      ;
3423
 
3424
    memory "lock"
3425
        size            = 1;
3426
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
3427
                          "x x x x  x x x x   x x o o  o o o o";
3428
 
3429
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
3430
                          "x x x x  x x x x   1 1 i i  i i i i";
3431
        min_write_delay = 9000;
3432
        max_write_delay = 9000;
3433
      ;
3434
 
3435
    memory "lfuse"
3436
        size            = 1;
3437
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
3438
                          "x x x x  x x x x   o o o o  o o o o";
3439
 
3440
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
3441
                          "x x x x  x x x x   i i i i  i i i i";
3442
        min_write_delay = 9000;
3443
        max_write_delay = 9000;
3444
      ;
3445
 
3446
    memory "hfuse"
3447
        size            = 1;
3448
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
3449
                          "x x x x  x x x x   o o o o  o o o o";
3450
 
3451
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
3452
                          "x x x x  x x x x   i i i i  i i i i";
3453
        min_write_delay = 9000;
3454
        max_write_delay = 9000;
3455
      ;
3456
    memory "signature"
3457
        size            = 3;
3458
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
3459
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
3460
      ;
3461
    memory "calibration"
3462
        size            = 4;
3463
 
3464
        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
3465
                          "0 0 0 0  0 0 a1 a0 o o o o  o o o o";
3466
        ;
3467
  ;
3468
 
3469
 
3470
#------------------------------------------------------------
3471
# ATmega164P
3472
#------------------------------------------------------------
3473
 
3474
# close to ATmega16
3475
 
3476
part
3477
    id               = "m164p";
3478
    desc             = "ATMEGA164P";
3479
    has_jtag         = yes;
3480
    stk500_devcode   = 0x82; # no STK500v1 support, use the ATmega16 one
3481
    avr910_devcode   = 0x74;
3482
    signature        = 0x1e 0x94 0x0a;
3483
    pagel            = 0xd7;
3484
    bs2              = 0xa0;
3485
    chip_erase_delay = 9000;
3486
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
3487
                       "x x x x  x x x x    x x x x  x x x x";
3488
 
3489
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
3490
                       "x x x x  x x x x    x x x x  x x x x";
3491
 
3492
    timeout		= 200;
3493
    stabdelay		= 100;
3494
    cmdexedelay		= 25;
3495
    synchloops		= 32;
3496
    bytedelay		= 0;
3497
    pollindex		= 3;
3498
    pollvalue		= 0x53;
3499
    predelay		= 1;
3500
    postdelay		= 1;
3501
    pollmethod		= 0;
3502
 
3503
    pp_controlstack     =
3504
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
3505
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
3506
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
3507
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
3508
    hventerstabdelay    = 100;
3509
    progmodedelay       = 0;
3510
    latchcycles         = 5;
3511
    togglevtg           = 1;
3512
    poweroffdelay       = 15;
3513
    resetdelayms        = 1;
3514
    resetdelayus        = 0;
3515
    hvleavestabdelay    = 15;
3516
    chiperasepulsewidth = 0;
3517
    chiperasepolltimeout = 10;
3518
    programfusepulsewidth = 0;
3519
    programfusepolltimeout = 5;
3520
    programlockpulsewidth = 0;
3521
    programlockpolltimeout = 5;
3522
 
3523
    idr                 = 0x31;
3524
    spmcr               = 0x57;
3525
    allowfullpagebitstream = no;
3526
 
3527
    memory "eeprom"
3528
        paged           = no; /* leave this "no" */
3529
        page_size       = 4;  /* for parallel programming */
3530
        size            = 512;
3531
        min_write_delay = 9000;
3532
        max_write_delay = 9000;
3533
        readback_p1     = 0xff;
3534
        readback_p2     = 0xff;
3535
	read            = "  1   0   1   0      0   0   0   0",
3536
                          "  0   0   x   x      x   x  a9  a8",
3537
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3538
                          "  o   o   o   o      o   o   o   o";
3539
 
3540
	write           = "  1   1   0   0      0   0   0   0",
3541
                          "  0   0   x   x      x   x  a9  a8",
3542
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3543
                          "  i   i   i   i      i   i   i   i";
3544
 
3545
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
3546
			  "  0   0   0   0      0   0   0   0",
3547
			  "  0   0   0   0      0   0  a1  a0",
3548
			  "  i   i   i   i      i   i   i   i";
3549
 
3550
	writepage	= "  1   1   0   0      0   0   1   0",
3551
			  "  0   0   x   x      x   x  a9  a8",
3552
			  " a7  a6  a5  a4     a3  a2   0   0",
3553
			  "  x   x   x   x      x   x   x   x";
3554
 
3555
	mode		= 0x41;
3556
	delay		= 10;
3557
	blocksize	= 128;
3558
	readsize	= 256;
3559
      ;
3560
 
3561
    memory "flash"
3562
        paged           = yes;
3563
        size            = 16384;
3564
        page_size       = 128;
3565
        num_pages       = 128;
3566
        min_write_delay = 4500;
3567
        max_write_delay = 4500;
3568
        readback_p1     = 0xff;
3569
        readback_p2     = 0xff;
3570
        read_lo         = "  0   0   1   0      0   0   0   0",
3571
                          "  0   0 a13 a12    a11 a10  a9  a8",
3572
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3573
                          "  o   o   o   o      o   o   o   o";
3574
 
3575
        read_hi         = "  0   0   1   0      1   0   0   0",
3576
                          "  0   0 a13 a12    a11 a10  a9  a8",
3577
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3578
                          "  o   o   o   o      o   o   o   o";
3579
 
3580
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
3581
                          "  0   0   x   x      x   x   x   x",
3582
                          "  x   x  a5  a4     a3  a2  a1  a0",
3583
                          "  i   i   i   i      i   i   i   i";
3584
 
3585
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
3586
                          "  0   0   x   x      x   x   x   x",
3587
                          "  x   x  a5  a4     a3  a2  a1  a0",
3588
                          "  i   i   i   i      i   i   i   i";
3589
 
3590
        writepage       = "  0   1   0   0      1   1   0   0",
3591
                          "  0   0 a13 a12    a11 a10  a9  a8",
3592
                          " a7  a6   x   x      x   x   x   x",
3593
                          "  x   x   x   x      x   x   x   x";
3594
 
3595
	mode		= 0x21;
3596
	delay		= 6;
3597
	blocksize	= 128;
3598
	readsize	= 256;
3599
      ;
3600
 
3601
    memory "lock"
3602
        size            = 1;
3603
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
3604
                          "x x x x  x x x x   x x o o  o o o o";
3605
 
3606
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
3607
                          "x x x x  x x x x   1 1 i i  i i i i";
3608
        min_write_delay = 9000;
3609
        max_write_delay = 9000;
3610
      ;
3611
 
3612
    memory "lfuse"
3613
        size            = 1;
3614
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
3615
                          "x x x x  x x x x   o o o o  o o o o";
3616
 
3617
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
3618
                          "x x x x  x x x x   i i i i  i i i i";
3619
        min_write_delay = 9000;
3620
        max_write_delay = 9000;
3621
      ;
3622
 
3623
    memory "hfuse"
3624
        size            = 1;
3625
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
3626
                          "x x x x  x x x x   o o o o  o o o o";
3627
 
3628
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
3629
                          "x x x x  x x x x   i i i i  i i i i";
3630
        min_write_delay = 9000;
3631
        max_write_delay = 9000;
3632
      ;
3633
 
3634
    memory "efuse"
3635
        size            = 1;
3636
 
3637
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
3638
                          "x x x x  x x x x  o o o o  o o o o";
3639
 
3640
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
3641
                          "x x x x  x x x x  1 1 1 1  1 i i i";
3642
        min_write_delay = 9000;
3643
        max_write_delay = 9000;
3644
      ;
3645
 
3646
    memory "signature"
3647
        size            = 3;
3648
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
3649
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
3650
      ;
3651
 
3652
    memory "calibration"
3653
        size            = 1;
3654
 
3655
        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
3656
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
3657
        ;
3658
  ;
3659
 
3660
 
3661
#------------------------------------------------------------
3662
# ATmega324P
3663
#------------------------------------------------------------
3664
 
3665
# similar to ATmega164P
3666
 
3667
part
3668
    id               = "m324p";
3669
    desc             = "ATMEGA324P";
3670
    has_jtag         = yes;
3671
    stk500_devcode   = 0x82; # no STK500v1 support, use the ATmega16 one
3672
    avr910_devcode   = 0x74;
3673
    signature        = 0x1e 0x95 0x08;
3674
    pagel            = 0xd7;
3675
    bs2              = 0xa0;
3676
    chip_erase_delay = 9000;
3677
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
3678
                       "x x x x  x x x x    x x x x  x x x x";
3679
 
3680
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
3681
                       "x x x x  x x x x    x x x x  x x x x";
3682
 
3683
    timeout		= 200;
3684
    stabdelay		= 100;
3685
    cmdexedelay		= 25;
3686
    synchloops		= 32;
3687
    bytedelay		= 0;
3688
    pollindex		= 3;
3689
    pollvalue		= 0x53;
3690
    predelay		= 1;
3691
    postdelay		= 1;
3692
    pollmethod		= 0;
3693
 
3694
    pp_controlstack     =
3695
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
3696
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
3697
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
3698
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
3699
    hventerstabdelay    = 100;
3700
    progmodedelay       = 0;
3701
    latchcycles         = 5;
3702
    togglevtg           = 1;
3703
    poweroffdelay       = 15;
3704
    resetdelayms        = 1;
3705
    resetdelayus        = 0;
3706
    hvleavestabdelay    = 15;
3707
    chiperasepulsewidth = 0;
3708
    chiperasepolltimeout = 10;
3709
    programfusepulsewidth = 0;
3710
    programfusepolltimeout = 5;
3711
    programlockpulsewidth = 0;
3712
    programlockpolltimeout = 5;
3713
 
3714
    idr                 = 0x31;
3715
    spmcr               = 0x57;
3716
    allowfullpagebitstream = no;
3717
 
3718
    memory "eeprom"
3719
        paged           = no; /* leave this "no" */
3720
        page_size       = 4;  /* for parallel programming */
3721
        size            = 1024;
3722
        min_write_delay = 9000;
3723
        max_write_delay = 9000;
3724
        readback_p1     = 0xff;
3725
        readback_p2     = 0xff;
3726
	read            = "  1   0   1   0      0   0   0   0",
3727
                          "  0   0   x   x      x a10  a9  a8",
3728
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3729
                          "  o   o   o   o      o   o   o   o";
3730
 
3731
	write           = "  1   1   0   0      0   0   0   0",
3732
                          "  0   0   x   x      x a10  a9  a8",
3733
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3734
                          "  i   i   i   i      i   i   i   i";
3735
 
3736
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
3737
			  "  0   0   0   0      0   0   0   0",
3738
			  "  0   0   0   0      0   0  a1  a0",
3739
			  "  i   i   i   i      i   i   i   i";
3740
 
3741
	writepage	= "  1   1   0   0      0   0   1   0",
3742
			  "  0   0   x   x      x a10  a9  a8",
3743
			  " a7  a6  a5  a4     a3  a2   0   0",
3744
			  "  x   x   x   x      x   x   x   x";
3745
 
3746
	mode		= 0x41;
3747
	delay		= 10;
3748
	blocksize	= 128;
3749
	readsize	= 256;
3750
      ;
3751
 
3752
    memory "flash"
3753
        paged           = yes;
3754
        size            = 32768;
3755
        page_size       = 128;
3756
        num_pages       = 256;
3757
        min_write_delay = 4500;
3758
        max_write_delay = 4500;
3759
        readback_p1     = 0xff;
3760
        readback_p2     = 0xff;
3761
        read_lo         = "  0   0   1   0      0   0   0   0",
3762
                          "  0 a14 a13 a12    a11 a10  a9  a8",
3763
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3764
                          "  o   o   o   o      o   o   o   o";
3765
 
3766
        read_hi         = "  0   0   1   0      1   0   0   0",
3767
                          "  0 a14 a13 a12    a11 a10  a9  a8",
3768
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3769
                          "  o   o   o   o      o   o   o   o";
3770
 
3771
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
3772
                          "  0   0   x   x      x   x   x   x",
3773
                          "  x   x  a5  a4     a3  a2  a1  a0",
3774
                          "  i   i   i   i      i   i   i   i";
3775
 
3776
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
3777
                          "  0   0   x   x      x   x   x   x",
3778
                          "  x   x  a5  a4     a3  a2  a1  a0",
3779
                          "  i   i   i   i      i   i   i   i";
3780
 
3781
        writepage       = "  0   1   0   0      1   1   0   0",
3782
                          "  0 a14 a13 a12    a11 a10  a9  a8",
3783
                          " a7  a6   x   x      x   x   x   x",
3784
                          "  x   x   x   x      x   x   x   x";
3785
 
3786
	mode		= 0x21;
3787
	delay		= 6;
3788
	blocksize	= 256;
3789
	readsize	= 256;
3790
      ;
3791
 
3792
    memory "lock"
3793
        size            = 1;
3794
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
3795
                          "x x x x  x x x x   x x o o  o o o o";
3796
 
3797
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
3798
                          "x x x x  x x x x   1 1 i i  i i i i";
3799
        min_write_delay = 9000;
3800
        max_write_delay = 9000;
3801
      ;
3802
 
3803
    memory "lfuse"
3804
        size            = 1;
3805
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
3806
                          "x x x x  x x x x   o o o o  o o o o";
3807
 
3808
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
3809
                          "x x x x  x x x x   i i i i  i i i i";
3810
        min_write_delay = 9000;
3811
        max_write_delay = 9000;
3812
      ;
3813
 
3814
    memory "hfuse"
3815
        size            = 1;
3816
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
3817
                          "x x x x  x x x x   o o o o  o o o o";
3818
 
3819
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
3820
                          "x x x x  x x x x   i i i i  i i i i";
3821
        min_write_delay = 9000;
3822
        max_write_delay = 9000;
3823
      ;
3824
 
3825
    memory "efuse"
3826
        size            = 1;
3827
 
3828
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
3829
                          "x x x x  x x x x  o o o o  o o o o";
3830
 
3831
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
3832
                          "x x x x  x x x x  1 1 1 1  1 i i i";
3833
        min_write_delay = 9000;
3834
        max_write_delay = 9000;
3835
      ;
3836
 
3837
    memory "signature"
3838
        size            = 3;
3839
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
3840
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
3841
      ;
3842
 
3843
    memory "calibration"
3844
        size            = 1;
3845
 
3846
        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
3847
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
3848
        ;
3849
  ;
3850
 
3851
 
3852
#------------------------------------------------------------
3853
# ATmega644
3854
#------------------------------------------------------------
3855
 
3856
# similar to ATmega164
3857
 
3858
part
3859
    id               = "m644";
3860
    desc             = "ATMEGA644";
3861
    has_jtag         = yes;
3862
    stk500_devcode   = 0x82; # no STK500v1 support, use the ATmega16 one
3863
    avr910_devcode   = 0x74;
3864
    signature        = 0x1e 0x96 0x09;
3865
    pagel            = 0xd7;
3866
    bs2              = 0xa0;
3867
    chip_erase_delay = 9000;
3868
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
3869
                       "x x x x  x x x x    x x x x  x x x x";
3870
 
3871
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
3872
                       "x x x x  x x x x    x x x x  x x x x";
3873
 
3874
    timeout		= 200;
3875
    stabdelay		= 100;
3876
    cmdexedelay		= 25;
3877
    synchloops		= 32;
3878
    bytedelay		= 0;
3879
    pollindex		= 3;
3880
    pollvalue		= 0x53;
3881
    predelay		= 1;
3882
    postdelay		= 1;
3883
    pollmethod		= 0;
3884
 
3885
    pp_controlstack     =
3886
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
3887
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
3888
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
3889
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
3890
    hventerstabdelay    = 100;
3891
    progmodedelay       = 0;
3892
    latchcycles         = 6;
3893
    togglevtg           = 0;
3894
    poweroffdelay       = 0;
3895
    resetdelayms        = 0;
3896
    resetdelayus        = 0;
3897
    hvleavestabdelay    = 15;
3898
    chiperasepulsewidth = 0;
3899
    chiperasepolltimeout = 10;
3900
    programfusepulsewidth = 0;
3901
    programfusepolltimeout = 5;
3902
    programlockpulsewidth = 0;
3903
    programlockpolltimeout = 5;
3904
 
3905
    idr                 = 0x31;
3906
    spmcr               = 0x57;
3907
    allowfullpagebitstream = no;
3908
 
3909
    memory "eeprom"
3910
        paged           = no; /* leave this "no" */
3911
        page_size       = 8;  /* for parallel programming */
3912
        size            = 2048;
3913
        min_write_delay = 9000;
3914
        max_write_delay = 9000;
3915
        readback_p1     = 0xff;
3916
        readback_p2     = 0xff;
3917
	read            = "  1   0   1   0      0   0   0   0",
3918
                          "  0   0   x   x    a11 a10  a9  a8",
3919
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3920
                          "  o   o   o   o      o   o   o   o";
3921
 
3922
	write           = "  1   1   0   0      0   0   0   0",
3923
                          "  0   0   x   x    a11 a10  a9  a8",
3924
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3925
                          "  i   i   i   i      i   i   i   i";
3926
 
3927
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
3928
			  "  0   0   0   0      0   0   0   0",
3929
			  "  0   0   0   0      0  a2  a1  a0",
3930
			  "  i   i   i   i      i   i   i   i";
3931
 
3932
	writepage	= "  1   1   0   0      0   0   1   0",
3933
			  "  0   0   x   x    a11 a10  a9  a8",
3934
			  " a7  a6  a5  a4     a3   0   0   0",
3935
			  "  x   x   x   x      x   x   x   x";
3936
 
3937
	mode		= 0x41;
3938
	delay		= 10;
3939
	blocksize	= 128;
3940
	readsize	= 256;
3941
      ;
3942
 
3943
    memory "flash"
3944
        paged           = yes;
3945
        size            = 65536;
3946
        page_size       = 256;
3947
        num_pages       = 256;
3948
        min_write_delay = 4500;
3949
        max_write_delay = 4500;
3950
        readback_p1     = 0xff;
3951
        readback_p2     = 0xff;
3952
        read_lo         = "  0   0   1   0      0   0   0   0",
3953
                          "a15 a14 a13 a12    a11 a10  a9  a8",
3954
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3955
                          "  o   o   o   o      o   o   o   o";
3956
 
3957
        read_hi         = "  0   0   1   0      1   0   0   0",
3958
                          "a15 a14 a13 a12    a11 a10  a9  a8",
3959
                          " a7  a6  a5  a4     a3  a2  a1  a0",
3960
                          "  o   o   o   o      o   o   o   o";
3961
 
3962
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
3963
                          "  0   0   x   x      x   x   x   x",
3964
                          "  x  a6  a5  a4     a3  a2  a1  a0",
3965
                          "  i   i   i   i      i   i   i   i";
3966
 
3967
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
3968
                          "  0   0   x   x      x   x   x   x",
3969
                          "  x  a6  a5  a4     a3  a2  a1  a0",
3970
                          "  i   i   i   i      i   i   i   i";
3971
 
3972
        writepage       = "  0   1   0   0      1   1   0   0",
3973
                          "a15 a14 a13 a12    a11 a10  a9  a8",
3974
                          " a7   x   x   x      x   x   x   x",
3975
                          "  x   x   x   x      x   x   x   x";
3976
 
3977
	mode		= 0x21;
3978
	delay		= 6;
3979
	blocksize	= 256;
3980
	readsize	= 256;
3981
      ;
3982
 
3983
    memory "lock"
3984
        size            = 1;
3985
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
3986
                          "x x x x  x x x x   x x o o  o o o o";
3987
 
3988
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
3989
                          "x x x x  x x x x   1 1 i i  i i i i";
3990
        min_write_delay = 9000;
3991
        max_write_delay = 9000;
3992
      ;
3993
 
3994
    memory "lfuse"
3995
        size            = 1;
3996
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
3997
                          "x x x x  x x x x   o o o o  o o o o";
3998
 
3999
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
4000
                          "x x x x  x x x x   i i i i  i i i i";
4001
        min_write_delay = 9000;
4002
        max_write_delay = 9000;
4003
      ;
4004
 
4005
    memory "hfuse"
4006
        size            = 1;
4007
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
4008
                          "x x x x  x x x x   o o o o  o o o o";
4009
 
4010
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
4011
                          "x x x x  x x x x   i i i i  i i i i";
4012
        min_write_delay = 9000;
4013
        max_write_delay = 9000;
4014
      ;
4015
 
4016
    memory "efuse"
4017
        size            = 1;
4018
 
4019
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
4020
                          "x x x x  x x x x  o o o o  o o o o";
4021
 
4022
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
4023
                          "x x x x  x x x x  1 1 1 1  1 i i i";
4024
        min_write_delay = 9000;
4025
        max_write_delay = 9000;
4026
      ;
4027
 
4028
    memory "signature"
4029
        size            = 3;
4030
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
4031
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
4032
      ;
4033
 
4034
    memory "calibration"
4035
        size            = 1;
4036
 
4037
        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
4038
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
4039
        ;
4040
  ;
4041
 
4042
#------------------------------------------------------------
4043
# ATmega644P
4044
#------------------------------------------------------------
4045
 
4046
# similar to ATmega164p
4047
 
4048
part
4049
    id               = "m644p";
4050
    desc             = "ATMEGA644P";
4051
    has_jtag         = yes;
4052
    stk500_devcode   = 0x82; # no STK500v1 support, use the ATmega16 one
4053
    avr910_devcode   = 0x74;
4054
    signature        = 0x1e 0x96 0x0a;
4055
    pagel            = 0xd7;
4056
    bs2              = 0xa0;
4057
    chip_erase_delay = 9000;
4058
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
4059
                       "x x x x  x x x x    x x x x  x x x x";
4060
 
4061
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
4062
                       "x x x x  x x x x    x x x x  x x x x";
4063
 
4064
    timeout		= 200;
4065
    stabdelay		= 100;
4066
    cmdexedelay		= 25;
4067
    synchloops		= 32;
4068
    bytedelay		= 0;
4069
    pollindex		= 3;
4070
    pollvalue		= 0x53;
4071
    predelay		= 1;
4072
    postdelay		= 1;
4073
    pollmethod		= 0;
4074
 
4075
    pp_controlstack     =
4076
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
4077
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
4078
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
4079
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
4080
    hventerstabdelay    = 100;
4081
    progmodedelay       = 0;
4082
    latchcycles         = 6;
4083
    togglevtg           = 0;
4084
    poweroffdelay       = 0;
4085
    resetdelayms        = 0;
4086
    resetdelayus        = 0;
4087
    hvleavestabdelay    = 15;
4088
    chiperasepulsewidth = 0;
4089
    chiperasepolltimeout = 10;
4090
    programfusepulsewidth = 0;
4091
    programfusepolltimeout = 5;
4092
    programlockpulsewidth = 0;
4093
    programlockpolltimeout = 5;
4094
 
4095
    idr                 = 0x31;
4096
    spmcr               = 0x57;
4097
    allowfullpagebitstream = no;
4098
 
4099
    memory "eeprom"
4100
        paged           = no; /* leave this "no" */
4101
        page_size       = 8;  /* for parallel programming */
4102
        size            = 2048;
4103
        min_write_delay = 9000;
4104
        max_write_delay = 9000;
4105
        readback_p1     = 0xff;
4106
        readback_p2     = 0xff;
4107
	read            = "  1   0   1   0      0   0   0   0",
4108
                          "  0   0   x   x    a11 a10  a9  a8",
4109
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4110
                          "  o   o   o   o      o   o   o   o";
4111
 
4112
	write           = "  1   1   0   0      0   0   0   0",
4113
                          "  0   0   x   x    a11 a10  a9  a8",
4114
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4115
                          "  i   i   i   i      i   i   i   i";
4116
 
4117
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
4118
			  "  0   0   0   0      0   0   0   0",
4119
			  "  0   0   0   0      0  a2  a1  a0",
4120
			  "  i   i   i   i      i   i   i   i";
4121
 
4122
	writepage	= "  1   1   0   0      0   0   1   0",
4123
			  "  0   0   x   x    a11 a10  a9  a8",
4124
			  " a7  a6  a5  a4     a3   0   0   0",
4125
			  "  x   x   x   x      x   x   x   x";
4126
 
4127
	mode		= 0x41;
4128
	delay		= 10;
4129
	blocksize	= 128;
4130
	readsize	= 256;
4131
      ;
4132
 
4133
    memory "flash"
4134
        paged           = yes;
4135
        size            = 65536;
4136
        page_size       = 256;
4137
        num_pages       = 256;
4138
        min_write_delay = 4500;
4139
        max_write_delay = 4500;
4140
        readback_p1     = 0xff;
4141
        readback_p2     = 0xff;
4142
        read_lo         = "  0   0   1   0      0   0   0   0",
4143
                          "a15 a14 a13 a12    a11 a10  a9  a8",
4144
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4145
                          "  o   o   o   o      o   o   o   o";
4146
 
4147
        read_hi         = "  0   0   1   0      1   0   0   0",
4148
                          "a15 a14 a13 a12    a11 a10  a9  a8",
4149
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4150
                          "  o   o   o   o      o   o   o   o";
4151
 
4152
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
4153
                          "  0   0   x   x      x   x   x   x",
4154
                          "  x  a6  a5  a4     a3  a2  a1  a0",
4155
                          "  i   i   i   i      i   i   i   i";
4156
 
4157
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
4158
                          "  0   0   x   x      x   x   x   x",
4159
                          "  x  a6  a5  a4     a3  a2  a1  a0",
4160
                          "  i   i   i   i      i   i   i   i";
4161
 
4162
        writepage       = "  0   1   0   0      1   1   0   0",
4163
                          "a15 a14 a13 a12    a11 a10  a9  a8",
4164
                          " a7   x   x   x      x   x   x   x",
4165
                          "  x   x   x   x      x   x   x   x";
4166
 
4167
	mode		= 0x21;
4168
	delay		= 6;
4169
	blocksize	= 256;
4170
	readsize	= 256;
4171
      ;
4172
 
4173
    memory "lock"
4174
        size            = 1;
4175
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
4176
                          "x x x x  x x x x   x x o o  o o o o";
4177
 
4178
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
4179
                          "x x x x  x x x x   1 1 i i  i i i i";
4180
        min_write_delay = 9000;
4181
        max_write_delay = 9000;
4182
      ;
4183
 
4184
    memory "lfuse"
4185
        size            = 1;
4186
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
4187
                          "x x x x  x x x x   o o o o  o o o o";
4188
 
4189
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
4190
                          "x x x x  x x x x   i i i i  i i i i";
4191
        min_write_delay = 9000;
4192
        max_write_delay = 9000;
4193
      ;
4194
 
4195
    memory "hfuse"
4196
        size            = 1;
4197
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
4198
                          "x x x x  x x x x   o o o o  o o o o";
4199
 
4200
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
4201
                          "x x x x  x x x x   i i i i  i i i i";
4202
        min_write_delay = 9000;
4203
        max_write_delay = 9000;
4204
      ;
4205
 
4206
    memory "efuse"
4207
        size            = 1;
4208
 
4209
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
4210
                          "x x x x  x x x x  o o o o  o o o o";
4211
 
4212
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
4213
                          "x x x x  x x x x  1 1 1 1  1 i i i";
4214
        min_write_delay = 9000;
4215
        max_write_delay = 9000;
4216
      ;
4217
 
4218
    memory "signature"
4219
        size            = 3;
4220
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
4221
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
4222
      ;
4223
 
4224
    memory "calibration"
4225
        size            = 1;
4226
 
4227
        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
4228
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
4229
        ;
4230
  ;
4231
 
4232
 
4233
 
4234
#------------------------------------------------------------
4235
# ATmega1284P
4236
#------------------------------------------------------------
4237
 
4238
# similar to ATmega164p
4239
 
4240
part
4241
    id               = "m1284p";
4242
    desc             = "ATMEGA1284P";
4243
    has_jtag         = yes;
4244
    stk500_devcode   = 0x82; # no STK500v1 support, use the ATmega16 one
4245
    avr910_devcode   = 0x74;
4246
    signature        = 0x1e 0x97 0x05;
4247
    pagel            = 0xd7;
4248
    bs2              = 0xa0;
4249
    chip_erase_delay = 9000;
4250
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
4251
                       "x x x x  x x x x    x x x x  x x x x";
4252
 
4253
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
4254
                       "x x x x  x x x x    x x x x  x x x x";
4255
 
4256
    timeout		= 200;
4257
    stabdelay		= 100;
4258
    cmdexedelay		= 25;
4259
    synchloops		= 32;
4260
    bytedelay		= 0;
4261
    pollindex		= 3;
4262
    pollvalue		= 0x53;
4263
    predelay		= 1;
4264
    postdelay		= 1;
4265
    pollmethod		= 1;
4266
 
4267
    pp_controlstack     =
4268
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
4269
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
4270
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
4271
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
4272
    hventerstabdelay    = 100;
4273
    progmodedelay       = 0;
4274
    latchcycles         = 6;
4275
    togglevtg           = 1;
4276
    poweroffdelay       = 15;
4277
    resetdelayms        = 1;
4278
    resetdelayus        = 0;
4279
    hvleavestabdelay    = 15;
4280
    chiperasepulsewidth = 0;
4281
    chiperasepolltimeout = 10;
4282
    programfusepulsewidth = 0;
4283
    programfusepolltimeout = 5;
4284
    programlockpulsewidth = 0;
4285
    programlockpolltimeout = 5;
4286
 
4287
    idr                 = 0x31;
4288
    spmcr               = 0x57;
4289
    allowfullpagebitstream = no;
4290
 
4291
    memory "eeprom"
4292
        paged           = no; /* leave this "no" */
4293
        page_size       = 8;  /* for parallel programming */
4294
        size            = 4096;
4295
        min_write_delay = 9000;
4296
        max_write_delay = 9000;
4297
        readback_p1     = 0xff;
4298
        readback_p2     = 0xff;
4299
	read            = "  1   0   1   0      0   0   0   0",
4300
                          "  0   0   x   x    a11 a10  a9  a8",
4301
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4302
                          "  o   o   o   o      o   o   o   o";
4303
 
4304
	write           = "  1   1   0   0      0   0   0   0",
4305
                          "  0   0   x   x    a11 a10  a9  a8",
4306
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4307
                          "  i   i   i   i      i   i   i   i";
4308
 
4309
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
4310
			  "  0   0   0   0      0   0   0   0",
4311
			  "  0   0   0   0      0  a2  a1  a0",
4312
			  "  i   i   i   i      i   i   i   i";
4313
 
4314
	writepage	= "  1   1   0   0      0   0   1   0",
4315
			  "  0   0   x   x    a11 a10  a9  a8",
4316
			  " a7  a6  a5  a4     a3   0   0   0",
4317
			  "  x   x   x   x      x   x   x   x";
4318
 
4319
	mode		= 0x41;
4320
	delay		= 10;
4321
	blocksize	= 128;
4322
	readsize	= 256;
4323
      ;
4324
 
4325
    memory "flash"
4326
        paged           = yes;
4327
        size            = 131072;
4328
        page_size       = 256;
4329
        num_pages       = 512;
4330
        min_write_delay = 4500;
4331
        max_write_delay = 4500;
4332
        readback_p1     = 0xff;
4333
        readback_p2     = 0xff;
4334
        read_lo         = "  0   0   1   0      0   0   0   0",
4335
                          "a15 a14 a13 a12    a11 a10  a9  a8",
4336
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4337
                          "  o   o   o   o      o   o   o   o";
4338
 
4339
        read_hi         = "  0   0   1   0      1   0   0   0",
4340
                          "a15 a14 a13 a12    a11 a10  a9  a8",
4341
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4342
                          "  o   o   o   o      o   o   o   o";
4343
 
4344
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
4345
                          "  0   0   x   x      x   x   x   x",
4346
                          "  x  a6  a5  a4     a3  a2  a1  a0",
4347
                          "  i   i   i   i      i   i   i   i";
4348
 
4349
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
4350
                          "  0   0   x   x      x   x   x   x",
4351
                          "  x  a6  a5  a4     a3  a2  a1  a0",
4352
                          "  i   i   i   i      i   i   i   i";
4353
 
4354
        writepage       = "  0   1   0   0      1   1   0   0",
4355
                          "a15 a14 a13 a12    a11 a10  a9  a8",
4356
                          " a7   x   x   x      x   x   x   x",
4357
                          "  x   x   x   x      x   x   x   x";
4358
 
4359
	mode		= 0x41;
4360
	delay		= 10;
4361
	blocksize	= 256;
4362
	readsize	= 256;
4363
      ;
4364
 
4365
    memory "lock"
4366
        size            = 1;
4367
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
4368
                          "x x x x  x x x x   x x o o  o o o o";
4369
 
4370
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
4371
                          "x x x x  x x x x   1 1 i i  i i i i";
4372
        min_write_delay = 9000;
4373
        max_write_delay = 9000;
4374
      ;
4375
 
4376
    memory "lfuse"
4377
        size            = 1;
4378
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
4379
                          "x x x x  x x x x   o o o o  o o o o";
4380
 
4381
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
4382
                          "x x x x  x x x x   i i i i  i i i i";
4383
        min_write_delay = 9000;
4384
        max_write_delay = 9000;
4385
      ;
4386
 
4387
    memory "hfuse"
4388
        size            = 1;
4389
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
4390
                          "x x x x  x x x x   o o o o  o o o o";
4391
 
4392
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
4393
                          "x x x x  x x x x   i i i i  i i i i";
4394
        min_write_delay = 9000;
4395
        max_write_delay = 9000;
4396
      ;
4397
 
4398
    memory "efuse"
4399
        size            = 1;
4400
 
4401
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
4402
                          "x x x x  x x x x  o o o o  o o o o";
4403
 
4404
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
4405
                          "x x x x  x x x x  1 1 1 1  1 i i i";
4406
        min_write_delay = 9000;
4407
        max_write_delay = 9000;
4408
      ;
4409
 
4410
    memory "signature"
4411
        size            = 3;
4412
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
4413
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
4414
      ;
4415
 
4416
    memory "calibration"
4417
        size            = 1;
4418
 
4419
        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
4420
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
4421
        ;
4422
  ;
4423
 
4424
 
4425
 
4426
#------------------------------------------------------------
4427
# ATmega162
4428
#------------------------------------------------------------
4429
 
4430
part
4431
    id               = "m162";
4432
    desc             = "ATMEGA162";
4433
    has_jtag         = yes;
4434
    stk500_devcode   = 0x83;
4435
    avr910_devcode   = 0x63;
4436
    signature        = 0x1e 0x94 0x04;
4437
    chip_erase_delay = 9000;
4438
    pagel            = 0xd7;
4439
    bs2              = 0xa0;
4440
 
4441
    idr              = 0x04;
4442
    spmcr            = 0x57;
4443
    allowfullpagebitstream = yes;
4444
 
4445
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
4446
                       "x x x x  x x x x    x x x x  x x x x";
4447
 
4448
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
4449
                       "x x x x  x x x x    x x x x  x x x x";
4450
 
4451
    memory "flash"
4452
        paged           = yes;
4453
        size            = 16384;
4454
        page_size       = 128;
4455
        num_pages       = 128;
4456
        min_write_delay = 4500;
4457
        max_write_delay = 4500;
4458
        readback_p1     = 0xff;
4459
        readback_p2     = 0xff;
4460
 
4461
        read_lo         = "  0   0   1   0      0   0   0   0",
4462
                          "  0   0 a13 a12    a11 a10  a9  a8",
4463
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4464
                          "  o   o   o   o      o   o   o   o";
4465
 
4466
        read_hi         = "  0   0   1   0      1   0   0   0",
4467
                          "  0   0 a13 a12    a11 a10  a9  a8",
4468
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4469
                          "  o   o   o   o      o   o   o   o";
4470
 
4471
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
4472
                          "  0   0   x   x      x   x   x   x",
4473
                          "  x   x  a5  a4     a3  a2  a1  a0",
4474
                          "  i   i   i   i      i   i   i   i";
4475
 
4476
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
4477
                          "  0   0   x   x      x   x   x   x",
4478
                          "  x   x  a5  a4     a3  a2  a1  a0",
4479
                          "  i   i   i   i      i   i   i   i";
4480
 
4481
        writepage       = "  0   1   0   0      1   1   0   0",
4482
                          "  0   0 a13 a12    a11 a10  a9  a8",
4483
                          " a7  a6   x   x      x   x   x   x",
4484
                          "  x   x   x   x      x   x   x   x";
4485
       mode        = 0x41;
4486
    delay       = 10;
4487
    blocksize   = 128;
4488
    readsize    = 256;
4489
 
4490
        ;
4491
 
4492
    timeout		= 200;
4493
    stabdelay		= 100;
4494
    cmdexedelay		= 25;
4495
    synchloops		= 32;
4496
    bytedelay		= 0;
4497
    pollindex		= 3;
4498
    pollvalue		= 0x53;
4499
    predelay		= 1;
4500
    postdelay		= 1;
4501
    pollmethod		= 0;
4502
 
4503
    pp_controlstack     =
4504
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
4505
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
4506
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
4507
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
4508
    hventerstabdelay    = 100;
4509
    progmodedelay       = 0;
4510
    latchcycles         = 6;
4511
    togglevtg           = 0;
4512
    poweroffdelay       = 0;
4513
    resetdelayms        = 0;
4514
    resetdelayus        = 0;
4515
    hvleavestabdelay    = 15;
4516
    chiperasepulsewidth = 0;
4517
    chiperasepolltimeout = 10;
4518
    programfusepulsewidth = 0;
4519
    programfusepolltimeout = 5;
4520
    programlockpulsewidth = 0;
4521
    programlockpolltimeout = 5;
4522
 
4523
    memory "eeprom"
4524
        paged           = no; /* leave this "no" */
4525
        page_size       = 4;  /* for parallel programming */
4526
        size            = 512;
4527
        min_write_delay = 9000;
4528
        max_write_delay = 9000;
4529
        readback_p1     = 0xff;
4530
        readback_p2     = 0xff;
4531
 
4532
                read            = "  1   0   1   0      0   0   0   0",
4533
                          "  0   0   x   x      x   x  a9  a8",
4534
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4535
                          "  o   o   o   o      o   o   o   o";
4536
 
4537
                write           = "  1   1   0   0      0   0   0   0",
4538
                          "  0   0   x   x      x   x  a9  a8",
4539
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4540
                          "  i   i   i   i      i   i   i   i";
4541
 
4542
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
4543
			  "  0   0   0   0      0   0   0   0",
4544
			  "  0   0   0   0      0   0  a1  a0",
4545
			  "  i   i   i   i      i   i   i   i";
4546
 
4547
	writepage	= "  1   1   0   0      0   0   1   0",
4548
			  "  0   0   x   x      x   x  a9  a8",
4549
			  " a7  a6  a5  a4     a3  a2   0   0",
4550
			  "  x   x   x   x      x   x   x   x";
4551
 
4552
	mode		= 0x41;
4553
	delay		= 20;
4554
	blocksize	= 4;
4555
	readsize	= 256;
4556
        ;
4557
 
4558
    memory "lfuse"
4559
        size            = 1;
4560
        min_write_delay = 16000;
4561
        max_write_delay = 16000;
4562
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
4563
                          "x x x x  x x x x   o o o o  o o o o";
4564
 
4565
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
4566
                          "x x x x  x x x x   i i i i  i i i i";
4567
        ;
4568
 
4569
    memory "hfuse"
4570
        size            = 1;
4571
        min_write_delay = 16000;
4572
        max_write_delay = 16000;
4573
 
4574
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
4575
                          "x x x x  x x x x   o o o o  o o o o";
4576
 
4577
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
4578
                          "x x x x  x x x x   i i i i  i i i i";
4579
        ;
4580
 
4581
    memory "efuse"
4582
        size            = 1;
4583
        min_write_delay = 16000;
4584
        max_write_delay = 16000;
4585
 
4586
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
4587
                          "x x x x  x x x x  o o o o  o o o o";
4588
 
4589
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
4590
                          "x x x x  x x x x  1 1 1 1  1 i i i";
4591
      ;
4592
 
4593
    memory "lock"
4594
        size            = 1;
4595
        min_write_delay = 16000;
4596
        max_write_delay = 16000;
4597
 
4598
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
4599
                          "x x x x  x x x x   x x o o  o o o o";
4600
 
4601
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
4602
                          "x x x x  x x x x   1 1 i i  i i i i";
4603
        ;
4604
 
4605
    memory "signature"
4606
        size            = 3;
4607
 
4608
        read            = "0  0  1  1   0  0  0  0   0  0  x  x   x  x  x  x",
4609
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
4610
        ;
4611
 
4612
    memory "calibration"
4613
        size            = 1;
4614
 
4615
        read            = "0 0 1 1  1 0 0 0   0 0 x x  x x x x",
4616
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
4617
        ;
4618
;
4619
 
4620
 
4621
 
4622
#------------------------------------------------------------
4623
# ATmega163
4624
#------------------------------------------------------------
4625
 
4626
part
4627
    id               = "m163";
4628
    desc             = "ATMEGA163";
4629
    stk500_devcode   = 0x81;
4630
    avr910_devcode   = 0x64;
4631
    signature        = 0x1e 0x94 0x02;
4632
    chip_erase_delay = 32000;
4633
    pagel            = 0xd7;
4634
    bs2              = 0xa0;
4635
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
4636
                       "x x x x  x x x x    x x x x  x x x x";
4637
 
4638
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
4639
                       "x x x x  x x x x    x x x x  x x x x";
4640
 
4641
    timeout             = 200;
4642
    stabdelay           = 100;
4643
    cmdexedelay         = 25;
4644
    synchloops          = 32;
4645
    bytedelay           = 0;
4646
    pollindex           = 3;
4647
    pollvalue           = 0x53;
4648
    predelay            = 1;
4649
    postdelay           = 1;
4650
    pollmethod          = 0;
4651
 
4652
    pp_controlstack     =
4653
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
4654
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
4655
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
4656
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
4657
    hventerstabdelay    = 100;
4658
    progmodedelay       = 0;
4659
    latchcycles         = 0;
4660
    togglevtg           = 0;
4661
    poweroffdelay       = 0;
4662
    resetdelayms        = 0;
4663
    resetdelayus        = 0;
4664
    hvleavestabdelay    = 15;
4665
    chiperasepulsewidth = 0;
4666
    chiperasepolltimeout = 30;
4667
    programfusepulsewidth = 0;
4668
    programfusepolltimeout = 2;
4669
    programlockpulsewidth = 0;
4670
    programlockpolltimeout = 2;
4671
 
4672
 
4673
   memory "eeprom"
4674
        size            = 512;
4675
        min_write_delay = 4000;
4676
        max_write_delay = 4000;
4677
        readback_p1     = 0xff;
4678
        readback_p2     = 0xff;
4679
	read            = "  1   0   1   0      0   0   0   0",
4680
                          "  x   x   x   x      x   x   x  a8",
4681
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4682
                          "  o   o   o   o      o   o   o   o";
4683
 
4684
	write           = "  1   1   0   0      0   0   0   0",
4685
                          "  x   x   x   x      x   x   x  a8",
4686
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4687
                          "  i   i   i   i      i   i   i   i";
4688
        mode            = 0x41;
4689
        delay           = 20;
4690
        blocksize       = 4;
4691
        readsize        = 256;
4692
      ;
4693
 
4694
    memory "flash"
4695
        paged           = yes;
4696
        size            = 16384;
4697
        page_size       = 128;
4698
        num_pages       = 128;
4699
        min_write_delay = 16000;
4700
        max_write_delay = 16000;
4701
        readback_p1     = 0xff;
4702
        readback_p2     = 0xff;
4703
        read_lo         = "  0   0   1   0      0   0   0   0",
4704
                          "  x   x   x a12    a11 a10  a9  a8",
4705
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4706
                          "  o   o   o   o      o   o   o   o";
4707
 
4708
        read_hi         = "  0   0   1   0      1   0   0   0",
4709
                          "  x   x   x a12    a11 a10  a9  a8",
4710
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4711
                          "  o   o   o   o      o   o   o   o";
4712
 
4713
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
4714
                          "  x   x   x   x      x   x   x   x",
4715
                          "  x   x  a5  a4     a3  a2  a1  a0",
4716
                          "  i   i   i   i      i   i   i   i";
4717
 
4718
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
4719
                          "  x   x   x   x      x   x   x   x",
4720
                          "  x   x  a5  a4     a3  a2  a1  a0",
4721
                          "  i   i   i   i      i   i   i   i";
4722
 
4723
        writepage       = "  0   1   0   0      1   1   0   0",
4724
                          "  x   x   x a12    a11 a10  a9  a8",
4725
                          " a7  a6   x   x      x   x   x   x",
4726
                          "  x   x   x   x      x   x   x   x";
4727
 
4728
	mode		= 0x11;
4729
	delay		= 20;
4730
	blocksize	= 128;
4731
	readsize	= 256;
4732
      ;
4733
 
4734
    memory "lfuse"
4735
        size            = 1;
4736
        min_write_delay = 2000;
4737
        max_write_delay = 2000;
4738
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
4739
                          "x x x x  x x x x   o o x x  o o o o";
4740
 
4741
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
4742
                          "x x x x  x x x x   i i 1 1  i i i i";
4743
      ;
4744
 
4745
    memory "hfuse"
4746
        size            = 1;
4747
        min_write_delay = 2000;
4748
        max_write_delay = 2000;
4749
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
4750
                          "x x x x  x x x x   x x x x  1 o o o";
4751
 
4752
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
4753
                          "x x x x  x x x x   1 1 1 1  1 i i i";
4754
      ;
4755
 
4756
    memory "lock"
4757
        size            = 1;
4758
        min_write_delay = 2000;
4759
        max_write_delay = 2000;
4760
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
4761
                          "x x x x  0 x x x   x x o o  o o o o";
4762
 
4763
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
4764
                          "x x x x  x x x x   1 1 i i  i i i i";
4765
      ;
4766
 
4767
    memory "signature"
4768
        size            = 3;
4769
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
4770
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
4771
      ;
4772
 
4773
    memory "calibration"
4774
        size            = 1;
4775
        read            = "0 0 1 1  1 0 0 0   x x x x  x x x x",
4776
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
4777
      ;
4778
  ;
4779
 
4780
#------------------------------------------------------------
4781
# ATmega169
4782
#------------------------------------------------------------
4783
 
4784
part
4785
    id               = "m169";
4786
    desc             = "ATMEGA169";
4787
    has_jtag         = yes;
4788
    stk500_devcode   = 0x85;
4789
    avr910_devcode   = 0x78;
4790
    signature        = 0x1e 0x94 0x05;
4791
    chip_erase_delay = 9000;
4792
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
4793
                       "x x x x  x x x x    x x x x  x x x x";
4794
 
4795
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
4796
                       "x x x x  x x x x    x x x x  x x x x";
4797
    timeout		= 200;
4798
    stabdelay		= 100;
4799
    cmdexedelay		= 25;
4800
    synchloops		= 32;
4801
    bytedelay		= 0;
4802
    pollindex		= 3;
4803
    pollvalue		= 0x53;
4804
    predelay		= 1;
4805
    postdelay		= 1;
4806
    pollmethod		= 1;
4807
 
4808
    pp_controlstack     =
4809
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
4810
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
4811
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
4812
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
4813
    hventerstabdelay    = 100;
4814
    progmodedelay       = 0;
4815
    latchcycles         = 5;
4816
    togglevtg           = 1;
4817
    poweroffdelay       = 15;
4818
    resetdelayms        = 1;
4819
    resetdelayus        = 0;
4820
    hvleavestabdelay    = 15;
4821
    chiperasepulsewidth = 0;
4822
    chiperasepolltimeout = 10;
4823
    programfusepulsewidth = 0;
4824
    programfusepolltimeout = 5;
4825
    programlockpulsewidth = 0;
4826
    programlockpolltimeout = 5;
4827
 
4828
    idr                 = 0x31;
4829
    spmcr               = 0x57;
4830
 
4831
   memory "eeprom"
4832
        paged           = no; /* leave this "no" */
4833
        page_size       = 4;  /* for parallel programming */
4834
        size            = 512;
4835
        min_write_delay = 9000;
4836
        max_write_delay = 9000;
4837
        readback_p1     = 0xff;
4838
        readback_p2     = 0xff;
4839
	read            = "  1   0   1   0      0   0   0   0",
4840
                          "  x   x   x   x      x   x   x  a8",
4841
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4842
                          "  o   o   o   o      o   o   o   o";
4843
 
4844
	write           = "  1   1   0   0      0   0   0   0",
4845
                          "  x   x   x   x      x   x   x  a8",
4846
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4847
                          "  i   i   i   i      i   i   i   i";
4848
 
4849
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
4850
			  "  0   0   0   0      0   0   0   0",
4851
			  "  0   0   0   0      0   0  a1  a0",
4852
			  "  i   i   i   i      i   i   i   i";
4853
 
4854
	writepage	= "  1   1   0   0      0   0   1   0",
4855
			  "  0   0   x   x      x   x   x  a8",
4856
			  " a7  a6  a5  a4     a3  a2   0   0",
4857
			  "  x   x   x   x      x   x   x   x";
4858
 
4859
	mode		= 0x41;
4860
	delay		= 20;
4861
	blocksize	= 4;
4862
	readsize	= 256;
4863
      ;
4864
 
4865
    memory "flash"
4866
        paged           = yes;
4867
        size            = 16384;
4868
        page_size       = 128;
4869
        num_pages       = 128;
4870
        min_write_delay = 4500;
4871
        max_write_delay = 4500;
4872
        readback_p1     = 0xff;
4873
        readback_p2     = 0xff;
4874
        read_lo         = "  0   0   1   0      0   0   0   0",
4875
                          "  x   x   x a12    a11 a10  a9  a8",
4876
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4877
                          "  o   o   o   o      o   o   o   o";
4878
 
4879
        read_hi         = "  0   0   1   0      1   0   0   0",
4880
                          "  x   x   x a12    a11 a10  a9  a8",
4881
                          " a7  a6  a5  a4     a3  a2  a1  a0",
4882
                          "  o   o   o   o      o   o   o   o";
4883
 
4884
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
4885
                          "  x   x   x   x      x   x   x   x",
4886
                          "  x   x  a5  a4     a3  a2  a1  a0",
4887
                          "  i   i   i   i      i   i   i   i";
4888
 
4889
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
4890
                          "  x   x   x   x      x   x   x   x",
4891
                          "  x   x  a5  a4     a3  a2  a1  a0",
4892
                          "  i   i   i   i      i   i   i   i";
4893
 
4894
        writepage       = "  0   1   0   0      1   1   0   0",
4895
                          "  x   x   x a12    a11 a10  a9  a8",
4896
                          " a7  a6   x   x      x   x   x   x",
4897
                          "  x   x   x   x      x   x   x   x";
4898
 
4899
	mode		= 0x41;
4900
	delay		= 6;
4901
	blocksize	= 128;
4902
	readsize	= 256;
4903
      ;
4904
 
4905
    memory "lfuse"
4906
        size            = 1;
4907
        min_write_delay = 2000;
4908
        max_write_delay = 2000;
4909
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
4910
                          "x x x x  x x x x   o o o o  o o o o";
4911
 
4912
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
4913
                          "x x x x  x x x x   i i i i  i i i i";
4914
      ;
4915
 
4916
    memory "hfuse"
4917
        size            = 1;
4918
        min_write_delay = 2000;
4919
        max_write_delay = 2000;
4920
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
4921
                          "x x x x  x x x x   o o o o  o o o o";
4922
 
4923
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
4924
                          "x x x x  x x x x   i i i i  i i i i";
4925
      ;
4926
 
4927
    memory "efuse"
4928
        size            = 1;
4929
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
4930
                          "x x x x  x x x x  x x x x  i i i i";
4931
 
4932
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
4933
                          "x x x x  x x x x  o o o o  o o o o";
4934
      ;
4935
 
4936
    memory "lock"
4937
        size            = 1;
4938
        min_write_delay = 2000;
4939
        max_write_delay = 2000;
4940
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
4941
                          "x x x x  x x x x   x x o o  o o o o";
4942
 
4943
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
4944
                          "x x x x  x x x x   1 1 i i  i i i i";
4945
      ;
4946
 
4947
    memory "signature"
4948
        size            = 3;
4949
        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
4950
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
4951
      ;
4952
 
4953
    memory "calibration"
4954
        size            = 1;
4955
        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
4956
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
4957
      ;
4958
  ;
4959
 
4960
#------------------------------------------------------------
4961
# ATmega329
4962
#------------------------------------------------------------
4963
 
4964
part
4965
    id               = "m329";
4966
    desc             = "ATMEGA329";
4967
    has_jtag         = yes;
4968
#    stk500_devcode   = 0x85; # no STK500 support, only STK500v2
4969
#    avr910_devcode   = 0x?;  # try the ATmega169 one:
4970
    avr910_devcode   = 0x75;
4971
    signature        = 0x1e 0x95 0x03;
4972
    chip_erase_delay = 9000;
4973
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
4974
                       "x x x x  x x x x    x x x x  x x x x";
4975
 
4976
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
4977
                       "x x x x  x x x x    x x x x  x x x x";
4978
    timeout		= 200;
4979
    stabdelay		= 100;
4980
    cmdexedelay		= 25;
4981
    synchloops		= 32;
4982
    bytedelay		= 0;
4983
    pollindex		= 3;
4984
    pollvalue		= 0x53;
4985
    predelay		= 1;
4986
    postdelay		= 1;
4987
    pollmethod		= 1;
4988
 
4989
    pp_controlstack     =
4990
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
4991
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
4992
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
4993
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
4994
    hventerstabdelay    = 100;
4995
    progmodedelay       = 0;
4996
    latchcycles         = 5;
4997
    togglevtg           = 1;
4998
    poweroffdelay       = 15;
4999
    resetdelayms        = 1;
5000
    resetdelayus        = 0;
5001
    hvleavestabdelay    = 15;
5002
    chiperasepulsewidth = 0;
5003
    chiperasepolltimeout = 10;
5004
    programfusepulsewidth = 0;
5005
    programfusepolltimeout = 5;
5006
    programlockpulsewidth = 0;
5007
    programlockpolltimeout = 5;
5008
 
5009
    idr                 = 0x31;
5010
    spmcr               = 0x57;
5011
 
5012
   memory "eeprom"
5013
        paged           = no; /* leave this "no" */
5014
        page_size       = 4;  /* for parallel programming */
5015
        size            = 1024;
5016
        min_write_delay = 9000;
5017
        max_write_delay = 9000;
5018
        readback_p1     = 0xff;
5019
        readback_p2     = 0xff;
5020
	read            = "  1   0   1   0      0   0   0   0",
5021
                          "  x   x   x   x      x   x  a9  a8",
5022
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5023
                          "  o   o   o   o      o   o   o   o";
5024
 
5025
	write           = "  1   1   0   0      0   0   0   0",
5026
                          "  x   x   x   x      x   x  a9  a8",
5027
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5028
                          "  i   i   i   i      i   i   i   i";
5029
 
5030
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
5031
			  "  0   0   0   0      0   0   0   0",
5032
			  "  0   0   0   0      0   0  a1  a0",
5033
			  "  i   i   i   i      i   i   i   i";
5034
 
5035
	writepage	= "  1   1   0   0      0   0   1   0",
5036
			  "  0   0   x   x      x   x  a9  a8",
5037
			  " a7  a6  a5  a4     a3  a2   0   0",
5038
			  "  x   x   x   x      x   x   x   x";
5039
 
5040
	mode		= 0x41;
5041
	delay		= 20;
5042
	blocksize	= 8;
5043
	readsize	= 256;
5044
      ;
5045
 
5046
    memory "flash"
5047
        paged           = yes;
5048
        size            = 32768;
5049
        page_size       = 128;
5050
        num_pages       = 256;
5051
        min_write_delay = 4500;
5052
        max_write_delay = 4500;
5053
        readback_p1     = 0xff;
5054
        readback_p2     = 0xff;
5055
        read_lo         = "  0   0   1   0      0   0   0   0",
5056
                          "  x a14 a13 a12    a11 a10  a9  a8",
5057
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5058
                          "  o   o   o   o      o   o   o   o";
5059
 
5060
        read_hi         = "  0   0   1   0      1   0   0   0",
5061
                          "  x a14 a13 a12    a11 a10  a9  a8",
5062
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5063
                          "  o   o   o   o      o   o   o   o";
5064
 
5065
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
5066
                          "  x   x   x   x      x   x   x   x",
5067
                          "  x   x  a5  a4     a3  a2  a1  a0",
5068
                          "  i   i   i   i      i   i   i   i";
5069
 
5070
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
5071
                          "  x   x   x   x      x   x   x   x",
5072
                          "  x   x  a5  a4     a3  a2  a1  a0",
5073
                          "  i   i   i   i      i   i   i   i";
5074
 
5075
        writepage       = "  0   1   0   0      1   1   0   0",
5076
                          "  x   x   x a12    a11 a10  a9  a8",
5077
                          " a7  a6   x   x      x   x   x   x",
5078
                          "  x   x   x   x      x   x   x   x";
5079
 
5080
	mode		= 0x41;
5081
	delay		= 6;
5082
	blocksize	= 256;
5083
	readsize	= 256;
5084
      ;
5085
 
5086
    memory "lfuse"
5087
        size            = 1;
5088
        min_write_delay = 4500;
5089
        max_write_delay = 4500;
5090
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
5091
                          "x x x x  x x x x   o o o o  o o o o";
5092
 
5093
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
5094
                          "x x x x  x x x x   i i i i  i i i i";
5095
      ;
5096
 
5097
    memory "hfuse"
5098
        size            = 1;
5099
        min_write_delay = 4500;
5100
        max_write_delay = 4500;
5101
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
5102
                          "x x x x  x x x x   o o o o  o o o o";
5103
 
5104
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
5105
                          "x x x x  x x x x   i i i i  i i i i";
5106
      ;
5107
 
5108
    memory "efuse"
5109
        size            = 1;
5110
        min_write_delay = 4500;
5111
        max_write_delay = 4500;
5112
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
5113
                          "x x x x  x x x x   o o o o  o o o o";
5114
 
5115
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
5116
                          "x x x x  x x x x   x x x x  x i i i";
5117
      ;
5118
 
5119
    memory "lock"
5120
        size            = 1;
5121
        min_write_delay = 4500;
5122
        max_write_delay = 4500;
5123
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
5124
                          "x x x x  x x x x   x x o o  o o o o";
5125
 
5126
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
5127
                          "x x x x  x x x x   1 1 i i  i i i i";
5128
      ;
5129
 
5130
    memory "signature"
5131
        size            = 3;
5132
        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
5133
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
5134
      ;
5135
 
5136
    memory "calibration"
5137
        size            = 1;
5138
        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
5139
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
5140
      ;
5141
  ;
5142
 
5143
#------------------------------------------------------------
5144
# ATmega329P
5145
#------------------------------------------------------------
5146
# Identical to ATmega329 except of the signature
5147
 
5148
part
5149
    id               = "m329p";
5150
    desc             = "ATMEGA329P";
5151
    has_jtag         = yes;
5152
#    stk500_devcode   = 0x85; # no STK500 support, only STK500v2
5153
#    avr910_devcode   = 0x?;  # try the ATmega169 one:
5154
    avr910_devcode   = 0x75;
5155
    signature        = 0x1e 0x95 0x0b;
5156
    chip_erase_delay = 9000;
5157
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
5158
                       "x x x x  x x x x    x x x x  x x x x";
5159
 
5160
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
5161
                       "x x x x  x x x x    x x x x  x x x x";
5162
    timeout		= 200;
5163
    stabdelay		= 100;
5164
    cmdexedelay		= 25;
5165
    synchloops		= 32;
5166
    bytedelay		= 0;
5167
    pollindex		= 3;
5168
    pollvalue		= 0x53;
5169
    predelay		= 1;
5170
    postdelay		= 1;
5171
    pollmethod		= 1;
5172
 
5173
    pp_controlstack     =
5174
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
5175
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
5176
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
5177
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
5178
    hventerstabdelay    = 100;
5179
    progmodedelay       = 0;
5180
    latchcycles         = 5;
5181
    togglevtg           = 1;
5182
    poweroffdelay       = 15;
5183
    resetdelayms        = 1;
5184
    resetdelayus        = 0;
5185
    hvleavestabdelay    = 15;
5186
    chiperasepulsewidth = 0;
5187
    chiperasepolltimeout = 10;
5188
    programfusepulsewidth = 0;
5189
    programfusepolltimeout = 5;
5190
    programlockpulsewidth = 0;
5191
    programlockpolltimeout = 5;
5192
 
5193
    idr                 = 0x31;
5194
    spmcr               = 0x57;
5195
 
5196
   memory "eeprom"
5197
        paged           = no; /* leave this "no" */
5198
        page_size       = 4;  /* for parallel programming */
5199
        size            = 1024;
5200
        min_write_delay = 9000;
5201
        max_write_delay = 9000;
5202
        readback_p1     = 0xff;
5203
        readback_p2     = 0xff;
5204
	read            = "  1   0   1   0      0   0   0   0",
5205
                          "  x   x   x   x      x   x  a9  a8",
5206
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5207
                          "  o   o   o   o      o   o   o   o";
5208
 
5209
	write           = "  1   1   0   0      0   0   0   0",
5210
                          "  x   x   x   x      x   x  a9  a8",
5211
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5212
                          "  i   i   i   i      i   i   i   i";
5213
 
5214
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
5215
			  "  0   0   0   0      0   0   0   0",
5216
			  "  0   0   0   0      0   0  a1  a0",
5217
			  "  i   i   i   i      i   i   i   i";
5218
 
5219
	writepage	= "  1   1   0   0      0   0   1   0",
5220
			  "  0   0   x   x      x   x  a9  a8",
5221
			  " a7  a6  a5  a4     a3  a2   0   0",
5222
			  "  x   x   x   x      x   x   x   x";
5223
 
5224
	mode		= 0x41;
5225
	delay		= 20;
5226
	blocksize	= 8;
5227
	readsize	= 256;
5228
      ;
5229
 
5230
    memory "flash"
5231
        paged           = yes;
5232
        size            = 32768;
5233
        page_size       = 128;
5234
        num_pages       = 256;
5235
        min_write_delay = 4500;
5236
        max_write_delay = 4500;
5237
        readback_p1     = 0xff;
5238
        readback_p2     = 0xff;
5239
        read_lo         = "  0   0   1   0      0   0   0   0",
5240
                          "  x a14 a13 a12    a11 a10  a9  a8",
5241
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5242
                          "  o   o   o   o      o   o   o   o";
5243
 
5244
        read_hi         = "  0   0   1   0      1   0   0   0",
5245
                          "  x a14 a13 a12    a11 a10  a9  a8",
5246
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5247
                          "  o   o   o   o      o   o   o   o";
5248
 
5249
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
5250
                          "  x   x   x   x      x   x   x   x",
5251
                          "  x   x  a5  a4     a3  a2  a1  a0",
5252
                          "  i   i   i   i      i   i   i   i";
5253
 
5254
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
5255
                          "  x   x   x   x      x   x   x   x",
5256
                          "  x   x  a5  a4     a3  a2  a1  a0",
5257
                          "  i   i   i   i      i   i   i   i";
5258
 
5259
        writepage       = "  0   1   0   0      1   1   0   0",
5260
                          "  x   x   x a12    a11 a10  a9  a8",
5261
                          " a7  a6   x   x      x   x   x   x",
5262
                          "  x   x   x   x      x   x   x   x";
5263
 
5264
	mode		= 0x41;
5265
	delay		= 6;
5266
	blocksize	= 256;
5267
	readsize	= 256;
5268
      ;
5269
 
5270
    memory "lfuse"
5271
        size            = 1;
5272
        min_write_delay = 4500;
5273
        max_write_delay = 4500;
5274
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
5275
                          "x x x x  x x x x   o o o o  o o o o";
5276
 
5277
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
5278
                          "x x x x  x x x x   i i i i  i i i i";
5279
      ;
5280
 
5281
    memory "hfuse"
5282
        size            = 1;
5283
        min_write_delay = 4500;
5284
        max_write_delay = 4500;
5285
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
5286
                          "x x x x  x x x x   o o o o  o o o o";
5287
 
5288
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
5289
                          "x x x x  x x x x   i i i i  i i i i";
5290
      ;
5291
 
5292
    memory "efuse"
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  1 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 1 0 0",
5300
                          "x x x x  x x x x   x x x x  x i i i";
5301
      ;
5302
 
5303
    memory "lock"
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  0 0 0 0",
5308
                          "x x x x  x x x x   x x o o  o o o o";
5309
 
5310
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
5311
                          "x x x x  x x x x   1 1 i i  i i i i";
5312
      ;
5313
 
5314
    memory "signature"
5315
        size            = 3;
5316
        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
5317
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
5318
      ;
5319
 
5320
    memory "calibration"
5321
        size            = 1;
5322
        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
5323
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
5324
      ;
5325
  ;
5326
 
5327
#------------------------------------------------------------
5328
# ATmega3290
5329
#------------------------------------------------------------
5330
 
5331
# identical to ATmega329
5332
 
5333
part
5334
    id               = "m3290";
5335
    desc             = "ATMEGA3290";
5336
    has_jtag         = yes;
5337
#    stk500_devcode   = 0x85; # no STK500 support, only STK500v2
5338
#    avr910_devcode   = 0x?;  # try the ATmega169 one:
5339
    avr910_devcode   = 0x75;
5340
    signature        = 0x1e 0x95 0x04;
5341
    chip_erase_delay = 9000;
5342
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
5343
                       "x x x x  x x x x    x x x x  x x x x";
5344
 
5345
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
5346
                       "x x x x  x x x x    x x x x  x x x x";
5347
    timeout		= 200;
5348
    stabdelay		= 100;
5349
    cmdexedelay		= 25;
5350
    synchloops		= 32;
5351
    bytedelay		= 0;
5352
    pollindex		= 3;
5353
    pollvalue		= 0x53;
5354
    predelay		= 1;
5355
    postdelay		= 1;
5356
    pollmethod		= 1;
5357
 
5358
    pp_controlstack     =
5359
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
5360
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
5361
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
5362
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
5363
    hventerstabdelay    = 100;
5364
    progmodedelay       = 0;
5365
    latchcycles         = 5;
5366
    togglevtg           = 1;
5367
    poweroffdelay       = 15;
5368
    resetdelayms        = 1;
5369
    resetdelayus        = 0;
5370
    hvleavestabdelay    = 15;
5371
    chiperasepulsewidth = 0;
5372
    chiperasepolltimeout = 10;
5373
    programfusepulsewidth = 0;
5374
    programfusepolltimeout = 5;
5375
    programlockpulsewidth = 0;
5376
    programlockpolltimeout = 5;
5377
 
5378
    idr                 = 0x31;
5379
    spmcr               = 0x57;
5380
 
5381
   memory "eeprom"
5382
        paged           = no; /* leave this "no" */
5383
        page_size       = 4;  /* for parallel programming */
5384
        size            = 1024;
5385
        min_write_delay = 9000;
5386
        max_write_delay = 9000;
5387
        readback_p1     = 0xff;
5388
        readback_p2     = 0xff;
5389
	read            = "  1   0   1   0      0   0   0   0",
5390
                          "  x   x   x   x      x   x  a9  a8",
5391
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5392
                          "  o   o   o   o      o   o   o   o";
5393
 
5394
	write           = "  1   1   0   0      0   0   0   0",
5395
                          "  x   x   x   x      x   x  a9  a8",
5396
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5397
                          "  i   i   i   i      i   i   i   i";
5398
 
5399
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
5400
			  "  0   0   0   0      0   0   0   0",
5401
			  "  0   0   0   0      0   0  a1  a0",
5402
			  "  i   i   i   i      i   i   i   i";
5403
 
5404
	writepage	= "  1   1   0   0      0   0   1   0",
5405
			  "  0   0   x   x      x   x  a9  a8",
5406
			  " a7  a6  a5  a4     a3  a3   0   0",
5407
			  "  x   x   x   x      x   x   x   x";
5408
 
5409
	mode		= 0x41;
5410
	delay		= 20;
5411
	blocksize	= 8;
5412
	readsize	= 256;
5413
      ;
5414
 
5415
    memory "flash"
5416
        paged           = yes;
5417
        size            = 32768;
5418
        page_size       = 128;
5419
        num_pages       = 256;
5420
        min_write_delay = 4500;
5421
        max_write_delay = 4500;
5422
        readback_p1     = 0xff;
5423
        readback_p2     = 0xff;
5424
        read_lo         = "  0   0   1   0      0   0   0   0",
5425
                          "  x a14 a13 a12    a11 a10  a9  a8",
5426
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5427
                          "  o   o   o   o      o   o   o   o";
5428
 
5429
        read_hi         = "  0   0   1   0      1   0   0   0",
5430
                          "  x a14 a13 a12    a11 a10  a9  a8",
5431
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5432
                          "  o   o   o   o      o   o   o   o";
5433
 
5434
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
5435
                          "  x   x   x   x      x   x   x   x",
5436
                          "  x   x  a5  a4     a3  a2  a1  a0",
5437
                          "  i   i   i   i      i   i   i   i";
5438
 
5439
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
5440
                          "  x   x   x   x      x   x   x   x",
5441
                          "  x   x  a5  a4     a3  a2  a1  a0",
5442
                          "  i   i   i   i      i   i   i   i";
5443
 
5444
        writepage       = "  0   1   0   0      1   1   0   0",
5445
                          "  x   x   x a12    a11 a10  a9  a8",
5446
                          " a7  a6   x   x      x   x   x   x",
5447
                          "  x   x   x   x      x   x   x   x";
5448
 
5449
	mode		= 0x41;
5450
	delay		= 6;
5451
	blocksize	= 256;
5452
	readsize	= 256;
5453
      ;
5454
 
5455
    memory "lfuse"
5456
        size            = 1;
5457
        min_write_delay = 4500;
5458
        max_write_delay = 4500;
5459
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
5460
                          "x x x x  x x x x   o o o o  o o o o";
5461
 
5462
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
5463
                          "x x x x  x x x x   i i i i  i i i i";
5464
      ;
5465
 
5466
    memory "hfuse"
5467
        size            = 1;
5468
        min_write_delay = 4500;
5469
        max_write_delay = 4500;
5470
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
5471
                          "x x x x  x x x x   o o o o  o o o o";
5472
 
5473
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
5474
                          "x x x x  x x x x   i i i i  i i i i";
5475
      ;
5476
 
5477
    memory "efuse"
5478
        size            = 1;
5479
        min_write_delay = 4500;
5480
        max_write_delay = 4500;
5481
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
5482
                          "x x x x  x x x x   o o o o  o o o o";
5483
 
5484
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
5485
                          "x x x x  x x x x   x x x x  x i i i";
5486
      ;
5487
 
5488
    memory "lock"
5489
        size            = 1;
5490
        min_write_delay = 4500;
5491
        max_write_delay = 4500;
5492
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
5493
                          "x x x x  x x x x   x x o o  o o o o";
5494
 
5495
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
5496
                          "x x x x  x x x x   1 1 i i  i i i i";
5497
      ;
5498
 
5499
    memory "signature"
5500
        size            = 3;
5501
        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
5502
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
5503
      ;
5504
 
5505
    memory "calibration"
5506
        size            = 1;
5507
        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
5508
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
5509
      ;
5510
  ;
5511
 
5512
#------------------------------------------------------------
5513
# ATmega3290P
5514
#------------------------------------------------------------
5515
 
5516
# identical to ATmega3290 except of the signature
5517
 
5518
part
5519
    id               = "m3290p";
5520
    desc             = "ATMEGA3290P";
5521
    has_jtag         = yes;
5522
#    stk500_devcode   = 0x85; # no STK500 support, only STK500v2
5523
#    avr910_devcode   = 0x?;  # try the ATmega169 one:
5524
    avr910_devcode   = 0x75;
5525
    signature        = 0x1e 0x95 0x0c;
5526
    chip_erase_delay = 9000;
5527
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
5528
                       "x x x x  x x x x    x x x x  x x x x";
5529
 
5530
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
5531
                       "x x x x  x x x x    x x x x  x x x x";
5532
    timeout		= 200;
5533
    stabdelay		= 100;
5534
    cmdexedelay		= 25;
5535
    synchloops		= 32;
5536
    bytedelay		= 0;
5537
    pollindex		= 3;
5538
    pollvalue		= 0x53;
5539
    predelay		= 1;
5540
    postdelay		= 1;
5541
    pollmethod		= 1;
5542
 
5543
    pp_controlstack     =
5544
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
5545
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
5546
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
5547
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
5548
    hventerstabdelay    = 100;
5549
    progmodedelay       = 0;
5550
    latchcycles         = 5;
5551
    togglevtg           = 1;
5552
    poweroffdelay       = 15;
5553
    resetdelayms        = 1;
5554
    resetdelayus        = 0;
5555
    hvleavestabdelay    = 15;
5556
    chiperasepulsewidth = 0;
5557
    chiperasepolltimeout = 10;
5558
    programfusepulsewidth = 0;
5559
    programfusepolltimeout = 5;
5560
    programlockpulsewidth = 0;
5561
    programlockpolltimeout = 5;
5562
 
5563
    idr                 = 0x31;
5564
    spmcr               = 0x57;
5565
 
5566
   memory "eeprom"
5567
        paged           = no; /* leave this "no" */
5568
        page_size       = 4;  /* for parallel programming */
5569
        size            = 1024;
5570
        min_write_delay = 9000;
5571
        max_write_delay = 9000;
5572
        readback_p1     = 0xff;
5573
        readback_p2     = 0xff;
5574
	read            = "  1   0   1   0      0   0   0   0",
5575
                          "  x   x   x   x      x   x  a9  a8",
5576
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5577
                          "  o   o   o   o      o   o   o   o";
5578
 
5579
	write           = "  1   1   0   0      0   0   0   0",
5580
                          "  x   x   x   x      x   x  a9  a8",
5581
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5582
                          "  i   i   i   i      i   i   i   i";
5583
 
5584
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
5585
			  "  0   0   0   0      0   0   0   0",
5586
			  "  0   0   0   0      0   0  a1  a0",
5587
			  "  i   i   i   i      i   i   i   i";
5588
 
5589
	writepage	= "  1   1   0   0      0   0   1   0",
5590
			  "  0   0   x   x      x   x  a9  a8",
5591
			  " a7  a6  a5  a4     a3  a3   0   0",
5592
			  "  x   x   x   x      x   x   x   x";
5593
 
5594
	mode		= 0x41;
5595
	delay		= 20;
5596
	blocksize	= 8;
5597
	readsize	= 256;
5598
      ;
5599
 
5600
    memory "flash"
5601
        paged           = yes;
5602
        size            = 32768;
5603
        page_size       = 128;
5604
        num_pages       = 256;
5605
        min_write_delay = 4500;
5606
        max_write_delay = 4500;
5607
        readback_p1     = 0xff;
5608
        readback_p2     = 0xff;
5609
        read_lo         = "  0   0   1   0      0   0   0   0",
5610
                          "  x a14 a13 a12    a11 a10  a9  a8",
5611
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5612
                          "  o   o   o   o      o   o   o   o";
5613
 
5614
        read_hi         = "  0   0   1   0      1   0   0   0",
5615
                          "  x a14 a13 a12    a11 a10  a9  a8",
5616
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5617
                          "  o   o   o   o      o   o   o   o";
5618
 
5619
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
5620
                          "  x   x   x   x      x   x   x   x",
5621
                          "  x   x  a5  a4     a3  a2  a1  a0",
5622
                          "  i   i   i   i      i   i   i   i";
5623
 
5624
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
5625
                          "  x   x   x   x      x   x   x   x",
5626
                          "  x   x  a5  a4     a3  a2  a1  a0",
5627
                          "  i   i   i   i      i   i   i   i";
5628
 
5629
        writepage       = "  0   1   0   0      1   1   0   0",
5630
                          "  x   x   x a12    a11 a10  a9  a8",
5631
                          " a7  a6   x   x      x   x   x   x",
5632
                          "  x   x   x   x      x   x   x   x";
5633
 
5634
	mode		= 0x41;
5635
	delay		= 6;
5636
	blocksize	= 256;
5637
	readsize	= 256;
5638
      ;
5639
 
5640
    memory "lfuse"
5641
        size            = 1;
5642
        min_write_delay = 4500;
5643
        max_write_delay = 4500;
5644
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
5645
                          "x x x x  x x x x   o o o o  o o o o";
5646
 
5647
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
5648
                          "x x x x  x x x x   i i i i  i i i i";
5649
      ;
5650
 
5651
    memory "hfuse"
5652
        size            = 1;
5653
        min_write_delay = 4500;
5654
        max_write_delay = 4500;
5655
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
5656
                          "x x x x  x x x x   o o o o  o o o o";
5657
 
5658
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
5659
                          "x x x x  x x x x   i i i i  i i i i";
5660
      ;
5661
 
5662
    memory "efuse"
5663
        size            = 1;
5664
        min_write_delay = 4500;
5665
        max_write_delay = 4500;
5666
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
5667
                          "x x x x  x x x x   o o o o  o o o o";
5668
 
5669
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
5670
                          "x x x x  x x x x   x x x x  x i i i";
5671
      ;
5672
 
5673
    memory "lock"
5674
        size            = 1;
5675
        min_write_delay = 4500;
5676
        max_write_delay = 4500;
5677
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
5678
                          "x x x x  x x x x   x x o o  o o o o";
5679
 
5680
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
5681
                          "x x x x  x x x x   1 1 i i  i i i i";
5682
      ;
5683
 
5684
    memory "signature"
5685
        size            = 3;
5686
        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
5687
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
5688
      ;
5689
 
5690
    memory "calibration"
5691
        size            = 1;
5692
        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
5693
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
5694
      ;
5695
  ;
5696
 
5697
#------------------------------------------------------------
5698
# ATmega649
5699
#------------------------------------------------------------
5700
 
5701
part
5702
    id               = "m649";
5703
    desc             = "ATMEGA649";
5704
    has_jtag         = yes;
5705
#    stk500_devcode   = 0x85; # no STK500 support, only STK500v2
5706
#    avr910_devcode   = 0x?;  # try the ATmega169 one:
5707
    avr910_devcode   = 0x75;
5708
    signature        = 0x1e 0x96 0x03;
5709
    chip_erase_delay = 9000;
5710
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
5711
                       "x x x x  x x x x    x x x x  x x x x";
5712
 
5713
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
5714
                       "x x x x  x x x x    x x x x  x x x x";
5715
    timeout		= 200;
5716
    stabdelay		= 100;
5717
    cmdexedelay		= 25;
5718
    synchloops		= 32;
5719
    bytedelay		= 0;
5720
    pollindex		= 3;
5721
    pollvalue		= 0x53;
5722
    predelay		= 1;
5723
    postdelay		= 1;
5724
    pollmethod		= 1;
5725
 
5726
    pp_controlstack     =
5727
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
5728
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
5729
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
5730
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
5731
    hventerstabdelay    = 100;
5732
    progmodedelay       = 0;
5733
    latchcycles         = 5;
5734
    togglevtg           = 1;
5735
    poweroffdelay       = 15;
5736
    resetdelayms        = 1;
5737
    resetdelayus        = 0;
5738
    hvleavestabdelay    = 15;
5739
    chiperasepulsewidth = 0;
5740
    chiperasepolltimeout = 10;
5741
    programfusepulsewidth = 0;
5742
    programfusepolltimeout = 5;
5743
    programlockpulsewidth = 0;
5744
    programlockpolltimeout = 5;
5745
 
5746
    idr                 = 0x31;
5747
    spmcr               = 0x57;
5748
 
5749
   memory "eeprom"
5750
        paged           = no; /* leave this "no" */
5751
        page_size       = 8;  /* for parallel programming */
5752
        size            = 2048;
5753
        min_write_delay = 9000;
5754
        max_write_delay = 9000;
5755
        readback_p1     = 0xff;
5756
        readback_p2     = 0xff;
5757
	read            = "  1   0   1   0      0   0   0   0",
5758
                          "  x   x   x   x      x a10  a9  a8",
5759
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5760
                          "  o   o   o   o      o   o   o   o";
5761
 
5762
	write           = "  1   1   0   0      0   0   0   0",
5763
                          "  x   x   x   x      x a10  a9  a8",
5764
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5765
                          "  i   i   i   i      i   i   i   i";
5766
 
5767
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
5768
			  "  0   0   0   0      0   0   0   0",
5769
			  "  0   0   0   0      0  a2  a1  a0",
5770
			  "  i   i   i   i      i   i   i   i";
5771
 
5772
	writepage	= "  1   1   0   0      0   0   1   0",
5773
			  "  0   0   x   x      x a10  a9  a8",
5774
			  " a7  a6  a5  a4     a3   0   0   0",
5775
			  "  x   x   x   x      x   x   x   x";
5776
 
5777
	mode		= 0x41;
5778
	delay		= 20;
5779
	blocksize	= 8;
5780
	readsize	= 256;
5781
      ;
5782
 
5783
    memory "flash"
5784
        paged           = yes;
5785
        size            = 65536;
5786
        page_size       = 256;
5787
        num_pages       = 256;
5788
        min_write_delay = 4500;
5789
        max_write_delay = 4500;
5790
        readback_p1     = 0xff;
5791
        readback_p2     = 0xff;
5792
        read_lo         = "  0   0   1   0      0   0   0   0",
5793
                          "a15 a14 a13 a12    a11 a10  a9  a8",
5794
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5795
                          "  o   o   o   o      o   o   o   o";
5796
 
5797
        read_hi         = "  0   0   1   0      1   0   0   0",
5798
                          "a15 a14 a13 a12    a11 a10  a9  a8",
5799
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5800
                          "  o   o   o   o      o   o   o   o";
5801
 
5802
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
5803
                          "  x   x   x   x      x   x   x   x",
5804
                          "  x  a6  a5  a4     a3  a2  a1  a0",
5805
                          "  i   i   i   i      i   i   i   i";
5806
 
5807
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
5808
                          "  x   x   x   x      x   x   x   x",
5809
                          "  x  a6  a5  a4     a3  a2  a1  a0",
5810
                          "  i   i   i   i      i   i   i   i";
5811
 
5812
        writepage       = "  0   1   0   0      1   1   0   0",
5813
                          "  x   x   x a12    a11 a10  a9  a8",
5814
                          " a7   x   x   x      x   x   x   x",
5815
                          "  x   x   x   x      x   x   x   x";
5816
 
5817
	mode		= 0x41;
5818
	delay		= 6;
5819
	blocksize	= 256;
5820
	readsize	= 256;
5821
      ;
5822
 
5823
    memory "lfuse"
5824
        size            = 1;
5825
        min_write_delay = 4500;
5826
        max_write_delay = 4500;
5827
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
5828
                          "x x x x  x x x x   o o o o  o o o o";
5829
 
5830
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
5831
                          "x x x x  x x x x   i i i i  i i i i";
5832
      ;
5833
 
5834
    memory "hfuse"
5835
        size            = 1;
5836
        min_write_delay = 4500;
5837
        max_write_delay = 4500;
5838
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
5839
                          "x x x x  x x x x   o o o o  o o o o";
5840
 
5841
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
5842
                          "x x x x  x x x x   i i i i  i i i i";
5843
      ;
5844
 
5845
    memory "efuse"
5846
        size            = 1;
5847
        min_write_delay = 4500;
5848
        max_write_delay = 4500;
5849
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
5850
                          "x x x x  x x x x   o o o o  o o o o";
5851
 
5852
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
5853
                          "x x x x  x x x x   x x x x  x i i i";
5854
      ;
5855
 
5856
    memory "lock"
5857
        size            = 1;
5858
        min_write_delay = 4500;
5859
        max_write_delay = 4500;
5860
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
5861
                          "x x x x  x x x x   x x o o  o o o o";
5862
 
5863
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
5864
                          "x x x x  x x x x   1 1 i i  i i i i";
5865
      ;
5866
 
5867
    memory "signature"
5868
        size            = 3;
5869
        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
5870
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
5871
      ;
5872
 
5873
    memory "calibration"
5874
        size            = 1;
5875
        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
5876
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
5877
      ;
5878
  ;
5879
 
5880
#------------------------------------------------------------
5881
# ATmega6490
5882
#------------------------------------------------------------
5883
 
5884
# identical to ATmega649
5885
 
5886
part
5887
    id               = "m6490";
5888
    desc             = "ATMEGA6490";
5889
    has_jtag         = yes;
5890
#    stk500_devcode   = 0x85; # no STK500 support, only STK500v2
5891
#    avr910_devcode   = 0x?;  # try the ATmega169 one:
5892
    avr910_devcode   = 0x75;
5893
    signature        = 0x1e 0x96 0x04;
5894
    chip_erase_delay = 9000;
5895
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
5896
                       "x x x x  x x x x    x x x x  x x x x";
5897
 
5898
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
5899
                       "x x x x  x x x x    x x x x  x x x x";
5900
    timeout		= 200;
5901
    stabdelay		= 100;
5902
    cmdexedelay		= 25;
5903
    synchloops		= 32;
5904
    bytedelay		= 0;
5905
    pollindex		= 3;
5906
    pollvalue		= 0x53;
5907
    predelay		= 1;
5908
    postdelay		= 1;
5909
    pollmethod		= 1;
5910
 
5911
    pp_controlstack     =
5912
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
5913
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
5914
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
5915
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
5916
    hventerstabdelay    = 100;
5917
    progmodedelay       = 0;
5918
    latchcycles         = 5;
5919
    togglevtg           = 1;
5920
    poweroffdelay       = 15;
5921
    resetdelayms        = 1;
5922
    resetdelayus        = 0;
5923
    hvleavestabdelay    = 15;
5924
    chiperasepulsewidth = 0;
5925
    chiperasepolltimeout = 10;
5926
    programfusepulsewidth = 0;
5927
    programfusepolltimeout = 5;
5928
    programlockpulsewidth = 0;
5929
    programlockpolltimeout = 5;
5930
 
5931
    idr                 = 0x31;
5932
    spmcr               = 0x57;
5933
 
5934
   memory "eeprom"
5935
        paged           = no; /* leave this "no" */
5936
        page_size       = 8;  /* for parallel programming */
5937
        size            = 2048;
5938
        min_write_delay = 9000;
5939
        max_write_delay = 9000;
5940
        readback_p1     = 0xff;
5941
        readback_p2     = 0xff;
5942
	read            = "  1   0   1   0      0   0   0   0",
5943
                          "  x   x   x   x      x a10  a9  a8",
5944
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5945
                          "  o   o   o   o      o   o   o   o";
5946
 
5947
	write           = "  1   1   0   0      0   0   0   0",
5948
                          "  x   x   x   x      x a10  a9  a8",
5949
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5950
                          "  i   i   i   i      i   i   i   i";
5951
 
5952
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
5953
			  "  0   0   0   0      0   0   0   0",
5954
			  "  0   0   0   0      0  a2  a1  a0",
5955
			  "  i   i   i   i      i   i   i   i";
5956
 
5957
	writepage	= "  1   1   0   0      0   0   1   0",
5958
			  "  0   0   x   x      x   x   x  a8",
5959
			  " a7  a6  a5  a4     a3   0   0   0",
5960
			  "  x   x   x   x      x   x   x   x";
5961
 
5962
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
5963
			  "  0   0   0   0      0   0   0   0",
5964
			  "  0   0   0   0      0  a2  a1  a0",
5965
			  "  i   i   i   i      i   i   i   i";
5966
 
5967
	writepage	= "  1   1   0   0      0   0   1   0",
5968
			  "  0   0   x   x      x a10  a9  a8",
5969
			  " a7  a6  a5  a4     a3   0   0   0",
5970
			  "  x   x   x   x      x   x   x   x";
5971
 
5972
	mode		= 0x41;
5973
	delay		= 20;
5974
	blocksize	= 8;
5975
	readsize	= 256;
5976
      ;
5977
 
5978
    memory "flash"
5979
        paged           = yes;
5980
        size            = 65536;
5981
        page_size       = 256;
5982
        num_pages       = 256;
5983
        min_write_delay = 4500;
5984
        max_write_delay = 4500;
5985
        readback_p1     = 0xff;
5986
        readback_p2     = 0xff;
5987
        read_lo         = "  0   0   1   0      0   0   0   0",
5988
                          "a15 a14 a13 a12    a11 a10  a9  a8",
5989
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5990
                          "  o   o   o   o      o   o   o   o";
5991
 
5992
        read_hi         = "  0   0   1   0      1   0   0   0",
5993
                          "a15 a14 a13 a12    a11 a10  a9  a8",
5994
                          " a7  a6  a5  a4     a3  a2  a1  a0",
5995
                          "  o   o   o   o      o   o   o   o";
5996
 
5997
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
5998
                          "  x   x   x   x      x   x   x   x",
5999
                          "  x  a6  a5  a4     a3  a2  a1  a0",
6000
                          "  i   i   i   i      i   i   i   i";
6001
 
6002
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
6003
                          "  x   x   x   x      x   x   x   x",
6004
                          "  x  a6  a5  a4     a3  a2  a1  a0",
6005
                          "  i   i   i   i      i   i   i   i";
6006
 
6007
        writepage       = "  0   1   0   0      1   1   0   0",
6008
                          "  x   x   x a12    a11 a10  a9  a8",
6009
                          " a7   x   x   x      x   x   x   x",
6010
                          "  x   x   x   x      x   x   x   x";
6011
 
6012
	mode		= 0x41;
6013
	delay		= 6;
6014
	blocksize	= 256;
6015
	readsize	= 256;
6016
      ;
6017
 
6018
    memory "lfuse"
6019
        size            = 1;
6020
        min_write_delay = 4500;
6021
        max_write_delay = 4500;
6022
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
6023
                          "x x x x  x x x x   o o o o  o o o o";
6024
 
6025
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
6026
                          "x x x x  x x x x   i i i i  i i i i";
6027
      ;
6028
 
6029
    memory "hfuse"
6030
        size            = 1;
6031
        min_write_delay = 4500;
6032
        max_write_delay = 4500;
6033
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 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  1 0 0 0",
6037
                          "x x x x  x x x x   i i i i  i i i i";
6038
      ;
6039
 
6040
    memory "efuse"
6041
        size            = 1;
6042
        min_write_delay = 4500;
6043
        max_write_delay = 4500;
6044
        read            = "0 1 0 1  0 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  0 1 0 0",
6048
                          "x x x x  x x x x   x x x x  x i i i";
6049
      ;
6050
 
6051
    memory "lock"
6052
        size            = 1;
6053
        min_write_delay = 4500;
6054
        max_write_delay = 4500;
6055
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
6056
                          "x x x x  x x x x   x x o o  o o o o";
6057
 
6058
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
6059
                          "x x x x  x x x x   1 1 i i  i i i i";
6060
      ;
6061
 
6062
    memory "signature"
6063
        size            = 3;
6064
        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
6065
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
6066
      ;
6067
 
6068
    memory "calibration"
6069
        size            = 1;
6070
        read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
6071
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
6072
      ;
6073
  ;
6074
 
6075
#------------------------------------------------------------
6076
# ATmega32
6077
#------------------------------------------------------------
6078
 
6079
part
6080
    id               = "m32";
6081
    desc             = "ATMEGA32";
6082
    has_jtag         = yes;
6083
    stk500_devcode   = 0x91;
6084
    avr910_devcode   = 0x72;
6085
    signature        = 0x1e 0x95 0x02;
6086
    chip_erase_delay = 9000;
6087
    pagel            = 0xd7;
6088
    bs2              = 0xa0;
6089
    reset            = dedicated;
6090
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
6091
                       "x x x x  x x x x    x x x x  x x x x";
6092
 
6093
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
6094
                       "x x x x  x x x x    x x x x  x x x x";
6095
    timeout		= 200;
6096
    stabdelay		= 100;
6097
    cmdexedelay		= 25;
6098
    synchloops		= 32;
6099
    bytedelay		= 0;
6100
    pollindex		= 3;
6101
    pollvalue		= 0x53;
6102
    predelay		= 1;
6103
    postdelay		= 1;
6104
    pollmethod		= 0;
6105
 
6106
    pp_controlstack     =
6107
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
6108
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
6109
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
6110
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
6111
    hventerstabdelay    = 100;
6112
    progmodedelay       = 0;
6113
    latchcycles         = 6;
6114
    togglevtg           = 0;
6115
    poweroffdelay       = 0;
6116
    resetdelayms        = 0;
6117
    resetdelayus        = 0;
6118
    hvleavestabdelay    = 15;
6119
    chiperasepulsewidth = 0;
6120
    chiperasepolltimeout = 10;
6121
    programfusepulsewidth = 0;
6122
    programfusepolltimeout = 5;
6123
    programlockpulsewidth = 0;
6124
    programlockpolltimeout = 5;
6125
 
6126
    idr                 = 0x31;
6127
    spmcr               = 0x57;
6128
    allowfullpagebitstream = yes;
6129
 
6130
   memory "eeprom"
6131
        paged           = no;   /* leave this "no" */
6132
        page_size       = 4;    /* for parallel programming */
6133
        size            = 1024;
6134
        min_write_delay = 9000;
6135
        max_write_delay = 9000;
6136
        readback_p1     = 0xff;
6137
        readback_p2     = 0xff;
6138
        read            = "  1   0   1   0      0   0   0   0",
6139
                          "  0   0   x   x      x   x  a9  a8",
6140
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6141
                          "  o   o   o   o      o   o   o   o";
6142
 
6143
        write           = "  1   1   0   0      0   0   0   0",
6144
                          "  0   0   x   x      x   x  a9  a8",
6145
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6146
                          "  i   i   i   i      i   i   i   i";
6147
 
6148
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
6149
			  "  0   0   0   0      0   0   0   0",
6150
			  "  0   0   0   0      0   0  a1  a0",
6151
			  "  i   i   i   i      i   i   i   i";
6152
 
6153
	writepage	= "  1   1   0   0      0   0   1   0",
6154
			  "  0   0   x   x      x   x  a9  a8",
6155
			  " a7  a6  a5  a4     a3  a2   0   0",
6156
			  "  x   x   x   x      x   x   x   x";
6157
 
6158
	mode		= 0x04;
6159
	delay		= 10;
6160
	blocksize	= 64;
6161
	readsize	= 256;
6162
      ;
6163
 
6164
    memory "flash"
6165
        paged           = yes;
6166
        size            = 32768;
6167
        page_size       = 128;
6168
        num_pages       = 256;
6169
        min_write_delay = 4500;
6170
        max_write_delay = 4500;
6171
        readback_p1     = 0xff;
6172
        readback_p2     = 0xff;
6173
        read_lo         = "  0   0   1   0      0   0   0   0",
6174
                          "  0   0 a13 a12    a11 a10  a9  a8",
6175
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6176
                          "  o   o   o   o      o   o   o   o";
6177
 
6178
        read_hi         = "  0   0   1   0      1   0   0   0",
6179
                          "  0   0 a13 a12    a11 a10  a9  a8",
6180
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6181
                          "  o   o   o   o      o   o   o   o";
6182
 
6183
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
6184
                          "  0   0   x   x      x   x   x   x",
6185
                          "  x   x  a5  a4     a3  a2  a1  a0",
6186
                          "  i   i   i   i      i   i   i   i";
6187
 
6188
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
6189
                          "  0   0   x   x      x   x   x   x",
6190
                          "  x   x  a5  a4     a3  a2  a1  a0",
6191
                          "  i   i   i   i      i   i   i   i";
6192
 
6193
        writepage       = "  0   1   0   0      1   1   0   0",
6194
                          "  0   0 a13 a12    a11 a10  a9  a8",
6195
                          " a7  a6   x   x      x   x   x   x",
6196
                          "  x   x   x   x      x   x   x   x";
6197
 
6198
	mode		= 0x21;
6199
	delay		= 6;
6200
	blocksize	= 64;
6201
	readsize	= 256;
6202
      ;
6203
 
6204
    memory "lfuse"
6205
        size            = 1;
6206
        min_write_delay = 2000;
6207
        max_write_delay = 2000;
6208
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
6209
                          "x x x x  x x x x   o o o o  o o o o";
6210
 
6211
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
6212
                          "x x x x  x x x x   i i i i  i i i i";
6213
      ;
6214
 
6215
    memory "hfuse"
6216
        size            = 1;
6217
        min_write_delay = 2000;
6218
        max_write_delay = 2000;
6219
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
6220
                          "x x x x  x x x x   o o o o  o o o o";
6221
 
6222
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
6223
                          "x x x x  x x x x   i i i i  i i i i";
6224
      ;
6225
 
6226
    memory "lock"
6227
        size            = 1;
6228
        min_write_delay = 2000;
6229
        max_write_delay = 2000;
6230
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
6231
                          "x x x x  x x x x   x x o o  o o o o";
6232
 
6233
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
6234
                          "x x x x  x x x x   1 1 i i  i i i i";
6235
      ;
6236
 
6237
    memory "signature"
6238
        size            = 3;
6239
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x x",
6240
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o o";
6241
      ;
6242
 
6243
    memory "calibration"
6244
        size            = 4;
6245
        read            = "0 0 1 1  1 0 0 0    0 0 x x  x x x x",
6246
                          "0 0 0 0  0 0 a1 a0  o o o o  o o o o";
6247
      ;
6248
  ;
6249
 
6250
#------------------------------------------------------------
6251
# ATmega161
6252
#------------------------------------------------------------
6253
 
6254
part
6255
    id               = "m161";
6256
    desc             = "ATMEGA161";
6257
    stk500_devcode   = 0x80;
6258
    avr910_devcode   = 0x60;
6259
    signature        = 0x1e 0x94 0x01;
6260
    chip_erase_delay = 28000;
6261
    pagel            = 0xd7;
6262
    bs2              = 0xa0;
6263
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
6264
                       "x x x x  x x x x    x x x x  x x x x";
6265
 
6266
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
6267
                       "x x x x  x x x x    x x x x  x x x x";
6268
    timeout		= 200;
6269
    stabdelay		= 100;
6270
    cmdexedelay		= 25;
6271
    synchloops		= 32;
6272
    bytedelay		= 0;
6273
    pollindex		= 3;
6274
    pollvalue		= 0x53;
6275
    predelay		= 1;
6276
    postdelay		= 1;
6277
    pollmethod		= 0;
6278
 
6279
    pp_controlstack     =
6280
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
6281
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
6282
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
6283
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
6284
    hventerstabdelay    = 100;
6285
    progmodedelay       = 0;
6286
    latchcycles         = 0;
6287
    togglevtg           = 0;
6288
    poweroffdelay       = 0;
6289
    resetdelayms        = 0;
6290
    resetdelayus        = 0;
6291
    hvleavestabdelay    = 15;
6292
    chiperasepulsewidth = 0;
6293
    chiperasepolltimeout = 30;
6294
    programfusepulsewidth = 0;
6295
    programfusepolltimeout = 2;
6296
    programlockpulsewidth = 0;
6297
    programlockpolltimeout = 2;
6298
 
6299
   memory "eeprom"
6300
        size            = 512;
6301
        min_write_delay = 3400;
6302
        max_write_delay = 3400;
6303
        readback_p1     = 0xff;
6304
        readback_p2     = 0xff;
6305
	read            = "  1   0   1   0      0   0   0   0",
6306
                          "  x   x   x   x      x   x   x  a8",
6307
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6308
                          "  o   o   o   o      o   o   o   o";
6309
 
6310
	write           = "  1   1   0   0      0   0   0   0",
6311
                          "  x   x   x   x      x   x   x  a8",
6312
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6313
                          "  i   i   i   i      i   i   i   i";
6314
 
6315
	mode		= 0x04;
6316
	delay		= 5;
6317
	blocksize	= 128;
6318
	readsize	= 256;
6319
      ;
6320
 
6321
    memory "flash"
6322
        paged           = yes;
6323
        size            = 16384;
6324
        page_size       = 128;
6325
        num_pages       = 128;
6326
        min_write_delay = 14000;
6327
        max_write_delay = 14000;
6328
        readback_p1     = 0xff;
6329
        readback_p2     = 0xff;
6330
        read_lo         = "  0   0   1   0      0   0   0   0",
6331
                          "  x   x   x a12    a11 a10  a9  a8",
6332
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6333
                          "  o   o   o   o      o   o   o   o";
6334
 
6335
        read_hi         = "  0   0   1   0      1   0   0   0",
6336
                          "  x   x   x a12    a11 a10  a9  a8",
6337
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6338
                          "  o   o   o   o      o   o   o   o";
6339
 
6340
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
6341
                          "  x   x   x   x      x   x   x   x",
6342
                          "  x   x  a5  a4     a3  a2  a1  a0",
6343
                          "  i   i   i   i      i   i   i   i";
6344
 
6345
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
6346
                          "  x   x   x   x      x   x   x   x",
6347
                          "  x   x  a5  a4     a3  a2  a1  a0",
6348
                          "  i   i   i   i      i   i   i   i";
6349
 
6350
        writepage       = "  0   1   0   0      1   1   0   0",
6351
                          "  x   x   x a12    a11 a10  a9  a8",
6352
                          " a7  a6   x   x      x   x   x   x",
6353
                          "  x   x   x   x      x   x   x   x";
6354
 
6355
	mode		= 0x21;
6356
	delay		= 16;
6357
	blocksize	= 128;
6358
	readsize	= 256;
6359
      ;
6360
 
6361
    memory "fuse"
6362
        size            = 1;
6363
        min_write_delay = 2000;
6364
        max_write_delay = 2000;
6365
        read            = "0 1 0 1  0 0 0 0   x x x x  x x x x",
6366
                          "x x x x  x x x x   x o x o  o o o o";
6367
 
6368
        write           = "1 0 1 0  1 1 0 0   1 0 1 x  x x x x",
6369
                          "x x x x  x x x x   1 i 1 i  i i i i";
6370
      ;
6371
 
6372
    memory "lock"
6373
        size            = 1;
6374
        min_write_delay = 2000;
6375
        max_write_delay = 2000;
6376
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
6377
                          "x x x x  x x x x   x x o o  o o o o";
6378
 
6379
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
6380
                          "x x x x  x x x x   1 1 i i  i i i i";
6381
      ;
6382
    memory "signature"
6383
        size            = 3;
6384
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
6385
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
6386
      ;
6387
  ;
6388
 
6389
 
6390
#------------------------------------------------------------
6391
# ATmega8
6392
#------------------------------------------------------------
6393
 
6394
part
6395
    id               = "m8";
6396
    desc             = "ATMEGA8";
6397
    stk500_devcode   = 0x70;
6398
    avr910_devcode   = 0x76;
6399
    signature        = 0x1e 0x93 0x07;
6400
    pagel            = 0xd7;
6401
    bs2              = 0xc2;
6402
    chip_erase_delay = 10000;
6403
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
6404
                       "x x x x  x x x x    x x x x  x x x x";
6405
 
6406
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
6407
                       "x x x x  x x x x    x x x x  x x x x";
6408
 
6409
    timeout		= 200;
6410
    stabdelay		= 100;
6411
    cmdexedelay		= 25;
6412
    synchloops		= 32;
6413
    bytedelay		= 0;
6414
    pollindex		= 3;
6415
    pollvalue		= 0x53;
6416
    predelay		= 1;
6417
    postdelay		= 1;
6418
    pollmethod		= 0;
6419
 
6420
    pp_controlstack     =
6421
	0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
6422
	0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
6423
	0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
6424
	0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
6425
    hventerstabdelay    = 100;
6426
    progmodedelay       = 0;
6427
    latchcycles         = 5;
6428
    togglevtg           = 1;
6429
    poweroffdelay       = 15;
6430
    resetdelayms        = 2;
6431
    resetdelayus        = 0;
6432
    hvleavestabdelay    = 15;
6433
    resetdelay          = 15;
6434
    chiperasepulsewidth = 0;
6435
    chiperasepolltimeout = 10;
6436
    programfusepulsewidth = 0;
6437
    programfusepolltimeout = 5;
6438
    programlockpulsewidth = 0;
6439
    programlockpolltimeout = 5;
6440
 
6441
    memory "eeprom"
6442
        size            = 512;
6443
        page_size       = 4;
6444
        min_write_delay = 9000;
6445
        max_write_delay = 9000;
6446
        readback_p1     = 0xff;
6447
        readback_p2     = 0xff;
6448
	read            = "  1   0   1   0      0   0   0   0",
6449
                          "  0   0   x   x      x   x   x  a8",
6450
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6451
                          "  o   o   o   o      o   o   o   o";
6452
 
6453
	write           = "  1   1   0   0      0   0   0   0",
6454
                          "  0   0   x   x      x   x   x  a8",
6455
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6456
                          "  i   i   i   i      i   i   i   i";
6457
 
6458
	mode		= 0x04;
6459
	delay		= 20;
6460
	blocksize	= 128;
6461
	readsize	= 256;
6462
      ;
6463
    memory "flash"
6464
        paged           = yes;
6465
        size            = 8192;
6466
        page_size       = 64;
6467
        num_pages       = 128;
6468
        min_write_delay = 4500;
6469
        max_write_delay = 4500;
6470
        readback_p1     = 0xff;
6471
        readback_p2     = 0x00;
6472
        read_lo         = "  0   0   1   0    0   0   0   0",
6473
                          "  0   0   0   0  a11 a10  a9  a8",
6474
                          " a7  a6  a5  a4   a3  a2  a1  a0",
6475
                          "  o   o   o   o    o   o   o   o";
6476
 
6477
        read_hi         = "  0   0   1   0    1   0   0   0",
6478
                          "  0   0   0   0  a11 a10  a9  a8",
6479
                          " a7  a6  a5  a4   a3  a2  a1  a0",
6480
                          "  o   o   o   o    o   o   o   o";
6481
 
6482
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
6483
                          "  0   0   0   0      x   x   x   x",
6484
                          "  x   x   x  a4     a3  a2  a1  a0",
6485
                          "  i   i   i   i      i   i   i   i";
6486
 
6487
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
6488
                          "  0   0   0   0      x   x   x   x",
6489
                          "  x   x   x  a4     a3  a2  a1  a0",
6490
                          "  i   i   i   i      i   i   i   i";
6491
 
6492
        writepage       = "  0   1   0   0      1   1   0   0",
6493
                          "  0   0   0   0    a11 a10  a9  a8",
6494
                          " a7  a6  a5   x      x   x   x   x",
6495
                          "  x   x   x   x      x   x   x   x";
6496
 
6497
	mode		= 0x21;
6498
	delay		= 10;
6499
	blocksize	= 64;
6500
	readsize	= 256;
6501
      ;
6502
 
6503
    memory "lfuse"
6504
        size            = 1;
6505
        min_write_delay = 2000;
6506
        max_write_delay = 2000;
6507
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
6508
                          "x x x x  x x x x   o o o o  o o o o";
6509
 
6510
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
6511
                          "x x x x  x x x x   i i i i  i i i i";
6512
      ;
6513
 
6514
    memory "hfuse"
6515
        size            = 1;
6516
        min_write_delay = 2000;
6517
        max_write_delay = 2000;
6518
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
6519
                          "x x x x  x x x x   o o o o  o o o o";
6520
 
6521
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
6522
                          "x x x x  x x x x   i i i i  i i i i";
6523
      ;
6524
 
6525
    memory "lock"
6526
        size            = 1;
6527
        min_write_delay = 2000;
6528
        max_write_delay = 2000;
6529
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
6530
                          "x x x x  x x x x   x x o o  o o o o";
6531
 
6532
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
6533
                          "x x x x  x x x x   1 1 i i  i i i i";
6534
      ;
6535
 
6536
    memory "calibration"
6537
        size            = 4;
6538
        read            = "0  0  1  1   1  0  0  0   0  0  x  x   x  x  x  x",
6539
                          "0  0  0  0   0  0 a1 a0   o  o  o  o   o  o  o  o";
6540
      ;
6541
 
6542
    memory "signature"
6543
        size            = 3;
6544
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
6545
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
6546
      ;
6547
  ;
6548
 
6549
 
6550
 
6551
#------------------------------------------------------------
6552
# ATmega8515
6553
#------------------------------------------------------------
6554
 
6555
part
6556
    id               = "m8515";
6557
    desc             = "ATMEGA8515";
6558
    stk500_devcode   = 0x63;
6559
    avr910_devcode   = 0x3A;
6560
    signature        = 0x1e 0x93 0x06;
6561
    chip_erase_delay = 9000;
6562
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
6563
                       "x x x x  x x x x    x x x x  x x x x";
6564
 
6565
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
6566
                       "x x x x  x x x x    x x x x  x x x x";
6567
 
6568
    timeout		= 200;
6569
    stabdelay		= 100;
6570
    cmdexedelay		= 25;
6571
    synchloops		= 32;
6572
    bytedelay		= 0;
6573
    pollindex		= 3;
6574
    pollvalue		= 0x53;
6575
    predelay		= 1;
6576
    postdelay		= 1;
6577
    pollmethod		= 0;
6578
 
6579
    pp_controlstack     =
6580
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
6581
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
6582
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
6583
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
6584
    hventerstabdelay    = 100;
6585
    progmodedelay       = 0;
6586
    latchcycles         = 6;
6587
    togglevtg           = 0;
6588
    poweroffdelay       = 0;
6589
    resetdelayms        = 0;
6590
    resetdelayus        = 0;
6591
    hvleavestabdelay    = 15;
6592
    chiperasepulsewidth = 0;
6593
    chiperasepolltimeout = 10;
6594
    programfusepulsewidth = 0;
6595
    programfusepolltimeout = 5;
6596
    programlockpulsewidth = 0;
6597
    programlockpolltimeout = 5;
6598
 
6599
    memory "eeprom"
6600
        size            = 512;
6601
        min_write_delay = 9000;
6602
        max_write_delay = 9000;
6603
        readback_p1     = 0xff;
6604
        readback_p2     = 0xff;
6605
 read            = "  1   0   1   0      0   0   0   0",
6606
                          "  0   0   x   x      x   x   x  a8",
6607
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6608
                          "  o   o   o   o      o   o   o   o";
6609
 
6610
 write           = "  1   1   0   0      0   0   0   0",
6611
                          "  0   0   x   x      x   x   x  a8",
6612
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6613
                          "  i   i   i   i      i   i   i   i";
6614
 
6615
	mode		= 0x04;
6616
	delay		= 10;
6617
	blocksize	= 128;
6618
	readsize	= 256;
6619
      ;
6620
    memory "flash"
6621
        paged           = yes;
6622
        size            = 8192;
6623
        page_size       = 64;
6624
        num_pages       = 128;
6625
        min_write_delay = 4500;
6626
        max_write_delay = 4500;
6627
        readback_p1     = 0xff;
6628
        readback_p2     = 0xff;
6629
        read_lo         = "  0   0   1   0    0   0   0   0",
6630
                          "  0   0   0   0  a11 a10  a9  a8",
6631
                          " a7  a6  a5  a4   a3  a2  a1  a0",
6632
                          "  o   o   o   o    o   o   o   o";
6633
 
6634
        read_hi         = "  0   0   1   0    1   0   0   0",
6635
                          "  0   0   0   0  a11 a10  a9  a8",
6636
                          " a7  a6  a5  a4   a3  a2  a1  a0",
6637
                          "  o   o   o   o    o   o   o   o";
6638
 
6639
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
6640
                          "  0   0   0   0      x   x   x   x",
6641
                          "  x   x   x  a4     a3  a2  a1  a0",
6642
                          "  i   i   i   i      i   i   i   i";
6643
 
6644
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
6645
                          "  0   0   0   0      x   x   x   x",
6646
                          "  x   x   x  a4     a3  a2  a1  a0",
6647
                          "  i   i   i   i      i   i   i   i";
6648
 
6649
        writepage       = "  0   1   0   0      1   1   0   0",
6650
                          "  0   0   0   0    a11 a10  a9  a8",
6651
                          " a7  a6  a5   x      x   x   x   x",
6652
                          "  x   x   x   x      x   x   x   x";
6653
 
6654
	mode		= 0x21;
6655
	delay		= 6;
6656
	blocksize	= 64;
6657
	readsize	= 256;
6658
      ;
6659
 
6660
    memory "lfuse"
6661
        size            = 1;
6662
        min_write_delay = 4500;
6663
        max_write_delay = 4500;
6664
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
6665
                          "x x x x  x x x x   o o o o  o o o o";
6666
 
6667
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
6668
                          "x x x x  x x x x   i i i i  i i i i";
6669
      ;
6670
 
6671
    memory "hfuse"
6672
        size            = 1;
6673
        min_write_delay = 4500;
6674
        max_write_delay = 4500;
6675
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
6676
                          "x x x x  x x x x   o o o o  o o o o";
6677
 
6678
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
6679
                          "x x x x  x x x x   i i i i  i i i i";
6680
      ;
6681
 
6682
    memory "lock"
6683
        size            = 1;
6684
        min_write_delay = 4500;
6685
        max_write_delay = 4500;
6686
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
6687
                          "x x x x  x x x x   x x o o  o o o o";
6688
 
6689
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
6690
                          "x x x x  x x x x   1 1 i i  i i i i";
6691
      ;
6692
 
6693
    memory "calibration"
6694
        size            = 4;
6695
        read            = "0 0 1 1  1 0 0 0     0 0 x x  x x x x",
6696
                          "0 0 0 0  0 0 a1 a0   o o o o  o o o o";
6697
      ;
6698
 
6699
    memory "signature"
6700
        size            = 3;
6701
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
6702
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
6703
      ;
6704
  ;
6705
 
6706
 
6707
 
6708
 
6709
#------------------------------------------------------------
6710
# ATmega8535
6711
#------------------------------------------------------------
6712
 
6713
part
6714
    id               = "m8535";
6715
    desc             = "ATMEGA8535";
6716
    stk500_devcode   = 0x64;
6717
    avr910_devcode   = 0x69;
6718
    signature        = 0x1e 0x93 0x08;
6719
    pagel            = 0xd7;
6720
    bs2              = 0xa0;
6721
    chip_erase_delay = 9000;
6722
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
6723
                       "x x x x  x x x x    x x x x  x x x x";
6724
 
6725
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
6726
                       "x x x x  x x x x    x x x x  x x x x";
6727
 
6728
    timeout		= 200;
6729
    stabdelay		= 100;
6730
    cmdexedelay		= 25;
6731
    synchloops		= 32;
6732
    bytedelay		= 0;
6733
    pollindex		= 3;
6734
    pollvalue		= 0x53;
6735
    predelay		= 1;
6736
    postdelay		= 1;
6737
    pollmethod		= 0;
6738
 
6739
    pp_controlstack     =
6740
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
6741
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
6742
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
6743
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
6744
    hventerstabdelay    = 100;
6745
    progmodedelay       = 0;
6746
    latchcycles         = 6;
6747
    togglevtg           = 0;
6748
    poweroffdelay       = 0;
6749
    resetdelayms        = 0;
6750
    resetdelayus        = 0;
6751
    hvleavestabdelay    = 15;
6752
    chiperasepulsewidth = 0;
6753
    chiperasepolltimeout = 10;
6754
    programfusepulsewidth = 0;
6755
    programfusepolltimeout = 5;
6756
    programlockpulsewidth = 0;
6757
    programlockpolltimeout = 5;
6758
 
6759
    memory "eeprom"
6760
        size            = 512;
6761
        min_write_delay = 9000;
6762
        max_write_delay = 9000;
6763
        readback_p1     = 0xff;
6764
        readback_p2     = 0xff;
6765
	read            = "  1   0   1   0      0   0   0   0",
6766
                          "  0   0   x   x      x   x   x  a8",
6767
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6768
                          "  o   o   o   o      o   o   o   o";
6769
 
6770
	write           = "  1   1   0   0      0   0   0   0",
6771
                          "  0   0   x   x      x   x   x  a8",
6772
                          " a7  a6  a5  a4     a3  a2  a1  a0",
6773
                          "  i   i   i   i      i   i   i   i";
6774
 
6775
	mode		= 0x04;
6776
	delay		= 10;
6777
	blocksize	= 128;
6778
	readsize	= 256;
6779
      ;
6780
    memory "flash"
6781
        paged           = yes;
6782
        size            = 8192;
6783
        page_size       = 64;
6784
        num_pages       = 128;
6785
        min_write_delay = 4500;
6786
        max_write_delay = 4500;
6787
        readback_p1     = 0xff;
6788
        readback_p2     = 0xff;
6789
        read_lo         = "  0   0   1   0    0   0   0   0",
6790
                          "  0   0   0   0  a11 a10  a9  a8",
6791
                          " a7  a6  a5  a4   a3  a2  a1  a0",
6792
                          "  o   o   o   o    o   o   o   o";
6793
 
6794
        read_hi         = "  0   0   1   0    1   0   0   0",
6795
                          "  0   0   0   0  a11 a10  a9  a8",
6796
                          " a7  a6  a5  a4   a3  a2  a1  a0",
6797
                          "  o   o   o   o    o   o   o   o";
6798
 
6799
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
6800
                          "  0   0   0   0      x   x   x   x",
6801
                          "  x   x   x  a4     a3  a2  a1  a0",
6802
                          "  i   i   i   i      i   i   i   i";
6803
 
6804
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
6805
                          "  0   0   0   0      x   x   x   x",
6806
                          "  x   x   x  a4     a3  a2  a1  a0",
6807
                          "  i   i   i   i      i   i   i   i";
6808
 
6809
        writepage       = "  0   1   0   0      1   1   0   0",
6810
                          "  0   0   0   0    a11 a10  a9  a8",
6811
                          " a7  a6  a5   x      x   x   x   x",
6812
                          "  x   x   x   x      x   x   x   x";
6813
 
6814
	mode		= 0x21;
6815
	delay		= 6;
6816
	blocksize	= 64;
6817
	readsize	= 256;
6818
      ;
6819
 
6820
    memory "lfuse"
6821
        size            = 1;
6822
        min_write_delay = 2000;
6823
        max_write_delay = 2000;
6824
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
6825
                          "x x x x  x x x x   o o o o  o o o o";
6826
 
6827
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
6828
                          "x x x x  x x x x   i i i i  i i i i";
6829
      ;
6830
 
6831
    memory "hfuse"
6832
        size            = 1;
6833
        min_write_delay = 2000;
6834
        max_write_delay = 2000;
6835
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
6836
                          "x x x x  x x x x   o o o o  o o o o";
6837
 
6838
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
6839
                          "x x x x  x x x x   i i i i  i i i i";
6840
      ;
6841
 
6842
    memory "lock"
6843
        size            = 1;
6844
        min_write_delay = 2000;
6845
        max_write_delay = 2000;
6846
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
6847
                          "x x x x  x x x x   x x o o  o o o o";
6848
 
6849
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
6850
                          "x x x x  x x x x   1 1 i i  i i i i";
6851
      ;
6852
 
6853
    memory "calibration"
6854
        size            = 4;
6855
        read            = "0 0 1 1  1 0 0 0   0 0 x x  x x x x",
6856
                          "0 0 0 0  0 0 a1 a0 o o o o  o o o o";
6857
      ;
6858
 
6859
    memory "signature"
6860
        size            = 3;
6861
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
6862
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
6863
      ;
6864
  ;
6865
 
6866
 
6867
#------------------------------------------------------------
6868
# ATtiny26
6869
#------------------------------------------------------------
6870
 
6871
part
6872
    id                  = "t26";
6873
    desc                = "ATTINY26";
6874
    stk500_devcode      = 0x21;
6875
    avr910_devcode      = 0x5e;
6876
    signature           = 0x1e 0x91 0x09;
6877
    pagel               = 0xb3;
6878
    bs2                 = 0xb2;
6879
    chip_erase_delay    = 9000;
6880
    pgm_enable          = "1 0 1 0  1 1 0 0   0 1 0 1  0 0 1 1",
6881
                          "x x x x  x x x x   x x x x  x x x x";
6882
 
6883
    chip_erase          = "1 0 1 0  1 1 0 0   1 0 0 x  x x x x",
6884
                          "x x x x  x x x x   x x x x  x x x x";
6885
 
6886
    timeout		= 200;
6887
    stabdelay		= 100;
6888
    cmdexedelay		= 25;
6889
    synchloops		= 32;
6890
    bytedelay		= 0;
6891
    pollindex		= 3;
6892
    pollvalue		= 0x53;
6893
    predelay		= 1;
6894
    postdelay		= 1;
6895
    pollmethod		= 0;
6896
 
6897
    pp_controlstack     =
6898
        0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC,
6899
        0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC,
6900
        0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C,
6901
        0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00;
6902
    hventerstabdelay    = 100;
6903
    progmodedelay       = 0;
6904
    latchcycles         = 5;
6905
    togglevtg           = 1;
6906
    poweroffdelay       = 15;
6907
    resetdelayms        = 2;
6908
    resetdelayus        = 0;
6909
    hvleavestabdelay    = 15;
6910
    chiperasepulsewidth = 0;
6911
    chiperasepolltimeout = 10;
6912
    programfusepulsewidth = 0;
6913
    programfusepolltimeout = 5;
6914
    programlockpulsewidth = 0;
6915
    programlockpolltimeout = 5;
6916
 
6917
    memory "eeprom"
6918
        size            = 128;
6919
        min_write_delay = 9000;
6920
        max_write_delay = 9000;
6921
        readback_p1     = 0xff;
6922
        readback_p2     = 0xff;
6923
        read            = "1  0  1  0   0  0  0  0    x x x x  x x x x",
6924
                          "x a6 a5 a4  a3 a2 a1 a0    o o o o  o o o o";
6925
 
6926
        write           = "1  1  0  0   0  0  0  0    x x x x  x x x x",
6927
                          "x a6 a5 a4  a3 a2 a1 a0    i i i i  i i i i";
6928
 
6929
	mode		= 0x04;
6930
	delay		= 10;
6931
	blocksize	= 64;
6932
	readsize	= 256;
6933
    ;
6934
 
6935
    memory "flash"
6936
        paged           = yes;
6937
        size            = 2048;
6938
        page_size       = 32;
6939
        num_pages       = 64;
6940
        min_write_delay = 4500;
6941
        max_write_delay = 4500;
6942
        readback_p1     = 0xff;
6943
        readback_p2     = 0xff;
6944
        read_lo         = "  0  0  1  0   0  0  0  0",
6945
                          "  x  x  x  x   x  x a9 a8",
6946
                          " a7 a6 a5 a4  a3 a2 a1 a0",
6947
                          "  o  o  o  o   o  o  o  o";
6948
 
6949
        read_hi         = "  0  0  1  0   1  0  0  0",
6950
                          "  x  x  x  x   x  x a9 a8",
6951
                          " a7 a6 a5 a4  a3 a2 a1 a0",
6952
                          "  o  o  o  o   o  o  o  o";
6953
 
6954
        loadpage_lo     = "  0  1  0  0   0  0  0  0",
6955
                          "  x  x  x  x   x  x  x  x",
6956
                          "  x  x  x  x  a3 a2 a1 a0",
6957
                          "  i  i  i  i   i  i  i  i";
6958
 
6959
        loadpage_hi     = "  0  1  0  0   1  0  0  0",
6960
                          "  x  x  x  x   x  x  x  x",
6961
                          "  x  x  x  x  a3 a2 a1 a0",
6962
                          "  i  i  i  i   i  i  i  i";
6963
 
6964
        writepage       = "  0  1  0  0   1  1  0  0",
6965
                          "  x  x  x  x   x  x a9 a8",
6966
                          " a7 a6 a5 a4   x  x  x  x",
6967
                          "  x  x  x  x   x  x  x  x";
6968
 
6969
	mode		= 0x21;
6970
	delay		= 6;
6971
	blocksize	= 16;
6972
	readsize	= 256;
6973
    ;
6974
 
6975
    memory "signature"
6976
        size            = 3;
6977
        read            = "0  0  1  1   0  0  0  0    x x x x  x x x x",
6978
                          "0  0  0  0   0  0 a1 a0    o o o o  o o o o";
6979
    ;
6980
 
6981
    memory "lock"
6982
        size            = 1;
6983
        read            = "0  1  0  1   1  0  0  0    x x x x  x x x x",
6984
                          "x  x  x  x   x  x  x  x    x x x x  x x o o";
6985
 
6986
        write           = "1  0  1  0   1  1  0  0    1 1 1 1  1 1 i i",
6987
                          "x  x  x  x   x  x  x  x    x x x x  x x x x";
6988
        min_write_delay = 9000;
6989
        max_write_delay = 9000;
6990
    ;
6991
 
6992
    memory "lfuse"
6993
        size            = 1;
6994
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
6995
                          "x x x x  x x x x  i i i i  i i i i";
6996
 
6997
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
6998
                          "x x x x  x x x x  o o o o  o o o o";
6999
        min_write_delay = 9000;
7000
        max_write_delay = 9000;
7001
      ;
7002
 
7003
    memory "hfuse"
7004
        size            = 1;
7005
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
7006
                          "x x x x  x x x x  x x x i  i i i i";
7007
 
7008
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
7009
                          "x x x x  x x x x  x x x o  o o o o";
7010
        min_write_delay = 9000;
7011
        max_write_delay = 9000;
7012
      ;
7013
 
7014
    memory "calibration"
7015
        size            = 4;
7016
        read            = "0  0  1  1   1  0  0  0    x x x x  x x x x",
7017
                          "0  0  0  0   0  0 a1 a0    o o o o  o o o o";
7018
    ;
7019
 
7020
;
7021
 
7022
 
7023
#------------------------------------------------------------
7024
# ATtiny261
7025
#------------------------------------------------------------
7026
# Close to ATtiny26
7027
 
7028
part
7029
    id                  = "t261";
7030
    desc                = "ATTINY261";
7031
     has_debugwire = yes;
7032
     flash_instr   = 0xB4, 0x00, 0x10;
7033
     eeprom_instr  = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
7034
	             0xBC, 0x00, 0xB4, 0x00, 0xBA, 0x0D, 0xBB, 0xBC,
7035
	             0x99, 0xE1, 0xBB, 0xAC;
7036
#    stk500_devcode      = 0x21;
7037
#    avr910_devcode      = 0x5e;
7038
    signature           = 0x1e 0x91 0x0c;
7039
    pagel               = 0xb3;
7040
    bs2                 = 0xb2;
7041
    chip_erase_delay    = 4000;
7042
 
7043
    pgm_enable          = "1 0 1 0  1 1 0 0   0 1 0 1  0 0 1 1",
7044
                          "x x x x  x x x x   x x x x  x x x x";
7045
 
7046
    chip_erase          = "1 0 1 0  1 1 0 0   1 0 0 x  x x x x",
7047
                          "x x x x  x x x x   x x x x  x x x x";
7048
 
7049
    timeout		= 200;
7050
    stabdelay		= 100;
7051
    cmdexedelay		= 25;
7052
    synchloops		= 32;
7053
    bytedelay		= 0;
7054
    pollindex		= 3;
7055
    pollvalue		= 0x53;
7056
    predelay		= 1;
7057
    postdelay		= 1;
7058
    pollmethod		= 0;
7059
 
7060
    pp_controlstack     =
7061
        0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC,
7062
        0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC,
7063
        0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C,
7064
        0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00;
7065
    hventerstabdelay    = 100;
7066
    progmodedelay       = 0;
7067
    latchcycles         = 5;
7068
    togglevtg           = 1;
7069
    poweroffdelay       = 15;
7070
    resetdelayms        = 2;
7071
    resetdelayus        = 0;
7072
    hvleavestabdelay    = 15;
7073
    chiperasepulsewidth = 0;
7074
    chiperasepolltimeout = 10;
7075
    programfusepulsewidth = 0;
7076
    programfusepolltimeout = 5;
7077
    programlockpulsewidth = 0;
7078
    programlockpolltimeout = 5;
7079
 
7080
    memory "eeprom"
7081
        paged           = no;
7082
        size            = 128;
7083
        page_size       = 4;
7084
        num_pages       = 32;
7085
        min_write_delay = 4000;
7086
        max_write_delay = 4000;
7087
        readback_p1     = 0xff;
7088
        readback_p2     = 0xff;
7089
 
7090
        read            = "1  0  1  0   0  0  0  0    x x x x  x x x x",
7091
                          "x a6 a5 a4  a3 a2 a1 a0    o o o o  o o o o";
7092
 
7093
        write           = "1  1  0  0   0  0  0  0    x x x x  x x x x",
7094
                          "x a6 a5 a4  a3 a2 a1 a0    i i i i  i i i i";
7095
 
7096
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
7097
			  "  0   0   0   0      0   0   0   0",
7098
			  "  0   0   0   0      0   0  a1  a0",
7099
			  "  i   i   i   i      i   i   i   i";
7100
 
7101
	writepage	= "  1   1   0   0      0   0   1   0",
7102
			  "  0   0   x   x      x   x   x   x",
7103
			  "  x  a6  a5  a4     a3  a2   0   0",
7104
			  "  x   x   x   x      x   x   x   x";
7105
 
7106
	mode		= 0x41;
7107
	delay		= 10;
7108
	blocksize	= 4;
7109
	readsize	= 256;
7110
    ;
7111
 
7112
    memory "flash"
7113
        paged           = yes;
7114
        size            = 2048;
7115
        page_size       = 32;
7116
        num_pages       = 64;
7117
        min_write_delay = 4500;
7118
        max_write_delay = 4500;
7119
        readback_p1     = 0xff;
7120
        readback_p2     = 0xff;
7121
 
7122
        read_lo         = "  0  0  1  0   0  0  0  0",
7123
                          "  x  x  x  x   x  x a9 a8",
7124
                          " a7 a6 a5 a4  a3 a2 a1 a0",
7125
                          "  o  o  o  o   o  o  o  o";
7126
 
7127
        read_hi         = "  0  0  1  0   1  0  0  0",
7128
                          "  x  x  x  x   x  x a9 a8",
7129
                          " a7 a6 a5 a4  a3 a2 a1 a0",
7130
                          "  o  o  o  o   o  o  o  o";
7131
 
7132
        loadpage_lo     = "  0  1  0  0   0  0  0  0",
7133
                          "  x  x  x  x   x  x  x  x",
7134
                          "  x  x  x  x  a3 a2 a1 a0",
7135
                          "  i  i  i  i   i  i  i  i";
7136
 
7137
        loadpage_hi     = "  0  1  0  0   1  0  0  0",
7138
                          "  x  x  x  x   x  x  x  x",
7139
                          "  x  x  x  x  a3 a2 a1 a0",
7140
                          "  i  i  i  i   i  i  i  i";
7141
 
7142
        writepage       = "  0  1  0  0   1  1  0  0",
7143
                          "  x  x  x  x   x  x a9 a8",
7144
                          " a7 a6 a5 a4   x  x  x  x",
7145
                          "  x  x  x  x   x  x  x  x";
7146
 
7147
	mode		= 0x41;
7148
	delay		= 6;
7149
	blocksize	= 32;
7150
	readsize	= 256;
7151
    ;
7152
 
7153
    memory "signature"
7154
        size            = 3;
7155
        read            = "0  0  1  1   0  0  0  0    x x x x  x x x x",
7156
                          "0  0  0  0   0  0 a1 a0    o o o o  o o o o";
7157
    ;
7158
 
7159
    memory "lock"
7160
        size            = 1;
7161
        read            = "0  1  0  1   1  0  0  0    x x x x  x x x x",
7162
                          "x  x  x  x   x  x  x  x    x x x x  x x o o";
7163
 
7164
        write           = "1  0  1  0   1  1  0  0    1 1 1 1  1 1 i i",
7165
                          "x  x  x  x   x  x  x  x    x x x x  x x x x";
7166
        min_write_delay = 4500;
7167
        max_write_delay = 4500;
7168
    ;
7169
 
7170
    memory "lfuse"
7171
        size            = 1;
7172
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
7173
                          "x x x x  x x x x  i i i i  i i i i";
7174
 
7175
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
7176
                          "x x x x  x x x x  o o o o  o o o o";
7177
        min_write_delay = 4500;
7178
        max_write_delay = 4500;
7179
      ;
7180
 
7181
    memory "hfuse"
7182
        size            = 1;
7183
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
7184
                          "x x x x  x x x x  i i i i  i i i i";
7185
 
7186
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
7187
                          "x x x x  x x x x  o o o o  o o o o";
7188
        min_write_delay = 4500;
7189
        max_write_delay = 4500;
7190
      ;
7191
 
7192
    memory "efuse"
7193
        size            = 1;
7194
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
7195
                          "x x x x  x x x x   x x x x  x x x i";
7196
 
7197
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
7198
                          "x x x x  x x x x   x x x x  x x x o";
7199
        min_write_delay = 4500;
7200
        max_write_delay = 4500;
7201
      ;
7202
 
7203
    memory "calibration"
7204
        size            = 1;
7205
        read            = "0  0  1  1   1  0  0  0    x x x x  x x x x",
7206
                          "0  0  0  0   0  0  0  0    o o o o  o o o o";
7207
    ;
7208
 
7209
;
7210
 
7211
 
7212
#------------------------------------------------------------
7213
# ATtiny461
7214
#------------------------------------------------------------
7215
# Close to ATtiny261
7216
 
7217
part
7218
    id                  = "t461";
7219
    desc                = "ATTINY461";
7220
     has_debugwire = yes;
7221
     flash_instr   = 0xB4, 0x00, 0x10;
7222
     eeprom_instr  = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
7223
	             0xBC, 0x00, 0xB4, 0x00, 0xBA, 0x0D, 0xBB, 0xBC,
7224
	             0x99, 0xE1, 0xBB, 0xAC;
7225
#    stk500_devcode      = 0x21;
7226
#    avr910_devcode      = 0x5e;
7227
    signature           = 0x1e 0x92 0x08;
7228
    pagel               = 0xb3;
7229
    bs2                 = 0xb2;
7230
    chip_erase_delay    = 4000;
7231
 
7232
    pgm_enable          = "1 0 1 0  1 1 0 0   0 1 0 1  0 0 1 1",
7233
                          "x x x x  x x x x   x x x x  x x x x";
7234
 
7235
    chip_erase          = "1 0 1 0  1 1 0 0   1 0 0 x  x x x x",
7236
                          "x x x x  x x x x   x x x x  x x x x";
7237
 
7238
    timeout		= 200;
7239
    stabdelay		= 100;
7240
    cmdexedelay		= 25;
7241
    synchloops		= 32;
7242
    bytedelay		= 0;
7243
    pollindex		= 3;
7244
    pollvalue		= 0x53;
7245
    predelay		= 1;
7246
    postdelay		= 1;
7247
    pollmethod		= 0;
7248
 
7249
    pp_controlstack     =
7250
        0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC,
7251
        0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC,
7252
        0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C,
7253
        0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00;
7254
    hventerstabdelay    = 100;
7255
    progmodedelay       = 0;
7256
    latchcycles         = 5;
7257
    togglevtg           = 1;
7258
    poweroffdelay       = 15;
7259
    resetdelayms        = 2;
7260
    resetdelayus        = 0;
7261
    hvleavestabdelay    = 15;
7262
    chiperasepulsewidth = 0;
7263
    chiperasepolltimeout = 10;
7264
    programfusepulsewidth = 0;
7265
    programfusepolltimeout = 5;
7266
    programlockpulsewidth = 0;
7267
    programlockpolltimeout = 5;
7268
 
7269
    memory "eeprom"
7270
        paged           = no;
7271
        size            = 256;
7272
        page_size       = 4;
7273
        num_pages       = 64;
7274
        min_write_delay = 4000;
7275
        max_write_delay = 4000;
7276
        readback_p1     = 0xff;
7277
        readback_p2     = 0xff;
7278
 
7279
        read            = " 1  0  1  0   0  0  0  0    x x x x  x x x x",
7280
                          "a7 a6 a5 a4  a3 a2 a1 a0    o o o o  o o o o";
7281
 
7282
        write           = " 1  1  0  0   0  0  0  0    x x x x  x x x x",
7283
                          "a7 a6 a5 a4  a3 a2 a1 a0    i i i i  i i i i";
7284
 
7285
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
7286
			  "  0   0   0   0      0   0   0   0",
7287
			  "  0   0   0   0      0   0  a1  a0",
7288
			  "  i   i   i   i      i   i   i   i";
7289
 
7290
	writepage	= "  1   1   0   0      0   0   1   0",
7291
			  "  0   0   x   x      x   x   x   x",
7292
			  " a7  a6  a5  a4     a3  a2   0   0",
7293
			  "  x   x   x   x      x   x   x   x";
7294
 
7295
	mode		= 0x41;
7296
	delay		= 10;
7297
	blocksize	= 4;
7298
	readsize	= 256;
7299
    ;
7300
 
7301
    memory "flash"
7302
        paged           = yes;
7303
        size            = 4096;
7304
        page_size       = 64;
7305
        num_pages       = 64;
7306
        min_write_delay = 4500;
7307
        max_write_delay = 4500;
7308
        readback_p1     = 0xff;
7309
        readback_p2     = 0xff;
7310
 
7311
        read_lo         = "  0  0  1  0   0   0  0  0",
7312
                          "  x  x  x  x   x a10 a9 a8",
7313
                          " a7 a6 a5 a4  a3  a2 a1 a0",
7314
                          "  o  o  o  o   o   o  o  o";
7315
 
7316
        read_hi         = "  0  0  1  0   1   0  0  0",
7317
                          "  x  x  x  x   x a10 a9 a8",
7318
                          " a7 a6 a5 a4  a3  a2 a1 a0",
7319
                          "  o  o  o  o   o   o  o  o";
7320
 
7321
        loadpage_lo     = "  0  1  0  0   0  0  0  0",
7322
                          "  x  x  x  x   x  x  x  x",
7323
                          "  x  x  x a4  a3 a2 a1 a0",
7324
                          "  i  i  i  i   i  i  i  i";
7325
 
7326
        loadpage_hi     = "  0  1  0  0   1  0  0  0",
7327
                          "  x  x  x  x   x  x  x  x",
7328
                          "  x  x  x a4  a3 a2 a1 a0",
7329
                          "  i  i  i  i   i  i  i  i";
7330
 
7331
        writepage       = "  0  1  0  0   1   1  0  0",
7332
                          "  x  x  x  x   x a10 a9 a8",
7333
                          " a7 a6 a5  x   x   x  x  x",
7334
                          "  x  x  x  x   x   x  x  x";
7335
 
7336
	mode		= 0x41;
7337
	delay		= 6;
7338
	blocksize	= 64;
7339
	readsize	= 256;
7340
    ;
7341
 
7342
    memory "signature"
7343
        size            = 3;
7344
        read            = "0  0  1  1   0  0  0  0    x x x x  x x x x",
7345
                          "0  0  0  0   0  0 a1 a0    o o o o  o o o o";
7346
    ;
7347
 
7348
    memory "lock"
7349
        size            = 1;
7350
        read            = "0  1  0  1   1  0  0  0    x x x x  x x x x",
7351
                          "x  x  x  x   x  x  x  x    x x x x  x x o o";
7352
 
7353
        write           = "1  0  1  0   1  1  0  0    1 1 1 1  1 1 i i",
7354
                          "x  x  x  x   x  x  x  x    x x x x  x x x x";
7355
        min_write_delay = 4500;
7356
        max_write_delay = 4500;
7357
    ;
7358
 
7359
    memory "lfuse"
7360
        size            = 1;
7361
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
7362
                          "x x x x  x x x x  i i i i  i i i i";
7363
 
7364
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
7365
                          "x x x x  x x x x  o o o o  o o o o";
7366
        min_write_delay = 4500;
7367
        max_write_delay = 4500;
7368
      ;
7369
 
7370
    memory "hfuse"
7371
        size            = 1;
7372
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
7373
                          "x x x x  x x x x  i i i i  i i i i";
7374
 
7375
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
7376
                          "x x x x  x x x x  o o o o  o o o o";
7377
        min_write_delay = 4500;
7378
        max_write_delay = 4500;
7379
      ;
7380
 
7381
    memory "efuse"
7382
        size            = 1;
7383
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
7384
                          "x x x x  x x x x   x x x x  x x x i";
7385
 
7386
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
7387
                          "x x x x  x x x x   x x x x  x x x o";
7388
        min_write_delay = 4500;
7389
        max_write_delay = 4500;
7390
      ;
7391
 
7392
    memory "calibration"
7393
        size            = 1;
7394
        read            = "0  0  1  1   1  0  0  0    x x x x  x x x x",
7395
                          "0  0  0  0   0  0  0  0    o o o o  o o o o";
7396
    ;
7397
 
7398
;
7399
 
7400
 
7401
#------------------------------------------------------------
7402
# ATtiny861
7403
#------------------------------------------------------------
7404
# Close to ATtiny461
7405
 
7406
part
7407
    id                  = "t861";
7408
    desc                = "ATTINY861";
7409
     has_debugwire = yes;
7410
     flash_instr   = 0xB4, 0x00, 0x10;
7411
     eeprom_instr  = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
7412
	             0xBC, 0x00, 0xB4, 0x00, 0xBA, 0x0D, 0xBB, 0xBC,
7413
	             0x99, 0xE1, 0xBB, 0xAC;
7414
#    stk500_devcode      = 0x21;
7415
#    avr910_devcode      = 0x5e;
7416
    signature           = 0x1e 0x93 0x0d;
7417
    pagel               = 0xb3;
7418
    bs2                 = 0xb2;
7419
    chip_erase_delay    = 4000;
7420
 
7421
    pgm_enable          = "1 0 1 0  1 1 0 0   0 1 0 1  0 0 1 1",
7422
                          "x x x x  x x x x   x x x x  x x x x";
7423
 
7424
    chip_erase          = "1 0 1 0  1 1 0 0   1 0 0 x  x x x x",
7425
                          "x x x x  x x x x   x x x x  x x x x";
7426
 
7427
    timeout		= 200;
7428
    stabdelay		= 100;
7429
    cmdexedelay		= 25;
7430
    synchloops		= 32;
7431
    bytedelay		= 0;
7432
    pollindex		= 3;
7433
    pollvalue		= 0x53;
7434
    predelay		= 1;
7435
    postdelay		= 1;
7436
    pollmethod		= 0;
7437
 
7438
    pp_controlstack     =
7439
        0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC,
7440
        0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC,
7441
        0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C,
7442
        0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00;
7443
    hventerstabdelay    = 100;
7444
    progmodedelay       = 0;
7445
    latchcycles         = 5;
7446
    togglevtg           = 1;
7447
    poweroffdelay       = 15;
7448
    resetdelayms        = 2;
7449
    resetdelayus        = 0;
7450
    hvleavestabdelay    = 15;
7451
    chiperasepulsewidth = 0;
7452
    chiperasepolltimeout = 10;
7453
    programfusepulsewidth = 0;
7454
    programfusepolltimeout = 5;
7455
    programlockpulsewidth = 0;
7456
    programlockpolltimeout = 5;
7457
 
7458
    memory "eeprom"
7459
        paged           = no;
7460
        size            = 512;
7461
        num_pages       = 128;
7462
        page_size       = 4;
7463
        min_write_delay = 4000;
7464
        max_write_delay = 4000;
7465
        readback_p1     = 0xff;
7466
        readback_p2     = 0xff;
7467
 
7468
        read            = " 1  0  1  0   0  0  0  0    x x x x  x x x a8",
7469
                          "a7 a6 a5 a4  a3 a2 a1 a0    o o o o  o o o  o";
7470
 
7471
        write           = " 1  1  0  0   0  0  0  0    x x x x  x x x a8",
7472
                          "a7 a6 a5 a4  a3 a2 a1 a0    i i i i  i i i  i";
7473
 
7474
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
7475
			  "  0   0   0   0      0   0   0   0",
7476
			  "  0   0   0   0      0   0  a1  a0",
7477
			  "  i   i   i   i      i   i   i   i";
7478
 
7479
	writepage	= "  1   1   0   0      0   0   1   0",
7480
			  "  0   0   x   x      x   x   x  a8",
7481
			  " a7  a6  a5  a4     a3  a2   0   0",
7482
			  "  x   x   x   x      x   x   x   x";
7483
 
7484
	mode		= 0x41;
7485
	delay		= 10;
7486
	blocksize	= 4;
7487
	readsize	= 256;
7488
    ;
7489
 
7490
    memory "flash"
7491
        paged           = yes;
7492
        size            = 8192;
7493
        page_size       = 64;
7494
        num_pages       = 128;
7495
        min_write_delay = 4500;
7496
        max_write_delay = 4500;
7497
        readback_p1     = 0xff;
7498
        readback_p2     = 0xff;
7499
 
7500
        read_lo         = "  0  0  1  0   0   0  0  0",
7501
                          "  x  x  x  x a11 a10 a9 a8",
7502
                          " a7 a6 a5 a4  a3  a2 a1 a0",
7503
                          "  o  o  o  o   o   o  o  o";
7504
 
7505
        read_hi         = "  0  0  1  0   1   0  0  0",
7506
                          "  x  x  x  x a11 a10 a9 a8",
7507
                          " a7 a6 a5 a4  a3  a2 a1 a0",
7508
                          "  o  o  o  o   o   o  o  o";
7509
 
7510
        loadpage_lo     = "  0  1  0  0   0  0  0  0",
7511
                          "  x  x  x  x   x  x  x  x",
7512
                          "  x  x  x a4  a3 a2 a1 a0",
7513
                          "  i  i  i  i   i  i  i  i";
7514
 
7515
        loadpage_hi     = "  0  1  0  0   1  0  0  0",
7516
                          "  x  x  x  x   x  x  x  x",
7517
                          "  x  x  x a4  a3 a2 a1 a0",
7518
                          "  i  i  i  i   i  i  i  i";
7519
 
7520
        writepage       = "  0  1  0  0   1   1  0  0",
7521
                          "  x  x  x  x a11 a10 a9 a8",
7522
                          " a7 a6 a5  x   x   x  x  x",
7523
                          "  x  x  x  x   x   x  x  x";
7524
 
7525
	mode		= 0x41;
7526
	delay		= 6;
7527
	blocksize	= 64;
7528
	readsize	= 256;
7529
    ;
7530
 
7531
    memory "signature"
7532
        size            = 3;
7533
        read            = "0  0  1  1   0  0  0  0    x x x x  x x x x",
7534
                          "0  0  0  0   0  0 a1 a0    o o o o  o o o o";
7535
    ;
7536
 
7537
    memory "lock"
7538
        size            = 1;
7539
        read            = "0  1  0  1   1  0  0  0    x x x x  x x x x",
7540
                          "x  x  x  x   x  x  x  x    x x x x  x x o o";
7541
 
7542
        write           = "1  0  1  0   1  1  0  0    1 1 1 1  1 1 i i",
7543
                          "x  x  x  x   x  x  x  x    x x x x  x x x x";
7544
        min_write_delay = 4500;
7545
        max_write_delay = 4500;
7546
    ;
7547
 
7548
    memory "lfuse"
7549
        size            = 1;
7550
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
7551
                          "x x x x  x x x x  i i i i  i i i i";
7552
 
7553
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
7554
                          "x x x x  x x x x  o o o o  o o o o";
7555
        min_write_delay = 4500;
7556
        max_write_delay = 4500;
7557
      ;
7558
 
7559
    memory "hfuse"
7560
        size            = 1;
7561
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
7562
                          "x x x x  x x x x  i i i i  i i i i";
7563
 
7564
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
7565
                          "x x x x  x x x x  o o o o  o o o o";
7566
        min_write_delay = 4500;
7567
        max_write_delay = 4500;
7568
      ;
7569
 
7570
    memory "efuse"
7571
        size            = 1;
7572
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
7573
                          "x x x x  x x x x   x x x x  x x x i";
7574
 
7575
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
7576
                          "x x x x  x x x x   x x x x  x x x o";
7577
        min_write_delay = 4500;
7578
        max_write_delay = 4500;
7579
      ;
7580
 
7581
    memory "calibration"
7582
        size            = 1;
7583
        read            = "0  0  1  1   1  0  0  0    x x x x  x x x x",
7584
                          "0  0  0  0   0  0  0  0    o o o o  o o o o";
7585
    ;
7586
 
7587
;
7588
 
7589
 
7590
#------------------------------------------------------------
7591
# ATmega48
7592
#------------------------------------------------------------
7593
 
7594
part
7595
    id               = "m48";
7596
    desc             = "ATMEGA48";
7597
     has_debugwire = yes;
7598
     flash_instr   = 0xB6, 0x01, 0x11;
7599
     eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
7600
	             0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
7601
	             0x99, 0xF9, 0xBB, 0xAF;
7602
    stk500_devcode   = 0x59;
7603
#    avr910_devcode   = 0x;
7604
    signature        = 0x1e 0x92 0x05;
7605
    pagel            = 0xd7;
7606
    bs2              = 0xc2;
7607
    chip_erase_delay = 45000;
7608
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
7609
                       "x x x x  x x x x    x x x x  x x x x";
7610
 
7611
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
7612
                       "x x x x  x x x x    x x x x  x x x x";
7613
 
7614
    timeout		= 200;
7615
    stabdelay		= 100;
7616
    cmdexedelay		= 25;
7617
    synchloops		= 32;
7618
    bytedelay		= 0;
7619
    pollindex		= 3;
7620
    pollvalue		= 0x53;
7621
    predelay		= 1;
7622
    postdelay		= 1;
7623
    pollmethod		= 1;
7624
 
7625
    pp_controlstack     =
7626
	0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
7627
	0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
7628
	0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
7629
	0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
7630
    hventerstabdelay    = 100;
7631
    progmodedelay       = 0;
7632
    latchcycles         = 5;
7633
    togglevtg           = 1;
7634
    poweroffdelay       = 15;
7635
    resetdelayms        = 1;
7636
    resetdelayus        = 0;
7637
    hvleavestabdelay    = 15;
7638
    resetdelay          = 15;
7639
    chiperasepulsewidth = 0;
7640
    chiperasepolltimeout = 10;
7641
    programfusepulsewidth = 0;
7642
    programfusepolltimeout = 5;
7643
    programlockpulsewidth = 0;
7644
    programlockpolltimeout = 5;
7645
 
7646
    memory "eeprom"
7647
        paged           = no;
7648
        page_size       = 4;
7649
        size            = 256;
7650
        min_write_delay = 3600;
7651
        max_write_delay = 3600;
7652
        readback_p1     = 0xff;
7653
        readback_p2     = 0xff;
7654
	read            = "  1   0   1   0      0   0   0   0",
7655
                          "  0   0   0   x      x   x   x   x",
7656
                          " a7  a6  a5  a4     a3  a2  a1  a0",
7657
                          "  o   o   o   o      o   o   o   o";
7658
 
7659
	write           = "  1   1   0   0      0   0   0   0",
7660
                          "  0   0   0   x      x   x   x   x",
7661
                          " a7  a6  a5  a4     a3  a2  a1  a0",
7662
                          "  i   i   i   i      i   i   i   i";
7663
 
7664
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
7665
			  "  0   0   0   0      0   0   0   0",
7666
			  "  0   0   0   0      0   0  a1  a0",
7667
			  "  i   i   i   i      i   i   i   i";
7668
 
7669
	writepage	= "  1   1   0   0      0   0   1   0",
7670
			  "  0   0   x   x      x   x   x   x",
7671
			  " a7  a6  a5  a4     a3  a2   0   0",
7672
			  "  x   x   x   x      x   x   x   x";
7673
 
7674
	mode		= 0x41;
7675
	delay		= 5;
7676
	blocksize	= 4;
7677
	readsize	= 256;
7678
      ;
7679
    memory "flash"
7680
        paged           = yes;
7681
        size            = 4096;
7682
        page_size       = 64;
7683
        num_pages       = 64;
7684
        min_write_delay = 4500;
7685
        max_write_delay = 4500;
7686
        readback_p1     = 0x00;
7687
        readback_p2     = 0x00;
7688
        read_lo         = "  0   0   1   0    0   0   0   0",
7689
                          "  0   0   0   0    0 a10  a9  a8",
7690
                          " a7  a6  a5  a4   a3  a2  a1  a0",
7691
                          "  o   o   o   o    o   o   o   o";
7692
 
7693
        read_hi         = "  0   0   1   0    1   0   0   0",
7694
                          "  0   0   0   0    0 a10  a9  a8",
7695
                          " a7  a6  a5  a4   a3  a2  a1  a0",
7696
                          "  o   o   o   o    o   o   o   o";
7697
 
7698
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
7699
                          "  0   0   0   x      x   x   x   x",
7700
                          "  x   x   x  a4     a3  a2  a1  a0",
7701
                          "  i   i   i   i      i   i   i   i";
7702
 
7703
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
7704
                          "  0   0   0   x      x   x   x   x",
7705
                          "  x   x   x  a4     a3  a2  a1  a0",
7706
                          "  i   i   i   i      i   i   i   i";
7707
 
7708
        writepage       = "  0   1   0   0      1   1   0   0",
7709
                          "  0   0   0   0      0 a10  a9  a8",
7710
                          " a7  a6  a5   x      x   x   x   x",
7711
                          "  x   x   x   x      x   x   x   x";
7712
 
7713
	mode		= 0x41;
7714
	delay		= 6;
7715
	blocksize	= 64;
7716
	readsize	= 256;
7717
      ;
7718
 
7719
    memory "lfuse"
7720
        size            = 1;
7721
        min_write_delay = 4500;
7722
        max_write_delay = 4500;
7723
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
7724
                          "x x x x  x x x x   o o o o  o o o o";
7725
 
7726
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
7727
                          "x x x x  x x x x   i i i i  i i i i";
7728
      ;
7729
 
7730
    memory "hfuse"
7731
        size            = 1;
7732
        min_write_delay = 4500;
7733
        max_write_delay = 4500;
7734
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
7735
                          "x x x x  x x x x   o o o o  o o o o";
7736
 
7737
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
7738
                          "x x x x  x x x x   i i i i  i i i i";
7739
      ;
7740
 
7741
    memory "efuse"
7742
        size            = 1;
7743
        min_write_delay = 4500;
7744
        max_write_delay = 4500;
7745
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
7746
                          "x x x x  x x x x   x x x x  x x x o";
7747
 
7748
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
7749
                          "x x x x  x x x x   x x x x  x x x i";
7750
      ;
7751
 
7752
    memory "lock"
7753
        size            = 1;
7754
        min_write_delay = 4500;
7755
        max_write_delay = 4500;
7756
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
7757
                          "x x x x  x x x x   x x o o  o o o o";
7758
 
7759
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
7760
                          "x x x x  x x x x   1 1 i i  i i i i";
7761
      ;
7762
 
7763
    memory "calibration"
7764
        size            = 1;
7765
        read            = "0  0  1  1   1  0  0  0   0  0  0  x   x  x  x  x",
7766
                          "0  0  0  0   0  0  0  0   o  o  o  o   o  o  o  o";
7767
      ;
7768
 
7769
    memory "signature"
7770
        size            = 3;
7771
        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
7772
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
7773
      ;
7774
  ;
7775
 
7776
 
7777
#------------------------------------------------------------
7778
# ATmega88
7779
#------------------------------------------------------------
7780
 
7781
part
7782
    id               = "m88";
7783
    desc             = "ATMEGA88";
7784
     has_debugwire = yes;
7785
     flash_instr   = 0xB6, 0x01, 0x11;
7786
     eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
7787
	             0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
7788
	             0x99, 0xF9, 0xBB, 0xAF;
7789
    stk500_devcode   = 0x73;
7790
#    avr910_devcode   = 0x;
7791
    signature        = 0x1e 0x93 0x0a;
7792
    pagel            = 0xd7;
7793
    bs2              = 0xc2;
7794
    chip_erase_delay = 9000;
7795
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
7796
                       "x x x x  x x x x    x x x x  x x x x";
7797
 
7798
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
7799
                       "x x x x  x x x x    x x x x  x x x x";
7800
 
7801
    timeout		= 200;
7802
    stabdelay		= 100;
7803
    cmdexedelay		= 25;
7804
    synchloops		= 32;
7805
    bytedelay		= 0;
7806
    pollindex		= 3;
7807
    pollvalue		= 0x53;
7808
    predelay		= 1;
7809
    postdelay		= 1;
7810
    pollmethod		= 1;
7811
 
7812
    pp_controlstack     =
7813
	0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
7814
	0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
7815
	0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
7816
	0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
7817
    hventerstabdelay    = 100;
7818
    progmodedelay       = 0;
7819
    latchcycles         = 5;
7820
    togglevtg           = 1;
7821
    poweroffdelay       = 15;
7822
    resetdelayms        = 1;
7823
    resetdelayus        = 0;
7824
    hvleavestabdelay    = 15;
7825
    resetdelay          = 15;
7826
    chiperasepulsewidth = 0;
7827
    chiperasepolltimeout = 10;
7828
    programfusepulsewidth = 0;
7829
    programfusepolltimeout = 5;
7830
    programlockpulsewidth = 0;
7831
    programlockpolltimeout = 5;
7832
 
7833
    memory "eeprom"
7834
        paged           = no;
7835
        page_size       = 4;
7836
        size            = 512;
7837
        min_write_delay = 3600;
7838
        max_write_delay = 3600;
7839
        readback_p1     = 0xff;
7840
        readback_p2     = 0xff;
7841
	read            = "  1   0   1   0      0   0   0   0",
7842
                          "  0   0   0   x      x   x   x  a8",
7843
                          " a7  a6  a5  a4     a3  a2  a1  a0",
7844
                          "  o   o   o   o      o   o   o   o";
7845
 
7846
	write           = "  1   1   0   0      0   0   0   0",
7847
                          "  0   0   0   x      x   x   x  a8",
7848
                          " a7  a6  a5  a4     a3  a2  a1  a0",
7849
                          "  i   i   i   i      i   i   i   i";
7850
 
7851
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
7852
			  "  0   0   0   0      0   0   0   0",
7853
			  "  0   0   0   0      0   0  a1  a0",
7854
			  "  i   i   i   i      i   i   i   i";
7855
 
7856
	writepage	= "  1   1   0   0      0   0   1   0",
7857
			  "  0   0   x   x      x   x   x  a8",
7858
			  " a7  a6  a5  a4     a3  a2   0   0",
7859
			  "  x   x   x   x      x   x   x   x";
7860
 
7861
	mode		= 0x41;
7862
	delay		= 5;
7863
	blocksize	= 4;
7864
	readsize	= 256;
7865
      ;
7866
    memory "flash"
7867
        paged           = yes;
7868
        size            = 8192;
7869
        page_size       = 64;
7870
        num_pages       = 128;
7871
        min_write_delay = 4500;
7872
        max_write_delay = 4500;
7873
        readback_p1     = 0xff;
7874
        readback_p2     = 0xff;
7875
        read_lo         = "  0   0   1   0    0   0   0   0",
7876
                          "  0   0   0   0  a11 a10  a9  a8",
7877
                          " a7  a6  a5  a4   a3  a2  a1  a0",
7878
                          "  o   o   o   o    o   o   o   o";
7879
 
7880
        read_hi         = "  0   0   1   0    1   0   0   0",
7881
                          "  0   0   0   0  a11 a10  a9  a8",
7882
                          " a7  a6  a5  a4   a3  a2  a1  a0",
7883
                          "  o   o   o   o    o   o   o   o";
7884
 
7885
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
7886
                          "  0   0   0   x      x   x   x   x",
7887
                          "  x   x   x  a4     a3  a2  a1  a0",
7888
                          "  i   i   i   i      i   i   i   i";
7889
 
7890
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
7891
                          "  0   0   0   x      x   x   x   x",
7892
                          "  x   x   x  a4     a3  a2  a1  a0",
7893
                          "  i   i   i   i      i   i   i   i";
7894
 
7895
        writepage       = "  0   1   0   0      1   1   0   0",
7896
                          "  0   0   0   0    a11 a10  a9  a8",
7897
                          " a7  a6  a5   x      x   x   x   x",
7898
                          "  x   x   x   x      x   x   x   x";
7899
 
7900
	mode		= 0x41;
7901
	delay		= 6;
7902
	blocksize	= 64;
7903
	readsize	= 256;
7904
      ;
7905
 
7906
    memory "lfuse"
7907
        size            = 1;
7908
        min_write_delay = 4500;
7909
        max_write_delay = 4500;
7910
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
7911
                          "x x x x  x x x x   o o o o  o o o o";
7912
 
7913
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
7914
                          "x x x x  x x x x   i i i i  i i i i";
7915
      ;
7916
 
7917
    memory "hfuse"
7918
        size            = 1;
7919
        min_write_delay = 4500;
7920
        max_write_delay = 4500;
7921
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
7922
                          "x x x x  x x x x   o o o o  o o o o";
7923
 
7924
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
7925
                          "x x x x  x x x x   i i i i  i i i i";
7926
      ;
7927
 
7928
    memory "efuse"
7929
        size            = 1;
7930
        min_write_delay = 4500;
7931
        max_write_delay = 4500;
7932
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
7933
                          "x x x x  x x x x   x x x x  x o o o";
7934
 
7935
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
7936
                          "x x x x  x x x x   x x x x  x i i i";
7937
      ;
7938
 
7939
    memory "lock"
7940
        size            = 1;
7941
        min_write_delay = 4500;
7942
        max_write_delay = 4500;
7943
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
7944
                          "x x x x  x x x x   x x o o  o o o o";
7945
 
7946
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
7947
                          "x x x x  x x x x   1 1 i i  i i i i";
7948
      ;
7949
 
7950
    memory "calibration"
7951
        size            = 1;
7952
        read            = "0  0  1  1   1  0  0  0   0  0  0  x   x  x  x  x",
7953
                          "0  0  0  0   0  0  0  0   o  o  o  o   o  o  o  o";
7954
      ;
7955
 
7956
    memory "signature"
7957
        size            = 3;
7958
        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
7959
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
7960
      ;
7961
  ;
7962
 
7963
#------------------------------------------------------------
7964
# ATmega168
7965
#------------------------------------------------------------
7966
 
7967
part
7968
    id              = "m168";
7969
    desc            = "ATMEGA168";
7970
     has_debugwire = yes;
7971
     flash_instr   = 0xB6, 0x01, 0x11;
7972
     eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
7973
	             0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
7974
	             0x99, 0xF9, 0xBB, 0xAF;
7975
    stk500_devcode  = 0x86;
7976
    # avr910_devcode = 0x;
7977
    signature       = 0x1e 0x94 0x06;
7978
    pagel           = 0xd7;
7979
    bs2             = 0xc2;
7980
    chip_erase_delay = 9000;
7981
    pgm_enable       = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
7982
                       "x x x x x x x x x x x x x x x x";
7983
 
7984
    chip_erase       = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
7985
                       "x x x x x x x x x x x x x x x x";
7986
 
7987
    timeout         = 200;
7988
    stabdelay       = 100;
7989
    cmdexedelay     = 25;
7990
    synchloops      = 32;
7991
    bytedelay       = 0;
7992
    pollindex       = 3;
7993
    pollvalue       = 0x53;
7994
    predelay        = 1;
7995
    postdelay       = 1;
7996
    pollmethod      = 1;
7997
 
7998
    pp_controlstack     =
7999
	0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
8000
	0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
8001
	0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
8002
	0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
8003
    hventerstabdelay    = 100;
8004
    progmodedelay       = 0;
8005
    latchcycles         = 5;
8006
    togglevtg           = 1;
8007
    poweroffdelay       = 15;
8008
    resetdelayms        = 1;
8009
    resetdelayus        = 0;
8010
    hvleavestabdelay    = 15;
8011
    resetdelay          = 15;
8012
    chiperasepulsewidth = 0;
8013
    chiperasepolltimeout = 10;
8014
    programfusepulsewidth = 0;
8015
    programfusepolltimeout = 5;
8016
    programlockpulsewidth = 0;
8017
    programlockpolltimeout = 5;
8018
 
8019
    memory "eeprom"
8020
        paged           = no;
8021
        page_size       = 4;
8022
        size            = 512;
8023
        min_write_delay = 3600;
8024
        max_write_delay = 3600;
8025
        readback_p1     = 0xff;
8026
        readback_p2     = 0xff;
8027
        read            = " 1 0 1 0 0 0 0 0",
8028
                          " 0 0 0 x x x x a8",
8029
                          " a7 a6 a5 a4 a3 a2 a1 a0",
8030
                          " o o o o o o o o";
8031
 
8032
        write           = " 1 1 0 0 0 0 0 0",
8033
                          " 0 0 0 x x x x a8",
8034
                          " a7 a6 a5 a4 a3 a2 a1 a0",
8035
                          " i i i i i i i i";
8036
 
8037
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
8038
			  "  0   0   0   0      0   0   0   0",
8039
			  "  0   0   0   0      0   0  a1  a0",
8040
			  "  i   i   i   i      i   i   i   i";
8041
 
8042
	writepage	= "  1   1   0   0      0   0   1   0",
8043
			  "  0   0   x   x      x   x   x  a8",
8044
			  " a7  a6  a5  a4     a3  a2   0   0",
8045
			  "  x   x   x   x      x   x   x   x";
8046
 
8047
	mode		= 0x41;
8048
	delay		= 5;
8049
	blocksize	= 4;
8050
	readsize	= 256;
8051
        ;
8052
 
8053
    memory "flash"
8054
        paged           = yes;
8055
        size            = 16384;
8056
        page_size       = 128;
8057
        num_pages       = 128;
8058
        min_write_delay = 4500;
8059
        max_write_delay = 4500;
8060
        readback_p1     = 0xff;
8061
        readback_p2     = 0xff;
8062
        read_lo         = " 0 0 1 0 0 0 0 0",
8063
                          " 0 0 0 a12 a11 a10 a9 a8",
8064
                          " a7 a6 a5 a4 a3 a2 a1 a0",
8065
                          " o o o o o o o o";
8066
 
8067
        read_hi          = " 0 0 1 0 1 0 0 0",
8068
                           " 0 0 0 a12 a11 a10 a9 a8",
8069
                           " a7 a6 a5 a4 a3 a2 a1 a0",
8070
                           " o o o o o o o o";
8071
 
8072
        loadpage_lo     = " 0 1 0 0 0 0 0 0",
8073
                          " 0 0 0 x x x x x",
8074
                          " x x a5 a4 a3 a2 a1 a0",
8075
                          " i i i i i i i i";
8076
 
8077
        loadpage_hi     = " 0 1 0 0 1 0 0 0",
8078
                          " 0 0 0 x x x x x",
8079
                          " x x a5 a4 a3 a2 a1 a0",
8080
                          " i i i i i i i i";
8081
 
8082
        writepage       = " 0 1 0 0 1 1 0 0",
8083
                          " 0 0 0 a12 a11 a10 a9 a8",
8084
                          " a7 a6 x x x x x x",
8085
                          " x x x x x x x x";
8086
 
8087
        mode        = 0x41;
8088
        delay       = 6;
8089
        blocksize   = 128;
8090
        readsize    = 256;
8091
 
8092
        ;
8093
 
8094
    memory "lfuse"
8095
        size            = 1;
8096
        min_write_delay = 4500;
8097
        max_write_delay = 4500;
8098
        read            = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
8099
                          "x x x x x x x x o o o o o o o o";
8100
 
8101
        write           = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
8102
                          "x x x x x x x x i i i i i i i i";
8103
        ;
8104
 
8105
    memory "hfuse"
8106
        size            = 1;
8107
        min_write_delay = 4500;
8108
        max_write_delay = 4500;
8109
        read            = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
8110
                          "x x x x x x x x o o o o o o o o";
8111
 
8112
        write           = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
8113
                          "x x x x x x x x i i i i i i i i";
8114
        ;
8115
 
8116
    memory "efuse"
8117
        size            = 1;
8118
        min_write_delay = 4500;
8119
        max_write_delay = 4500;
8120
        read            = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
8121
                          "x x x x x x x x x x x x x o o o";
8122
 
8123
        write           = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
8124
                          "x x x x x x x x x x x x x i i i";
8125
        ;
8126
 
8127
    memory "lock"
8128
        size            = 1;
8129
        min_write_delay = 4500;
8130
        max_write_delay = 4500;
8131
        read            = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
8132
                          "x x x x x x x x x x o o o o o o";
8133
 
8134
        write           = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
8135
                          "x x x x x x x x 1 1 i i i i i i";
8136
        ;
8137
 
8138
    memory "calibration"
8139
        size            = 1;
8140
        read            = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
8141
                          "0 0 0 0 0 0 0 0 o o o o o o o o";
8142
        ;
8143
 
8144
    memory "signature"
8145
        size            = 3;
8146
        read            = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
8147
                          "x x x x x x a1 a0 o o o o o o o o";
8148
        ;
8149
;
8150
 
8151
#------------------------------------------------------------
8152
# ATtiny88
8153
#------------------------------------------------------------
8154
 
8155
part
8156
    id               = "t88";
8157
    desc             = "attiny88";
8158
     has_debugwire = yes;
8159
     flash_instr   = 0xB6, 0x01, 0x11;
8160
     eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
8161
	             0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
8162
	             0x99, 0xF9, 0xBB, 0xAF;
8163
    stk500_devcode   = 0x73;
8164
#    avr910_devcode   = 0x;
8165
    signature        = 0x1e 0x93 0x11;
8166
    pagel            = 0xd7;
8167
    bs2              = 0xc2;
8168
    chip_erase_delay = 9000;
8169
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
8170
                       "x x x x  x x x x    x x x x  x x x x";
8171
 
8172
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
8173
                       "x x x x  x x x x    x x x x  x x x x";
8174
 
8175
    timeout		= 200;
8176
    stabdelay		= 100;
8177
    cmdexedelay		= 25;
8178
    synchloops		= 32;
8179
    bytedelay		= 0;
8180
    pollindex		= 3;
8181
    pollvalue		= 0x53;
8182
    predelay		= 1;
8183
    postdelay		= 1;
8184
    pollmethod		= 1;
8185
 
8186
    pp_controlstack     =
8187
	0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
8188
	0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
8189
	0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
8190
	0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
8191
    hventerstabdelay    = 100;
8192
    progmodedelay       = 0;
8193
    latchcycles         = 5;
8194
    togglevtg           = 1;
8195
    poweroffdelay       = 15;
8196
    resetdelayms        = 1;
8197
    resetdelayus        = 0;
8198
    hvleavestabdelay    = 15;
8199
    resetdelay          = 15;
8200
    chiperasepulsewidth = 0;
8201
    chiperasepolltimeout = 10;
8202
    programfusepulsewidth = 0;
8203
    programfusepolltimeout = 5;
8204
    programlockpulsewidth = 0;
8205
    programlockpolltimeout = 5;
8206
 
8207
    memory "eeprom"
8208
        paged           = no;
8209
        page_size       = 4;
8210
        size            = 64;
8211
        min_write_delay = 3600;
8212
        max_write_delay = 3600;
8213
        readback_p1     = 0xff;
8214
        readback_p2     = 0xff;
8215
	read            = "  1   0   1   0      0   0   0   0",
8216
                          "  0   0   0   x      x   x   x   x",
8217
                          "  x  a6  a5  a4     a3  a2  a1  a0",
8218
                          "  o   o   o   o      o   o   o   o";
8219
 
8220
	write           = "  1   1   0   0      0   0   0   0",
8221
                          "  0   0   0   x      x   x   x   x",
8222
                          "  x  a6  a5  a4     a3  a2  a1  a0",
8223
                          "  i   i   i   i      i   i   i   i";
8224
 
8225
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
8226
			  "  0   0   0   0      0   0   0   0",
8227
			  "  0   0   0   0      0   0  a1  a0",
8228
			  "  i   i   i   i      i   i   i   i";
8229
 
8230
	writepage	= "  1   1   0   0      0   0   1   0",
8231
			  "  0   0   x   x      x   x   x   x",
8232
			  "  x  a6  a5  a4     a3  a2   0   0",
8233
			  "  x   x   x   x      x   x   x   x";
8234
 
8235
	mode		= 0x41;
8236
	delay		= 5;
8237
	blocksize	= 4;
8238
	readsize	= 64;
8239
      ;
8240
    memory "flash"
8241
        paged           = yes;
8242
        size            = 8192;
8243
        page_size       = 64;
8244
        num_pages       = 128;
8245
        min_write_delay = 4500;
8246
        max_write_delay = 4500;
8247
        readback_p1     = 0xff;
8248
        readback_p2     = 0xff;
8249
        read_lo         = "  0   0   1   0    0   0   0   0",
8250
                          "  0   0   0   0  a11 a10  a9  a8",
8251
                          " a7  a6  a5  a4   a3  a2  a1  a0",
8252
                          "  o   o   o   o    o   o   o   o";
8253
 
8254
        read_hi         = "  0   0   1   0    1   0   0   0",
8255
                          "  0   0   0   0  a11 a10  a9  a8",
8256
                          " a7  a6  a5  a4   a3  a2  a1  a0",
8257
                          "  o   o   o   o    o   o   o   o";
8258
 
8259
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
8260
                          "  0   0   0   x      x   x   x   x",
8261
                          "  x   x   x  a4     a3  a2  a1  a0",
8262
                          "  i   i   i   i      i   i   i   i";
8263
 
8264
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
8265
                          "  0   0   0   x      x   x   x   x",
8266
                          "  x   x   x  a4     a3  a2  a1  a0",
8267
                          "  i   i   i   i      i   i   i   i";
8268
 
8269
        writepage       = "  0   1   0   0      1   1   0   0",
8270
                          "  0   0   0   0    a11 a10  a9  a8",
8271
                          " a7  a6  a5   x      x   x   x   x",
8272
                          "  x   x   x   x      x   x   x   x";
8273
 
8274
	mode		= 0x41;
8275
	delay		= 6;
8276
	blocksize	= 64;
8277
	readsize	= 256;
8278
      ;
8279
 
8280
    memory "lfuse"
8281
        size            = 1;
8282
        min_write_delay = 4500;
8283
        max_write_delay = 4500;
8284
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
8285
                          "x x x x  x x x x   o o o o  o o o o";
8286
 
8287
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
8288
                          "x x x x  x x x x   i i i i  i i i i";
8289
      ;
8290
 
8291
    memory "hfuse"
8292
        size            = 1;
8293
        min_write_delay = 4500;
8294
        max_write_delay = 4500;
8295
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
8296
                          "x x x x  x x x x   o o o o  o o o o";
8297
 
8298
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
8299
                          "x x x x  x x x x   i i i i  i i i i";
8300
      ;
8301
 
8302
    memory "efuse"
8303
        size            = 1;
8304
        min_write_delay = 4500;
8305
        max_write_delay = 4500;
8306
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
8307
                          "x x x x  x x x x   x x x x  x o o o";
8308
 
8309
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
8310
                          "x x x x  x x x x   x x x x  x x x i";
8311
      ;
8312
 
8313
    memory "lock"
8314
        size            = 1;
8315
        min_write_delay = 4500;
8316
        max_write_delay = 4500;
8317
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
8318
                          "x x x x  x x x x   x x o o  o o o o";
8319
 
8320
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
8321
                          "x x x x  x x x x   1 1 i i  i i i i";
8322
      ;
8323
 
8324
    memory "calibration"
8325
        size            = 1;
8326
        read            = "0  0  1  1   1  0  0  0   0  0  0  x   x  x  x  x",
8327
                          "0  0  0  0   0  0  0  0   o  o  o  o   o  o  o  o";
8328
      ;
8329
 
8330
    memory "signature"
8331
        size            = 3;
8332
        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
8333
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
8334
      ;
8335
  ;
8336
 
8337
#------------------------------------------------------------
8338
# ATmega328P
8339
#------------------------------------------------------------
8340
 
8341
part
8342
    id			= "m328p";
8343
    desc		= "ATMEGA328P";
8344
    has_debugwire	= yes;
8345
    flash_instr		= 0xB6, 0x01, 0x11;
8346
    eeprom_instr	= 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
8347
			  0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
8348
			  0x99, 0xF9, 0xBB, 0xAF;
8349
    stk500_devcode	= 0x86;
8350
    # avr910_devcode	= 0x;
8351
    signature		= 0x1e 0x95 0x0F;
8352
    pagel		= 0xd7;
8353
    bs2			= 0xc2;
8354
    chip_erase_delay	= 9000;
8355
    pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
8356
		 "x x x x x x x x x x x x x x x x";
8357
 
8358
    chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
8359
		 "x x x x x x x x x x x x x x x x";
8360
 
8361
    timeout	= 200;
8362
    stabdelay	= 100;
8363
    cmdexedelay	= 25;
8364
    synchloops	= 32;
8365
    bytedelay	= 0;
8366
    pollindex	= 3;
8367
    pollvalue	= 0x53;
8368
    predelay	= 1;
8369
    postdelay	= 1;
8370
    pollmethod	= 1;
8371
 
8372
    pp_controlstack =
8373
	0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
8374
	0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
8375
	0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
8376
	0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
8377
    hventerstabdelay	= 100;
8378
    progmodedelay	= 0;
8379
    latchcycles		= 5;
8380
    togglevtg		= 1;
8381
    poweroffdelay	= 15;
8382
    resetdelayms	= 1;
8383
    resetdelayus	= 0;
8384
    hvleavestabdelay	= 15;
8385
    resetdelay		= 15;
8386
    chiperasepulsewidth	= 0;
8387
    chiperasepolltimeout = 10;
8388
    programfusepulsewidth = 0;
8389
    programfusepolltimeout = 5;
8390
    programlockpulsewidth = 0;
8391
    programlockpolltimeout = 5;
8392
 
8393
    memory "eeprom"
8394
	paged		= no;
8395
	page_size	= 4;
8396
	size		= 1024;
8397
	min_write_delay = 3600;
8398
	max_write_delay = 3600;
8399
	readback_p1	= 0xff;
8400
	readback_p2	= 0xff;
8401
	read = " 1 0 1 0 0 0 0 0",
8402
	       " 0 0 0 x x x a9 a8",
8403
	       " a7 a6 a5 a4 a3 a2 a1 a0",
8404
	       " o o o o o o o o";
8405
 
8406
	write = " 1 1 0 0 0 0 0 0",
8407
	      	" 0 0 0 x x x a9 a8",
8408
		" a7 a6 a5 a4 a3 a2 a1 a0",
8409
		" i i i i i i i i";
8410
 
8411
	loadpage_lo = " 1 1 0 0 0 0 0 1",
8412
		      " 0 0 0 0 0 0 0 0",
8413
		      " 0 0 0 0 0 0 a1 a0",
8414
		      " i i i i i i i i";
8415
 
8416
	writepage = " 1 1 0 0 0 0 1 0",
8417
		    " 0 0 x x x x a9 a8",
8418
		    " a7 a6 a5 a4 a3 a2 0 0",
8419
		    " x x x x x x x x";
8420
 
8421
	mode		= 0x41;
8422
	delay		= 5;
8423
	blocksize	= 4;
8424
	readsize	= 256;
8425
    ;
8426
 
8427
    memory "flash"
8428
	paged		= yes;
8429
	size		= 32768;
8430
	page_size	= 128;
8431
	num_pages	= 256;
8432
	min_write_delay = 4500;
8433
	max_write_delay = 4500;
8434
	readback_p1	= 0xff;
8435
	readback_p2	= 0xff;
8436
	read_lo = " 0 0 1 0 0 0 0 0",
8437
		  " 0 0 a13 a12 a11 a10 a9 a8",
8438
		  " a7 a6 a5 a4 a3 a2 a1 a0",
8439
		  " o o o o o o o o";
8440
 
8441
	read_hi = " 0 0 1 0 1 0 0 0",
8442
		  " 0 0 a13 a12 a11 a10 a9 a8",
8443
		  " a7 a6 a5 a4 a3 a2 a1 a0",
8444
		  " o o o o o o o o";
8445
 
8446
	loadpage_lo = " 0 1 0 0 0 0 0 0",
8447
		      " 0 0 0 x x x x x",
8448
		      " x x a5 a4 a3 a2 a1 a0",
8449
		      " i i i i i i i i";
8450
 
8451
	loadpage_hi = " 0 1 0 0 1 0 0 0",
8452
		      " 0 0 0 x x x x x",
8453
		      " x x a5 a4 a3 a2 a1 a0",
8454
		      " i i i i i i i i";
8455
 
8456
	writepage = " 0 1 0 0 1 1 0 0",
8457
		    " 0 0 a13 a12 a11 a10 a9 a8",
8458
		    " a7 a6 x x x x x x",
8459
		    " x x x x x x x x";
8460
 
8461
	mode		= 0x41;
8462
	delay		= 6;
8463
	blocksize	= 128;
8464
	readsize	= 256;
8465
 
8466
    ;
8467
 
8468
    memory "lfuse"
8469
	size = 1;
8470
	min_write_delay = 4500;
8471
	max_write_delay = 4500;
8472
	read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
8473
	       "x x x x x x x x o o o o o o o o";
8474
 
8475
	write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
8476
	      	"x x x x x x x x i i i i i i i i";
8477
    ;
8478
 
8479
    memory "hfuse"
8480
	size = 1;
8481
	min_write_delay = 4500;
8482
	max_write_delay = 4500;
8483
	read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
8484
	       "x x x x x x x x o o o o o o o o";
8485
 
8486
	write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
8487
	      	"x x x x x x x x i i i i i i i i";
8488
    ;
8489
 
8490
    memory "efuse"
8491
	size = 1;
8492
	min_write_delay = 4500;
8493
	max_write_delay = 4500;
8494
	read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
8495
	       "x x x x x x x x x x x x x o o o";
8496
 
8497
	write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
8498
	      	"x x x x x x x x x x x x x i i i";
8499
    ;
8500
 
8501
    memory "lock"
8502
	size = 1;
8503
	min_write_delay = 4500;
8504
	max_write_delay = 4500;
8505
	read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
8506
	       "x x x x x x x x x x o o o o o o";
8507
 
8508
	write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
8509
	      	"x x x x x x x x 1 1 i i i i i i";
8510
    ;
8511
 
8512
    memory "calibration"
8513
	size = 1;
8514
	read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
8515
	       "0 0 0 0 0 0 0 0 o o o o o o o o";
8516
    ;
8517
 
8518
    memory "signature"
8519
	size = 3;
8520
	read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
8521
	       "x x x x x x a1 a0 o o o o o o o o";
8522
    ;
8523
;
8524
 
8525
#------------------------------------------------------------
8526
# ATtiny2313
8527
#------------------------------------------------------------
8528
 
8529
part
8530
     id            = "t2313";
8531
     desc          = "ATtiny2313";
8532
     has_debugwire = yes;
8533
     flash_instr   = 0xB2, 0x0F, 0x1F;
8534
     eeprom_instr  = 0xBB, 0xFE, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
8535
	             0xBA, 0x0F, 0xB2, 0x0F, 0xBA, 0x0D, 0xBB, 0xBC,
8536
	             0x99, 0xE1, 0xBB, 0xAC;
8537
     stk500_devcode   = 0x23;
8538
##   Use the ATtiny26 devcode:
8539
     avr910_devcode   = 0x5e;
8540
     signature        = 0x1e 0x91 0x0a;
8541
     pagel            = 0xD4;
8542
     bs2              = 0xD6;
8543
     reset            = io;
8544
     chip_erase_delay = 9000;
8545
 
8546
     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
8547
                        "x x x x  x x x x    x x x x  x x x x";
8548
 
8549
     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
8550
                        "x x x x  x x x x    x x x x  x x x x";
8551
 
8552
    timeout		= 200;
8553
    stabdelay		= 100;
8554
    cmdexedelay		= 25;
8555
    synchloops		= 32;
8556
    bytedelay		= 0;
8557
    pollindex		= 3;
8558
    pollvalue		= 0x53;
8559
    predelay		= 1;
8560
    postdelay		= 1;
8561
    pollmethod		= 1;
8562
 
8563
    pp_controlstack     =
8564
        0x0E, 0x1E, 0x0E, 0x1E, 0x2E, 0x3E, 0x2E, 0x3E,
8565
        0x4E, 0x5E, 0x4E, 0x5E, 0x6E, 0x7E, 0x6E, 0x7E,
8566
        0x26, 0x36, 0x66, 0x76, 0x2A, 0x3A, 0x6A, 0x7A,
8567
        0x2E, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
8568
    hventerstabdelay    = 100;
8569
    progmodedelay       = 0;
8570
    latchcycles         = 5;
8571
    togglevtg           = 1;
8572
    poweroffdelay       = 15;
8573
    resetdelayms        = 1;
8574
    resetdelayus        = 0;
8575
    hvleavestabdelay    = 15;
8576
    chiperasepulsewidth = 0;
8577
    chiperasepolltimeout = 10;
8578
    programfusepulsewidth = 0;
8579
    programfusepolltimeout = 5;
8580
    programlockpulsewidth = 0;
8581
    programlockpolltimeout = 5;
8582
 
8583
     memory "eeprom"
8584
         size            = 128;
8585
        paged           = no;
8586
        page_size       = 4;
8587
         min_write_delay = 4000;
8588
         max_write_delay = 4500;
8589
         readback_p1     = 0xff;
8590
         readback_p2     = 0xff;
8591
         read            = "1  0  1  0   0  0  0  0   0 0 0 x  x x x x",
8592
                           "x a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
8593
 
8594
         write           = "1  1  0  0   0  0  0  0   0 0 0 x  x x x x",
8595
                           "x a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
8596
 
8597
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
8598
			  "  0   0   0   0      0   0   0   0",
8599
			  "  0   0   0   0      0   0  a1  a0",
8600
			  "  i   i   i   i      i   i   i   i";
8601
 
8602
	writepage	= "  1   1   0   0      0   0   1   0",
8603
			  "  0   0   x   x      x   x   x   x",
8604
			  "  x  a6  a5  a4     a3  a2   0   0",
8605
			  "  x   x   x   x      x   x   x   x";
8606
 
8607
	mode		= 0x41;
8608
	delay		= 6;
8609
	blocksize	= 4;
8610
	readsize	= 256;
8611
       ;
8612
     memory "flash"
8613
         paged           = yes;
8614
         size            = 2048;
8615
         page_size       = 32;
8616
         num_pages       = 64;
8617
         min_write_delay = 4500;
8618
         max_write_delay = 4500;
8619
         readback_p1     = 0xff;
8620
         readback_p2     = 0xff;
8621
         read_lo         = "  0   0   1   0    0   0   0   0",
8622
                           "  0   0   0   0    0   0  a9  a8",
8623
                           " a7  a6  a5  a4   a3  a2  a1  a0",
8624
                           "  o   o   o   o    o   o   o   o";
8625
 
8626
         read_hi         = "  0   0   1   0    1   0   0   0",
8627
                           "  0   0   0   0    0   0  a9  a8",
8628
                           " a7  a6  a5  a4   a3  a2  a1  a0",
8629
                           "  o   o   o   o    o   o   o   o";
8630
 
8631
# The information in the data sheet of April/2004 is wrong, this works:
8632
         loadpage_lo     = "  0   1   0   0    0   0   0   0",
8633
                           "  0   0   0   x    x   x   x   x",
8634
                           "  x   x   x   x   a3  a2  a1  a0",
8635
                           "  i   i   i   i    i   i   i   i";
8636
 
8637
# The information in the data sheet of April/2004 is wrong, this works:
8638
         loadpage_hi     = "  0   1   0   0    1   0   0   0",
8639
                           "  0   0   0   x    x   x   x   x",
8640
                           "  x   x   x   x   a3  a2  a1  a0",
8641
                           "  i   i   i   i    i   i   i   i";
8642
 
8643
# The information in the data sheet of April/2004 is wrong, this works:
8644
         writepage       = "  0  1  0  0   1  1  0  0",
8645
                           "  0  0  0  0   0  0 a9 a8",
8646
                           " a7 a6 a5 a4   x  x  x  x",
8647
                           "  x  x  x  x   x  x  x  x";
8648
 
8649
	mode		= 0x41;
8650
	delay		= 6;
8651
	blocksize	= 32;
8652
	readsize	= 256;
8653
       ;
8654
#   ATtiny2313 has Signature Bytes: 0x1E 0x91 0x0A.
8655
     memory "signature"
8656
         size            = 3;
8657
         read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
8658
                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
8659
       ;
8660
     memory "lock"
8661
         size            = 1;
8662
         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
8663
                           "x x x x  x x x x  1 1 i i  i i i i";
8664
         read           = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
8665
                          "x x x x  x x x x  x x o o  o o o o";
8666
        min_write_delay = 9000;
8667
        max_write_delay = 9000;
8668
       ;
8669
 
8670
     memory "lfuse"
8671
         size            = 1;
8672
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
8673
                           "x x x x  x x x x  i i i i  i i i i";
8674
 
8675
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
8676
                           "x x x x  x x x x  o o o o  o o o o";
8677
        min_write_delay = 9000;
8678
        max_write_delay = 9000;
8679
       ;
8680
 
8681
     memory "hfuse"
8682
         size            = 1;
8683
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
8684
                           "x x x x  x x x x  i i i i  i i i i";
8685
 
8686
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
8687
                           "x x x x  x x x x  o o o o  o o o o";
8688
        min_write_delay = 9000;
8689
        max_write_delay = 9000;
8690
       ;
8691
 
8692
     memory "efuse"
8693
         size            = 1;
8694
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
8695
                           "x x x x  x x x x  x x x x  x x x i";
8696
 
8697
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
8698
                           "x x x x  x x x x  o o o o  o o o o";
8699
        min_write_delay = 9000;
8700
        max_write_delay = 9000;
8701
     ;
8702
# The Tiny2313 has calibration data for both 4 MHz and 8 MHz.
8703
# The information in the data sheet of April/2004 is wrong, this works:
8704
 
8705
     memory "calibration"
8706
         size            = 2;
8707
         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
8708
                           "0  0  0  0   0  0  0  a0   o o o o  o o o o";
8709
     ;
8710
  ;
8711
 
8712
#------------------------------------------------------------
8713
# AT90PWM2
8714
#------------------------------------------------------------
8715
 
8716
part
8717
     id            = "pwm2";
8718
     desc          = "AT90PWM2";
8719
     has_debugwire = yes;
8720
     flash_instr   = 0xB6, 0x01, 0x11;
8721
     eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
8722
	             0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
8723
	             0x99, 0xF9, 0xBB, 0xAF;
8724
     stk500_devcode   = 0x65;
8725
##  avr910_devcode   = ?;
8726
     signature        = 0x1e 0x93 0x81;
8727
     pagel            = 0xD8;
8728
     bs2              = 0xE2;
8729
     reset            = io;
8730
     chip_erase_delay = 9000;
8731
 
8732
     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
8733
                        "x x x x  x x x x    x x x x  x x x x";
8734
 
8735
     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
8736
                        "x x x x  x x x x    x x x x  x x x x";
8737
 
8738
    timeout		= 200;
8739
    stabdelay		= 100;
8740
    cmdexedelay		= 25;
8741
    synchloops		= 32;
8742
    bytedelay		= 0;
8743
    pollindex		= 3;
8744
    pollvalue		= 0x53;
8745
    predelay		= 1;
8746
    postdelay		= 1;
8747
    pollmethod		= 1;
8748
 
8749
    pp_controlstack     =
8750
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
8751
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
8752
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
8753
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
8754
    hventerstabdelay    = 100;
8755
    progmodedelay       = 0;
8756
    latchcycles         = 5;
8757
    togglevtg           = 1;
8758
    poweroffdelay       = 15;
8759
    resetdelayms        = 1;
8760
    resetdelayus        = 0;
8761
    hvleavestabdelay    = 15;
8762
    chiperasepulsewidth = 0;
8763
    chiperasepolltimeout = 10;
8764
    programfusepulsewidth = 0;
8765
    programfusepolltimeout = 5;
8766
    programlockpulsewidth = 0;
8767
    programlockpolltimeout = 5;
8768
 
8769
     memory "eeprom"
8770
         size            = 512;
8771
        paged           = no;
8772
        page_size       = 4;
8773
         min_write_delay = 4000;
8774
         max_write_delay = 4500;
8775
         readback_p1     = 0xff;
8776
         readback_p2     = 0xff;
8777
         read            = "1  0  1  0   0  0  0  0   0 0 0 x  x x x a8",
8778
                           "a7 a6 a5 a4  a3 a2 a1 a0  o o o o  o o o o";
8779
 
8780
         write           = "1  1  0  0   0  0  0  0   0 0 0 x  x x x a8",
8781
                           "a7 a6 a5 a4  a3 a2 a1 a0  i i i i  i i i i";
8782
 
8783
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
8784
			  "  0   0   0   0      0   0   0   0",
8785
			  "  0   0   0   0      0   0  a1  a0",
8786
			  "  i   i   i   i      i   i   i   i";
8787
 
8788
	writepage	= "  1   1   0   0      0   0   1   0",
8789
			  "  0   0   x   x      x   x   x   x",
8790
			  " a7  a6  a5  a4     a3  a2   0   0",
8791
			  "  x   x   x   x      x   x   x   x";
8792
 
8793
	mode		= 0x41;
8794
	delay		= 6;
8795
	blocksize	= 4;
8796
	readsize	= 256;
8797
       ;
8798
     memory "flash"
8799
         paged           = yes;
8800
         size            = 8192;
8801
         page_size       = 64;
8802
         num_pages       = 128;
8803
         min_write_delay = 4500;
8804
         max_write_delay = 4500;
8805
         readback_p1     = 0xff;
8806
         readback_p2     = 0xff;
8807
         read_lo         = "  0   0   1   0    0   0   0   0",
8808
                           "  0   0   0   0   a11 a10 a9  a8",
8809
                           " a7  a6  a5  a4   a3  a2  a1  a0",
8810
                           "  o   o   o   o    o   o   o   o";
8811
 
8812
         read_hi         = "  0   0   1   0    1   0   0   0",
8813
                           "  0   0   0   0   a11 a10 a9  a8",
8814
                           " a7  a6  a5  a4   a3  a2  a1  a0",
8815
                           "  o   o   o   o    o   o   o   o";
8816
 
8817
         loadpage_lo     = "  0   1   0   0    0   0   0   0",
8818
                           "  0   0   0   x    x   x   x   x",
8819
                           "  x   x   x  a4   a3  a2  a1  a0",
8820
                           "  i   i   i   i    i   i   i   i";
8821
 
8822
         loadpage_hi     = "  0   1   0   0    1   0   0   0",
8823
                           "  0   0   0   x    x   x   x   x",
8824
                           "  x   x   x  a4   a3  a2  a1  a0",
8825
                           "  i   i   i   i    i   i   i   i";
8826
 
8827
         writepage       = "  0  1  0  0   1   1   0   0",
8828
                           "  0  0  0  0   a11 a10 a9  a8",
8829
                           " a7 a6 a5  x   x   x   x   x",
8830
                           "  x  x  x  x   x   x   x   x";
8831
 
8832
	mode		= 0x41;
8833
	delay		= 6;
8834
	blocksize	= 64;
8835
	readsize	= 256;
8836
       ;
8837
#   AT90PWM2 has Signature Bytes: 0x1E 0x93 0x81.
8838
     memory "signature"
8839
         size            = 3;
8840
         read            = "0  0  1  1   0  0  0  0   0  0  x  x   x  x  x  x",
8841
                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
8842
       ;
8843
     memory "lock"
8844
         size            = 1;
8845
         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
8846
                           "x x x x  x x x x  1 1 i i  i i i i";
8847
 
8848
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
8849
                           "x x x x  x x x x  x x o o  o o o o";
8850
        min_write_delay = 9000;
8851
        max_write_delay = 9000;
8852
       ;
8853
 
8854
     memory "lfuse"
8855
         size            = 1;
8856
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
8857
                           "x x x x  x x x x  i i i i  i i i i";
8858
 
8859
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
8860
                           "x x x x  x x x x  o o o o  o o o o";
8861
        min_write_delay = 9000;
8862
        max_write_delay = 9000;
8863
       ;
8864
 
8865
     memory "hfuse"
8866
         size            = 1;
8867
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
8868
                           "x x x x  x x x x  i i i i  i i i i";
8869
 
8870
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
8871
                           "x x x x  x x x x  o o o o  o o o o";
8872
        min_write_delay = 9000;
8873
        max_write_delay = 9000;
8874
       ;
8875
 
8876
     memory "efuse"
8877
         size            = 1;
8878
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
8879
                           "x x x x  x x x x  x x x x  x x x i";
8880
 
8881
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 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 "calibration"
8888
         size            = 1;
8889
         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
8890
                           "0  0  0  0   0  0  0  0    o o o o  o o o o";
8891
     ;
8892
  ;
8893
 
8894
#------------------------------------------------------------
8895
# AT90PWM3
8896
#------------------------------------------------------------
8897
 
8898
# Completely identical to AT90PWM2 (including the signature!)
8899
 
8900
part
8901
     id            = "pwm3";
8902
     desc          = "AT90PWM3";
8903
     has_debugwire = yes;
8904
     flash_instr   = 0xB6, 0x01, 0x11;
8905
     eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
8906
	             0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
8907
	             0x99, 0xF9, 0xBB, 0xAF;
8908
     stk500_devcode   = 0x65;
8909
##  avr910_devcode   = ?;
8910
     signature        = 0x1e 0x93 0x81;
8911
     pagel            = 0xD8;
8912
     bs2              = 0xE2;
8913
     reset            = io;
8914
     chip_erase_delay = 9000;
8915
 
8916
     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
8917
                        "x x x x  x x x x    x x x x  x x x x";
8918
 
8919
     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
8920
                        "x x x x  x x x x    x x x x  x x x x";
8921
 
8922
    timeout		= 200;
8923
    stabdelay		= 100;
8924
    cmdexedelay		= 25;
8925
    synchloops		= 32;
8926
    bytedelay		= 0;
8927
    pollindex		= 3;
8928
    pollvalue		= 0x53;
8929
    predelay		= 1;
8930
    postdelay		= 1;
8931
    pollmethod		= 1;
8932
 
8933
    pp_controlstack     =
8934
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
8935
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
8936
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
8937
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
8938
    hventerstabdelay    = 100;
8939
    progmodedelay       = 0;
8940
    latchcycles         = 5;
8941
    togglevtg           = 1;
8942
    poweroffdelay       = 15;
8943
    resetdelayms        = 1;
8944
    resetdelayus        = 0;
8945
    hvleavestabdelay    = 15;
8946
    chiperasepulsewidth = 0;
8947
    chiperasepolltimeout = 10;
8948
    programfusepulsewidth = 0;
8949
    programfusepolltimeout = 5;
8950
    programlockpulsewidth = 0;
8951
    programlockpolltimeout = 5;
8952
 
8953
     memory "eeprom"
8954
         size            = 512;
8955
        paged           = no;
8956
        page_size       = 4;
8957
         min_write_delay = 4000;
8958
         max_write_delay = 4500;
8959
         readback_p1     = 0xff;
8960
         readback_p2     = 0xff;
8961
         read            = "1  0  1  0   0  0  0  0   0 0 0 x  x x x a8",
8962
                           "a7 a6 a5 a4  a3 a2 a1 a0  o o o o  o o o o";
8963
 
8964
         write           = "1  1  0  0   0  0  0  0   0 0 0 x  x x x a8",
8965
                           "a7 a6 a5 a4  a3 a2 a1 a0  i i i i  i i i i";
8966
 
8967
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
8968
			  "  0   0   0   0      0   0   0   0",
8969
			  "  0   0   0   0      0   0  a1  a0",
8970
			  "  i   i   i   i      i   i   i   i";
8971
 
8972
	writepage	= "  1   1   0   0      0   0   1   0",
8973
			  "  0   0   x   x      x   x   x   x",
8974
			  " a7  a6  a5  a4     a3  a2   0   0",
8975
			  "  x   x   x   x      x   x   x   x";
8976
 
8977
	mode		= 0x41;
8978
	delay		= 6;
8979
	blocksize	= 4;
8980
	readsize	= 256;
8981
       ;
8982
     memory "flash"
8983
         paged           = yes;
8984
         size            = 8192;
8985
         page_size       = 64;
8986
         num_pages       = 128;
8987
         min_write_delay = 4500;
8988
         max_write_delay = 4500;
8989
         readback_p1     = 0xff;
8990
         readback_p2     = 0xff;
8991
         read_lo         = "  0   0   1   0    0   0   0   0",
8992
                           "  0   0   0   0   a11 a10 a9  a8",
8993
                           " a7  a6  a5  a4   a3  a2  a1  a0",
8994
                           "  o   o   o   o    o   o   o   o";
8995
 
8996
         read_hi         = "  0   0   1   0    1   0   0   0",
8997
                           "  0   0   0   0   a11 a10 a9  a8",
8998
                           " a7  a6  a5  a4   a3  a2  a1  a0",
8999
                           "  o   o   o   o    o   o   o   o";
9000
 
9001
         loadpage_lo     = "  0   1   0   0    0   0   0   0",
9002
                           "  0   0   0   x    x   x   x   x",
9003
                           "  x   x   x  a4   a3  a2  a1  a0",
9004
                           "  i   i   i   i    i   i   i   i";
9005
 
9006
         loadpage_hi     = "  0   1   0   0    1   0   0   0",
9007
                           "  0   0   0   x    x   x   x   x",
9008
                           "  x   x   x  a4   a3  a2  a1  a0",
9009
                           "  i   i   i   i    i   i   i   i";
9010
 
9011
         writepage       = "  0  1  0  0   1   1   0   0",
9012
                           "  0  0  0  0   a11 a10 a9  a8",
9013
                           " a7 a6 a5  x   x   x   x   x",
9014
                           "  x  x  x  x   x   x   x   x";
9015
 
9016
	mode		= 0x41;
9017
	delay		= 6;
9018
	blocksize	= 64;
9019
	readsize	= 256;
9020
       ;
9021
#   AT90PWM2 has Signature Bytes: 0x1E 0x93 0x81.
9022
     memory "signature"
9023
         size            = 3;
9024
         read            = "0  0  1  1   0  0  0  0   0  0  x  x   x  x  x  x",
9025
                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
9026
       ;
9027
     memory "lock"
9028
         size            = 1;
9029
         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
9030
                           "x x x x  x x x x  1 1 i i  i i i i";
9031
 
9032
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
9033
                           "x x x x  x x x x  x x o o  o o o o";
9034
        min_write_delay = 9000;
9035
        max_write_delay = 9000;
9036
       ;
9037
 
9038
     memory "lfuse"
9039
         size            = 1;
9040
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
9041
                           "x x x x  x x x x  i i i i  i i i i";
9042
 
9043
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
9044
                           "x x x x  x x x x  o o o o  o o o o";
9045
        min_write_delay = 9000;
9046
        max_write_delay = 9000;
9047
       ;
9048
 
9049
     memory "hfuse"
9050
         size            = 1;
9051
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
9052
                           "x x x x  x x x x  i i i i  i i i i";
9053
 
9054
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
9055
                           "x x x x  x x x x  o o o o  o o o o";
9056
        min_write_delay = 9000;
9057
        max_write_delay = 9000;
9058
       ;
9059
 
9060
     memory "efuse"
9061
         size            = 1;
9062
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
9063
                           "x x x x  x x x x  x x x x  x x x i";
9064
 
9065
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 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 "calibration"
9072
         size            = 1;
9073
         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
9074
                           "0  0  0  0   0  0  0  0    o o o o  o o o o";
9075
     ;
9076
  ;
9077
 
9078
#------------------------------------------------------------
9079
# AT90PWM2B
9080
#------------------------------------------------------------
9081
# Same as AT90PWM2 but different signature.
9082
 
9083
part
9084
     id            = "pwm2b";
9085
     desc          = "AT90PWM2B";
9086
     has_debugwire = yes;
9087
     flash_instr   = 0xB6, 0x01, 0x11;
9088
     eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
9089
	             0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
9090
	             0x99, 0xF9, 0xBB, 0xAF;
9091
     stk500_devcode   = 0x65;
9092
##  avr910_devcode   = ?;
9093
     signature        = 0x1e 0x93 0x83;
9094
     pagel            = 0xD8;
9095
     bs2              = 0xE2;
9096
     reset            = io;
9097
     chip_erase_delay = 9000;
9098
 
9099
     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
9100
                        "x x x x  x x x x    x x x x  x x x x";
9101
 
9102
     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
9103
                        "x x x x  x x x x    x x x x  x x x x";
9104
 
9105
    timeout		= 200;
9106
    stabdelay		= 100;
9107
    cmdexedelay		= 25;
9108
    synchloops		= 32;
9109
    bytedelay		= 0;
9110
    pollindex		= 3;
9111
    pollvalue		= 0x53;
9112
    predelay		= 1;
9113
    postdelay		= 1;
9114
    pollmethod		= 1;
9115
 
9116
    pp_controlstack     =
9117
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
9118
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
9119
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
9120
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
9121
    hventerstabdelay    = 100;
9122
    progmodedelay       = 0;
9123
    latchcycles         = 5;
9124
    togglevtg           = 1;
9125
    poweroffdelay       = 15;
9126
    resetdelayms        = 1;
9127
    resetdelayus        = 0;
9128
    hvleavestabdelay    = 15;
9129
    chiperasepulsewidth = 0;
9130
    chiperasepolltimeout = 10;
9131
    programfusepulsewidth = 0;
9132
    programfusepolltimeout = 5;
9133
    programlockpulsewidth = 0;
9134
    programlockpolltimeout = 5;
9135
 
9136
     memory "eeprom"
9137
         size            = 512;
9138
        paged           = no;
9139
        page_size       = 4;
9140
         min_write_delay = 4000;
9141
         max_write_delay = 4500;
9142
         readback_p1     = 0xff;
9143
         readback_p2     = 0xff;
9144
         read            = "1  0  1  0   0  0  0  0   0 0 0 x  x x x a8",
9145
                           "a7 a6 a5 a4  a3 a2 a1 a0  o o o o  o o o o";
9146
 
9147
         write           = "1  1  0  0   0  0  0  0   0 0 0 x  x x x a8",
9148
                           "a7 a6 a5 a4  a3 a2 a1 a0  i i i i  i i i i";
9149
 
9150
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
9151
			  "  0   0   0   0      0   0   0   0",
9152
			  "  0   0   0   0      0   0  a1  a0",
9153
			  "  i   i   i   i      i   i   i   i";
9154
 
9155
	writepage	= "  1   1   0   0      0   0   1   0",
9156
			  "  0   0   x   x      x   x   x   x",
9157
			  " a7  a6  a5  a4     a3  a2   0   0",
9158
			  "  x   x   x   x      x   x   x   x";
9159
 
9160
	mode		= 0x41;
9161
	delay		= 6;
9162
	blocksize	= 4;
9163
	readsize	= 256;
9164
       ;
9165
     memory "flash"
9166
         paged           = yes;
9167
         size            = 8192;
9168
         page_size       = 64;
9169
         num_pages       = 128;
9170
         min_write_delay = 4500;
9171
         max_write_delay = 4500;
9172
         readback_p1     = 0xff;
9173
         readback_p2     = 0xff;
9174
         read_lo         = "  0   0   1   0    0   0   0   0",
9175
                           "  0   0   0   0   a11 a10 a9  a8",
9176
                           " a7  a6  a5  a4   a3  a2  a1  a0",
9177
                           "  o   o   o   o    o   o   o   o";
9178
 
9179
         read_hi         = "  0   0   1   0    1   0   0   0",
9180
                           "  0   0   0   0   a11 a10 a9  a8",
9181
                           " a7  a6  a5  a4   a3  a2  a1  a0",
9182
                           "  o   o   o   o    o   o   o   o";
9183
 
9184
         loadpage_lo     = "  0   1   0   0    0   0   0   0",
9185
                           "  0   0   0   x    x   x   x   x",
9186
                           "  x   x   x  a4   a3  a2  a1  a0",
9187
                           "  i   i   i   i    i   i   i   i";
9188
 
9189
         loadpage_hi     = "  0   1   0   0    1   0   0   0",
9190
                           "  0   0   0   x    x   x   x   x",
9191
                           "  x   x   x  a4   a3  a2  a1  a0",
9192
                           "  i   i   i   i    i   i   i   i";
9193
 
9194
         writepage       = "  0  1  0  0   1   1   0   0",
9195
                           "  0  0  0  0   a11 a10 a9  a8",
9196
                           " a7 a6 a5  x   x   x   x   x",
9197
                           "  x  x  x  x   x   x   x   x";
9198
 
9199
	mode		= 0x41;
9200
	delay		= 6;
9201
	blocksize	= 64;
9202
	readsize	= 256;
9203
       ;
9204
     memory "signature"
9205
         size            = 3;
9206
         read            = "0  0  1  1   0  0  0  0   0  0  x  x   x  x  x  x",
9207
                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
9208
       ;
9209
     memory "lock"
9210
         size            = 1;
9211
         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
9212
                           "x x x x  x x x x  1 1 i i  i i i i";
9213
 
9214
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
9215
                           "x x x x  x x x x  x x o o  o o o o";
9216
        min_write_delay = 9000;
9217
        max_write_delay = 9000;
9218
       ;
9219
 
9220
     memory "lfuse"
9221
         size            = 1;
9222
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
9223
                           "x x x x  x x x x  i i i i  i i i i";
9224
 
9225
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
9226
                           "x x x x  x x x x  o o o o  o o o o";
9227
        min_write_delay = 9000;
9228
        max_write_delay = 9000;
9229
       ;
9230
 
9231
     memory "hfuse"
9232
         size            = 1;
9233
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
9234
                           "x x x x  x x x x  i i i i  i i i i";
9235
 
9236
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
9237
                           "x x x x  x x x x  o o o o  o o o o";
9238
        min_write_delay = 9000;
9239
        max_write_delay = 9000;
9240
       ;
9241
 
9242
     memory "efuse"
9243
         size            = 1;
9244
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
9245
                           "x x x x  x x x x  x x x x  x x x i";
9246
 
9247
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
9248
                           "x x x x  x x x x  o o o o  o o o o";
9249
        min_write_delay = 9000;
9250
        max_write_delay = 9000;
9251
     ;
9252
 
9253
     memory "calibration"
9254
         size            = 1;
9255
         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
9256
                           "0  0  0  0   0  0  0  0    o o o o  o o o o";
9257
     ;
9258
  ;
9259
 
9260
#------------------------------------------------------------
9261
# AT90PWM3B
9262
#------------------------------------------------------------
9263
 
9264
# Completely identical to AT90PWM2B (including the signature!)
9265
 
9266
part
9267
     id            = "pwm3b";
9268
     desc          = "AT90PWM3B";
9269
     has_debugwire = yes;
9270
     flash_instr   = 0xB6, 0x01, 0x11;
9271
     eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
9272
	             0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
9273
	             0x99, 0xF9, 0xBB, 0xAF;
9274
     stk500_devcode   = 0x65;
9275
##  avr910_devcode   = ?;
9276
     signature        = 0x1e 0x93 0x83;
9277
     pagel            = 0xD8;
9278
     bs2              = 0xE2;
9279
     reset            = io;
9280
     chip_erase_delay = 9000;
9281
 
9282
     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
9283
                        "x x x x  x x x x    x x x x  x x x x";
9284
 
9285
     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
9286
                        "x x x x  x x x x    x x x x  x x x x";
9287
 
9288
    timeout		= 200;
9289
    stabdelay		= 100;
9290
    cmdexedelay		= 25;
9291
    synchloops		= 32;
9292
    bytedelay		= 0;
9293
    pollindex		= 3;
9294
    pollvalue		= 0x53;
9295
    predelay		= 1;
9296
    postdelay		= 1;
9297
    pollmethod		= 1;
9298
 
9299
    pp_controlstack     =
9300
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
9301
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
9302
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
9303
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
9304
    hventerstabdelay    = 100;
9305
    progmodedelay       = 0;
9306
    latchcycles         = 5;
9307
    togglevtg           = 1;
9308
    poweroffdelay       = 15;
9309
    resetdelayms        = 1;
9310
    resetdelayus        = 0;
9311
    hvleavestabdelay    = 15;
9312
    chiperasepulsewidth = 0;
9313
    chiperasepolltimeout = 10;
9314
    programfusepulsewidth = 0;
9315
    programfusepolltimeout = 5;
9316
    programlockpulsewidth = 0;
9317
    programlockpolltimeout = 5;
9318
 
9319
     memory "eeprom"
9320
         size            = 512;
9321
        paged           = no;
9322
        page_size       = 4;
9323
         min_write_delay = 4000;
9324
         max_write_delay = 4500;
9325
         readback_p1     = 0xff;
9326
         readback_p2     = 0xff;
9327
         read            = "1  0  1  0   0  0  0  0   0 0 0 x  x x x a8",
9328
                           "a7 a6 a5 a4  a3 a2 a1 a0  o o o o  o o o o";
9329
 
9330
         write           = "1  1  0  0   0  0  0  0   0 0 0 x  x x x a8",
9331
                           "a7 a6 a5 a4  a3 a2 a1 a0  i i i i  i i i i";
9332
 
9333
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
9334
			  "  0   0   0   0      0   0   0   0",
9335
			  "  0   0   0   0      0   0  a1  a0",
9336
			  "  i   i   i   i      i   i   i   i";
9337
 
9338
	writepage	= "  1   1   0   0      0   0   1   0",
9339
			  "  0   0   x   x      x   x   x   x",
9340
			  " a7  a6  a5  a4     a3  a2   0   0",
9341
			  "  x   x   x   x      x   x   x   x";
9342
 
9343
	mode		= 0x41;
9344
	delay		= 6;
9345
	blocksize	= 4;
9346
	readsize	= 256;
9347
       ;
9348
     memory "flash"
9349
         paged           = yes;
9350
         size            = 8192;
9351
         page_size       = 64;
9352
         num_pages       = 128;
9353
         min_write_delay = 4500;
9354
         max_write_delay = 4500;
9355
         readback_p1     = 0xff;
9356
         readback_p2     = 0xff;
9357
         read_lo         = "  0   0   1   0    0   0   0   0",
9358
                           "  0   0   0   0   a11 a10 a9  a8",
9359
                           " a7  a6  a5  a4   a3  a2  a1  a0",
9360
                           "  o   o   o   o    o   o   o   o";
9361
 
9362
         read_hi         = "  0   0   1   0    1   0   0   0",
9363
                           "  0   0   0   0   a11 a10 a9  a8",
9364
                           " a7  a6  a5  a4   a3  a2  a1  a0",
9365
                           "  o   o   o   o    o   o   o   o";
9366
 
9367
         loadpage_lo     = "  0   1   0   0    0   0   0   0",
9368
                           "  0   0   0   x    x   x   x   x",
9369
                           "  x   x   x  a4   a3  a2  a1  a0",
9370
                           "  i   i   i   i    i   i   i   i";
9371
 
9372
         loadpage_hi     = "  0   1   0   0    1   0   0   0",
9373
                           "  0   0   0   x    x   x   x   x",
9374
                           "  x   x   x  a4   a3  a2  a1  a0",
9375
                           "  i   i   i   i    i   i   i   i";
9376
 
9377
         writepage       = "  0  1  0  0   1   1   0   0",
9378
                           "  0  0  0  0   a11 a10 a9  a8",
9379
                           " a7 a6 a5  x   x   x   x   x",
9380
                           "  x  x  x  x   x   x   x   x";
9381
 
9382
	mode		= 0x41;
9383
	delay		= 6;
9384
	blocksize	= 64;
9385
	readsize	= 256;
9386
       ;
9387
     memory "signature"
9388
         size            = 3;
9389
         read            = "0  0  1  1   0  0  0  0   0  0  x  x   x  x  x  x",
9390
                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
9391
       ;
9392
     memory "lock"
9393
         size            = 1;
9394
         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
9395
                           "x x x x  x x x x  1 1 i i  i i i i";
9396
 
9397
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
9398
                           "x x x x  x x x x  x x o o  o o o o";
9399
        min_write_delay = 9000;
9400
        max_write_delay = 9000;
9401
       ;
9402
 
9403
     memory "lfuse"
9404
         size            = 1;
9405
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
9406
                           "x x x x  x x x x  i i i i  i i i i";
9407
 
9408
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
9409
                           "x x x x  x x x x  o o o o  o o o o";
9410
        min_write_delay = 9000;
9411
        max_write_delay = 9000;
9412
       ;
9413
 
9414
     memory "hfuse"
9415
         size            = 1;
9416
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
9417
                           "x x x x  x x x x  i i i i  i i i i";
9418
 
9419
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
9420
                           "x x x x  x x x x  o o o o  o o o o";
9421
        min_write_delay = 9000;
9422
        max_write_delay = 9000;
9423
       ;
9424
 
9425
     memory "efuse"
9426
         size            = 1;
9427
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
9428
                           "x x x x  x x x x  x x x x  x x x i";
9429
 
9430
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
9431
                           "x x x x  x x x x  o o o o  o o o o";
9432
        min_write_delay = 9000;
9433
        max_write_delay = 9000;
9434
     ;
9435
 
9436
     memory "calibration"
9437
         size            = 1;
9438
         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
9439
                           "0  0  0  0   0  0  0  0    o o o o  o o o o";
9440
     ;
9441
  ;
9442
 
9443
#------------------------------------------------------------
9444
# ATtiny25
9445
#------------------------------------------------------------
9446
 
9447
part
9448
     id            = "t25";
9449
     desc          = "ATtiny25";
9450
     has_debugwire = yes;
9451
     flash_instr   = 0xB4, 0x02, 0x12;
9452
     eeprom_instr  = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
9453
	             0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC,
9454
	             0x99, 0xE1, 0xBB, 0xAC;
9455
## no STK500 devcode in XML file, use the ATtiny45 one
9456
     stk500_devcode   = 0x14;
9457
##  avr910_devcode   = ?;
9458
##  Try the AT90S2313 devcode:
9459
     avr910_devcode   = 0x20;
9460
     signature        = 0x1e 0x91 0x08;
9461
     reset            = io;
9462
     chip_erase_delay = 4500;
9463
 
9464
     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
9465
                        "x x x x  x x x x    x x x x  x x x x";
9466
 
9467
     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
9468
                        "x x x x  x x x x    x x x x  x x x x";
9469
 
9470
    timeout		= 200;
9471
    stabdelay		= 100;
9472
    cmdexedelay		= 25;
9473
    synchloops		= 32;
9474
    bytedelay		= 0;
9475
    pollindex		= 3;
9476
    pollvalue		= 0x53;
9477
    predelay		= 1;
9478
    postdelay		= 1;
9479
    pollmethod		= 1;
9480
 
9481
    hvsp_controlstack   =
9482
        0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
9483
        0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
9484
        0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
9485
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
9486
    hventerstabdelay    = 100;
9487
    hvspcmdexedelay     = 0;
9488
    synchcycles         = 6;
9489
    latchcycles         = 1;
9490
    togglevtg           = 1;
9491
    poweroffdelay       = 25;
9492
    resetdelayms        = 1;
9493
    resetdelayus        = 0;
9494
    hvleavestabdelay    = 100;
9495
    resetdelay          = 25;
9496
    chiperasepolltimeout = 40;
9497
    chiperasetime       = 0;
9498
    programfusepolltimeout = 25;
9499
    programlockpolltimeout = 25;
9500
 
9501
     memory "eeprom"
9502
         size            = 128;
9503
        paged           = no;
9504
        page_size       = 4;
9505
         min_write_delay = 4000;
9506
         max_write_delay = 4500;
9507
         readback_p1     = 0xff;
9508
         readback_p2     = 0xff;
9509
         read            = "1  0  1  0   0  0  0  0   0 0 0 x  x x x x",
9510
                           "x a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
9511
 
9512
         write           = "1  1  0  0   0  0  0  0   0 0 0 x  x x x x",
9513
                           "x a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
9514
 
9515
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
9516
			  "  0   0   0   0      0   0   0   0",
9517
			  "  0   0   0   0      0   0  a1  a0",
9518
			  "  i   i   i   i      i   i   i   i";
9519
 
9520
	writepage	= "  1   1   0   0      0   0   1   0",
9521
			  "  0   0   x   x      x   x   x   x",
9522
			  "  x  a6  a5  a4     a3  a2   0   0",
9523
			  "  x   x   x   x      x   x   x   x";
9524
 
9525
	mode		= 0x41;
9526
	delay		= 6;
9527
	blocksize	= 4;
9528
	readsize	= 256;
9529
       ;
9530
     memory "flash"
9531
         paged           = yes;
9532
         size            = 2048;
9533
         page_size       = 32;
9534
         num_pages       = 64;
9535
         min_write_delay = 4500;
9536
         max_write_delay = 4500;
9537
         readback_p1     = 0xff;
9538
         readback_p2     = 0xff;
9539
         read_lo         = "  0   0   1   0    0   0   0   0",
9540
                           "  0   0   0   0    0   0  a9  a8",
9541
                           " a7  a6  a5  a4   a3  a2  a1  a0",
9542
                           "  o   o   o   o    o   o   o   o";
9543
 
9544
         read_hi         = "  0   0   1   0    1   0   0   0",
9545
                           "  0   0   0   0    0   0  a9  a8",
9546
                           " a7  a6  a5  a4   a3  a2  a1  a0",
9547
                           "  o   o   o   o    o   o   o   o";
9548
 
9549
         loadpage_lo     = "  0   1   0   0    0   0   0   0",
9550
                           "  0   0   0   x    x   x   x   x",
9551
                           "  x   x   x   x   a3  a2  a1  a0",
9552
                           "  i   i   i   i    i   i   i   i";
9553
 
9554
         loadpage_hi     = "  0   1   0   0    1   0   0   0",
9555
                           "  0   0   0   x    x   x   x   x",
9556
                           "  x   x   x   x   a3  a2  a1  a0",
9557
                           "  i   i   i   i    i   i   i   i";
9558
 
9559
         writepage       = "  0  1  0  0   1  1  0  0",
9560
                           "  0  0  0  0   0  0 a9 a8",
9561
                           " a7 a6 a5 a4   x  x  x  x",
9562
                           "  x  x  x  x   x  x  x  x";
9563
 
9564
	mode		= 0x41;
9565
	delay		= 6;
9566
	blocksize	= 32;
9567
	readsize	= 256;
9568
       ;
9569
#   ATtiny25 has Signature Bytes: 0x1E 0x91 0x08.
9570
     memory "signature"
9571
         size            = 3;
9572
         read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
9573
                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
9574
       ;
9575
     memory "lock"
9576
         size            = 1;
9577
         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
9578
                           "x x x x  x x x x  1 1 i i  i i i i";
9579
        min_write_delay = 9000;
9580
        max_write_delay = 9000;
9581
       ;
9582
 
9583
     memory "lfuse"
9584
         size            = 1;
9585
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
9586
                           "x x x x  x x x x  i i i i  i i i i";
9587
 
9588
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
9589
                           "x x x x  x x x x  o o o o  o o o o";
9590
        min_write_delay = 9000;
9591
        max_write_delay = 9000;
9592
       ;
9593
 
9594
     memory "hfuse"
9595
         size            = 1;
9596
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
9597
                           "x x x x  x x x x  i i i i  i i i i";
9598
 
9599
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
9600
                           "x x x x  x x x x  o o o o  o o o o";
9601
        min_write_delay = 9000;
9602
        max_write_delay = 9000;
9603
       ;
9604
 
9605
     memory "efuse"
9606
         size            = 1;
9607
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
9608
                           "x x x x  x x x x  x x x x  x x x i";
9609
 
9610
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
9611
                           "x x x x  x x x x  o o o o  o o o o";
9612
        min_write_delay = 9000;
9613
        max_write_delay = 9000;
9614
     ;
9615
 
9616
     memory "calibration"
9617
         size            = 2;
9618
         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
9619
                           "0  0  0  0   0  0  0  a0   o o o o  o o o o";
9620
     ;
9621
  ;
9622
 
9623
#------------------------------------------------------------
9624
# ATtiny45
9625
#------------------------------------------------------------
9626
 
9627
part
9628
     id            = "t45";
9629
     desc          = "ATtiny45";
9630
     has_debugwire = yes;
9631
     flash_instr   = 0xB4, 0x02, 0x12;
9632
     eeprom_instr  = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
9633
	             0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC,
9634
	             0x99, 0xE1, 0xBB, 0xAC;
9635
     stk500_devcode   = 0x14;
9636
##  avr910_devcode   = ?;
9637
##  Try the AT90S2313 devcode:
9638
     avr910_devcode   = 0x20;
9639
     signature        = 0x1e 0x92 0x06;
9640
     reset            = io;
9641
     chip_erase_delay = 4500;
9642
 
9643
     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
9644
                        "x x x x  x x x x    x x x x  x x x x";
9645
 
9646
     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
9647
                        "x x x x  x x x x    x x x x  x x x x";
9648
 
9649
    timeout		= 200;
9650
    stabdelay		= 100;
9651
    cmdexedelay		= 25;
9652
    synchloops		= 32;
9653
    bytedelay		= 0;
9654
    pollindex		= 3;
9655
    pollvalue		= 0x53;
9656
    predelay		= 1;
9657
    postdelay		= 1;
9658
    pollmethod		= 1;
9659
 
9660
    hvsp_controlstack     =
9661
	0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
9662
        0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
9663
        0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
9664
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
9665
    hventerstabdelay    = 100;
9666
    progmodedelay       = 0;
9667
    hvspcmdexedelay     = 0;
9668
    synchcycles         = 6;
9669
    latchcycles         = 1;
9670
    togglevtg           = 1;
9671
    poweroffdelay       = 25;
9672
    resetdelayms        = 1;
9673
    resetdelayus        = 0;
9674
    hvleavestabdelay    = 100;
9675
    resetdelay          = 25;
9676
    chiperasepolltimeout = 40;
9677
    chiperasetime       = 0;
9678
    programfusepolltimeout = 25;
9679
    programlockpolltimeout = 25;
9680
 
9681
     memory "eeprom"
9682
         size            = 256;
9683
         page_size       = 4;
9684
         min_write_delay = 4000;
9685
         max_write_delay = 4500;
9686
         readback_p1     = 0xff;
9687
         readback_p2     = 0xff;
9688
         read            = "1  0  1  0   0  0  0  0    0 0 0 x  x x x x",
9689
                           "a7 a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
9690
 
9691
         write           = "1  1  0  0   0  0  0  0    0 0 0 x  x x x x",
9692
                           "a7 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
9693
 
9694
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
9695
			  "  0   0   0   0      0   0   0   0",
9696
			  "  0   0   0   0      0   0  a1  a0",
9697
			  "  i   i   i   i      i   i   i   i";
9698
 
9699
	writepage	= "  1   1   0   0      0   0   1   0",
9700
			  "  0   0   x   x      x   x   x   x",
9701
			  " a7  a6  a5  a4     a3  a2   0   0",
9702
			  "  x   x   x   x      x   x   x   x";
9703
 
9704
	mode		= 0x41;
9705
	delay		= 6;
9706
	blocksize	= 4;
9707
	readsize	= 256;
9708
       ;
9709
     memory "flash"
9710
         paged           = yes;
9711
         size            = 4096;
9712
         page_size       = 64;
9713
         num_pages       = 64;
9714
         min_write_delay = 4500;
9715
         max_write_delay = 4500;
9716
         readback_p1     = 0xff;
9717
         readback_p2     = 0xff;
9718
         read_lo         = "  0   0   1   0    0   0   0   0",
9719
                           "  0   0   0   0    0  a10 a9  a8",
9720
                           " a7  a6  a5  a4   a3  a2  a1  a0",
9721
                           "  o   o   o   o    o   o   o   o";
9722
 
9723
         read_hi         = "  0   0   1   0    1   0   0   0",
9724
                           "  0   0   0   0    0  a10 a9  a8",
9725
                           " a7  a6  a5  a4   a3  a2  a1  a0",
9726
                           "  o   o   o   o    o   o   o   o";
9727
 
9728
         loadpage_lo     = "  0   1   0   0    0   0   0   0",
9729
                           "  0   0   0   x    x   x   x   x",
9730
                           "  x   x   x  a4   a3  a2  a1  a0",
9731
                           "  i   i   i   i    i   i   i   i";
9732
 
9733
         loadpage_hi     = "  0   1   0   0    1   0   0   0",
9734
                           "  0   0   0   x    x   x   x   x",
9735
                           "  x   x   x  a4   a3  a2  a1  a0",
9736
                           "  i   i   i   i    i   i   i   i";
9737
 
9738
         writepage       = "  0  1  0  0   1  1  0  0",
9739
                           "  0  0  0  0   0 a10 a9 a8",
9740
                           " a7 a6 a5  x   x  x  x  x",
9741
                           "  x  x  x  x   x  x  x  x";
9742
 
9743
	mode		= 0x41;
9744
	delay		= 6;
9745
	blocksize	= 32;
9746
	readsize	= 256;
9747
       ;
9748
#   ATtiny45 has Signature Bytes: 0x1E 0x92 0x08. (Data sheet 2586C-AVR-06/05 (doc2586.pdf) indicates otherwise!)
9749
     memory "signature"
9750
         size            = 3;
9751
         read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
9752
                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
9753
       ;
9754
     memory "lock"
9755
         size            = 1;
9756
         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
9757
                           "x x x x  x x x x  1 1 i i  i i i i";
9758
        min_write_delay = 9000;
9759
        max_write_delay = 9000;
9760
       ;
9761
 
9762
     memory "lfuse"
9763
         size            = 1;
9764
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
9765
                           "x x x x  x x x x  i i i i  i i i i";
9766
 
9767
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
9768
                           "x x x x  x x x x  o o o o  o o o o";
9769
        min_write_delay = 9000;
9770
        max_write_delay = 9000;
9771
       ;
9772
 
9773
     memory "hfuse"
9774
         size            = 1;
9775
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
9776
                           "x x x x  x x x x  i i i i  i i i i";
9777
 
9778
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
9779
                           "x x x x  x x x x  o o o o  o o o o";
9780
        min_write_delay = 9000;
9781
        max_write_delay = 9000;
9782
       ;
9783
 
9784
     memory "efuse"
9785
         size            = 1;
9786
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
9787
                           "x x x x  x x x x  x x x x  x x x i";
9788
 
9789
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
9790
                           "x x x x  x x x x  o o o o  o o o o";
9791
        min_write_delay = 9000;
9792
        max_write_delay = 9000;
9793
     ;
9794
 
9795
     memory "calibration"
9796
         size            = 2;
9797
         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
9798
                           "0  0  0  0   0  0  0  a0   o o o o  o o o o";
9799
     ;
9800
  ;
9801
 
9802
#------------------------------------------------------------
9803
# ATtiny85
9804
#------------------------------------------------------------
9805
 
9806
part
9807
     id            = "t85";
9808
     desc          = "ATtiny85";
9809
     has_debugwire = yes;
9810
     flash_instr   = 0xB4, 0x02, 0x12;
9811
     eeprom_instr  = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
9812
	             0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC,
9813
	             0x99, 0xE1, 0xBB, 0xAC;
9814
## no STK500 devcode in XML file, use the ATtiny45 one
9815
     stk500_devcode   = 0x14;
9816
##  avr910_devcode   = ?;
9817
##  Try the AT90S2313 devcode:
9818
     avr910_devcode   = 0x20;
9819
     signature        = 0x1e 0x93 0x0b;
9820
     reset            = io;
9821
     chip_erase_delay = 4500;
9822
 
9823
     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
9824
                        "x x x x  x x x x    x x x x  x x x x";
9825
 
9826
     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
9827
                        "x x x x  x x x x    x x x x  x x x x";
9828
 
9829
    timeout		= 200;
9830
    stabdelay		= 100;
9831
    cmdexedelay		= 25;
9832
    synchloops		= 32;
9833
    bytedelay		= 0;
9834
    pollindex		= 3;
9835
    pollvalue		= 0x53;
9836
    predelay		= 1;
9837
    postdelay		= 1;
9838
    pollmethod		= 1;
9839
 
9840
    hvsp_controlstack   =
9841
        0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
9842
        0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
9843
        0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
9844
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
9845
    hventerstabdelay    = 100;
9846
    hvspcmdexedelay     = 0;
9847
    synchcycles         = 6;
9848
    latchcycles         = 1;
9849
    togglevtg           = 1;
9850
    poweroffdelay       = 25;
9851
    resetdelayms        = 1;
9852
    resetdelayus        = 0;
9853
    hvleavestabdelay    = 100;
9854
    resetdelay          = 25;
9855
    chiperasepolltimeout = 40;
9856
    chiperasetime       = 0;
9857
    programfusepolltimeout = 25;
9858
    programlockpolltimeout = 25;
9859
 
9860
     memory "eeprom"
9861
         size            = 512;
9862
        paged           = no;
9863
        page_size       = 4;
9864
         min_write_delay = 4000;
9865
         max_write_delay = 4500;
9866
         readback_p1     = 0xff;
9867
         readback_p2     = 0xff;
9868
         read            = "1  0  1  0   0  0  0  0    0 0 0 x  x x x a8",
9869
                           "a7 a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
9870
 
9871
         write           = "1  1  0  0   0  0  0  0    0 0 0 x  x x x a8",
9872
                           "a8 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
9873
 
9874
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
9875
			  "  0   0   0   0      0   0   0   0",
9876
			  "  0   0   0   0      0   0  a1  a0",
9877
			  "  i   i   i   i      i   i   i   i";
9878
 
9879
	writepage	= "  1   1   0   0      0   0   1   0",
9880
			  "  0   0   x   x      x   x   x  a8",
9881
			  " a7  a6  a5  a4     a3  a2   0   0",
9882
			  "  x   x   x   x      x   x   x   x";
9883
 
9884
	mode		= 0x41;
9885
	delay		= 6;
9886
	blocksize	= 4;
9887
	readsize	= 256;
9888
       ;
9889
     memory "flash"
9890
         paged           = yes;
9891
         size            = 8192;
9892
         page_size       = 64;
9893
         num_pages       = 128;
9894
         min_write_delay = 4500;
9895
         max_write_delay = 4500;
9896
         readback_p1     = 0xff;
9897
         readback_p2     = 0xff;
9898
         read_lo         = "  0   0   1   0    0   0   0   0",
9899
                           "  0   0   0   0  a11 a10  a9  a8",
9900
                           " a7  a6  a5  a4   a3  a2  a1  a0",
9901
                           "  o   o   o   o    o   o   o   o";
9902
 
9903
         read_hi         = "  0   0   1   0    1   0   0   0",
9904
                           "  0   0   0   0  a11 a10  a9  a8",
9905
                           " a7  a6  a5  a4   a3  a2  a1  a0",
9906
                           "  o   o   o   o    o   o   o   o";
9907
 
9908
         loadpage_lo     = "  0   1   0   0    0   0   0   0",
9909
                           "  0   0   0   x    x   x   x   x",
9910
                           "  x   x   x  a4   a3  a2  a1  a0",
9911
                           "  i   i   i   i    i   i   i   i";
9912
 
9913
         loadpage_hi     = "  0   1   0   0    1   0   0   0",
9914
                           "  0   0   0   x    x   x   x   x",
9915
                           "  x   x   x  a4   a3  a2  a1  a0",
9916
                           "  i   i   i   i    i   i   i   i";
9917
 
9918
         writepage       = "  0  1  0  0   1   1   0  0",
9919
                           "  0  0  0  0  a11 a10 a9 a8",
9920
                           " a7 a6 a5  x   x  x  x  x",
9921
                           "  x  x  x  x   x  x  x  x";
9922
 
9923
	mode		= 0x41;
9924
	delay		= 6;
9925
	blocksize	= 32;
9926
	readsize	= 256;
9927
       ;
9928
#   ATtiny85 has Signature Bytes: 0x1E 0x93 0x08.
9929
     memory "signature"
9930
         size            = 3;
9931
         read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
9932
                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
9933
       ;
9934
     memory "lock"
9935
         size            = 1;
9936
         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
9937
                           "x x x x  x x x x  1 1 i i  i i i i";
9938
        min_write_delay = 9000;
9939
        max_write_delay = 9000;
9940
       ;
9941
 
9942
     memory "lfuse"
9943
         size            = 1;
9944
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
9945
                           "x x x x  x x x x  i i i i  i i i i";
9946
 
9947
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
9948
                           "x x x x  x x x x  o o o o  o o o o";
9949
        min_write_delay = 9000;
9950
        max_write_delay = 9000;
9951
       ;
9952
 
9953
     memory "hfuse"
9954
         size            = 1;
9955
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
9956
                           "x x x x  x x x x  i i i i  i i i i";
9957
 
9958
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
9959
                           "x x x x  x x x x  o o o o  o o o o";
9960
        min_write_delay = 9000;
9961
        max_write_delay = 9000;
9962
       ;
9963
 
9964
     memory "efuse"
9965
         size            = 1;
9966
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
9967
                           "x x x x  x x x x  x x x x  x x x i";
9968
 
9969
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
9970
                           "x x x x  x x x x  o o o o  o o o o";
9971
        min_write_delay = 9000;
9972
        max_write_delay = 9000;
9973
     ;
9974
 
9975
     memory "calibration"
9976
         size            = 2;
9977
         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
9978
                           "0  0  0  0   0  0  0  a0   o o o o  o o o o";
9979
     ;
9980
  ;
9981
 
9982
#------------------------------------------------------------
9983
# ATmega640
9984
#------------------------------------------------------------
9985
# Almost same as ATmega1280, except for different memory sizes
9986
 
9987
part
9988
    id               = "m640";
9989
    desc             = "ATMEGA640";
9990
    signature        = 0x1e 0x96 0x08;
9991
    has_jtag         = yes;
9992
#    stk500_devcode   = 0xB2;
9993
#    avr910_devcode   = 0x43;
9994
    chip_erase_delay = 9000;
9995
    pagel            = 0xD7;
9996
    bs2              = 0xA0;
9997
    reset            = dedicated;
9998
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
9999
                       "x x x x  x x x x    x x x x  x x x x";
10000
 
10001
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
10002
                       "x x x x  x x x x    x x x x  x x x x";
10003
 
10004
    timeout		= 200;
10005
    stabdelay		= 100;
10006
    cmdexedelay		= 25;
10007
    synchloops		= 32;
10008
    bytedelay		= 0;
10009
    pollindex		= 3;
10010
    pollvalue		= 0x53;
10011
    predelay		= 1;
10012
    postdelay		= 1;
10013
    pollmethod		= 1;
10014
 
10015
    pp_controlstack     =
10016
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
10017
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
10018
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
10019
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
10020
    hventerstabdelay    = 100;
10021
    progmodedelay       = 0;
10022
    latchcycles         = 5;
10023
    togglevtg           = 1;
10024
    poweroffdelay       = 15;
10025
    resetdelayms        = 1;
10026
    resetdelayus        = 0;
10027
    hvleavestabdelay    = 15;
10028
    chiperasepulsewidth = 0;
10029
    chiperasepolltimeout = 10;
10030
    programfusepulsewidth = 0;
10031
    programfusepolltimeout = 5;
10032
    programlockpulsewidth = 0;
10033
    programlockpolltimeout = 5;
10034
 
10035
    idr                 = 0x31;
10036
    spmcr               = 0x57;
10037
    rampz               = 0x3b;
10038
    allowfullpagebitstream = no;
10039
 
10040
    memory "eeprom"
10041
        paged           = no; /* leave this "no" */
10042
        page_size       = 8;  /* for parallel programming */
10043
        size            = 4096;
10044
        min_write_delay = 9000;
10045
        max_write_delay = 9000;
10046
        readback_p1     = 0x00;
10047
        readback_p2     = 0x00;
10048
        read            = "  1   0   1   0      0   0   0   0",
10049
                          "  x   x   x   x    a11 a10  a9  a8",
10050
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10051
                          "  o   o   o   o      o   o   o   o";
10052
 
10053
        write           = "  1   1   0   0      0   0   0   0",
10054
                          "  x   x   x   x    a11 a10  a9  a8",
10055
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10056
                          "  i   i   i   i      i   i   i   i";
10057
 
10058
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
10059
			  "  0   0   0   0      0   0   0   0",
10060
			  "  0   0   0   0      0  a2  a1  a0",
10061
			  "  i   i   i   i      i   i   i   i";
10062
 
10063
	writepage	= "  1   1   0   0      0   0   1   0",
10064
			  "  0   0   x   x    a11 a10  a9  a8",
10065
			  " a7  a6  a5  a4     a3   0   0   0",
10066
			  "  x   x   x   x      x   x   x   x";
10067
 
10068
	mode		= 0x41;
10069
	delay		= 10;
10070
	blocksize	= 8;
10071
	readsize	= 256;
10072
      ;
10073
 
10074
    memory "flash"
10075
        paged           = yes;
10076
        size            = 65536;
10077
        page_size       = 256;
10078
        num_pages       = 256;
10079
        min_write_delay = 4500;
10080
        max_write_delay = 4500;
10081
        readback_p1     = 0x00;
10082
        readback_p2     = 0x00;
10083
        read_lo         = "  0   0   1   0      0   0   0   0",
10084
                          "  0 a14 a13 a12    a11 a10  a9  a8",
10085
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10086
                          "  o   o   o   o      o   o   o   o";
10087
 
10088
        read_hi         = "  0   0   1   0      1   0   0   0",
10089
                          "  0 a14 a13 a12    a11 a10  a9  a8",
10090
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10091
                          "  o   o   o   o      o   o   o   o";
10092
 
10093
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
10094
                          "  x   x   x   x      x   x   x   x",
10095
                          "  x  a6  a5  a4     a3  a2  a1  a0",
10096
                          "  i   i   i   i      i   i   i   i";
10097
 
10098
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
10099
                          "  x   x   x   x      x   x   x   x",
10100
                          "  x  a6  a5  a4     a3  a2  a1  a0",
10101
                          "  i   i   i   i      i   i   i   i";
10102
 
10103
        writepage       = "  0   1   0   0      1   1   0   0",
10104
                          "  0 a14 a13 a12    a11 a10  a9  a8",
10105
                          " a7   x   x   x      x   x   x   x",
10106
                          "  x   x   x   x      x   x   x   x";
10107
 
10108
	mode		= 0x41;
10109
	delay		= 10;
10110
	blocksize	= 256;
10111
	readsize	= 256;
10112
      ;
10113
 
10114
    memory "lfuse"
10115
        size            = 1;
10116
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
10117
                          "x x x x  x x x x  i i i i  i i i i";
10118
 
10119
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
10120
                          "x x x x  x x x x  o o o o  o o o o";
10121
        min_write_delay = 9000;
10122
        max_write_delay = 9000;
10123
      ;
10124
 
10125
    memory "hfuse"
10126
        size            = 1;
10127
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
10128
                          "x x x x  x x x x  i i i i  i i i i";
10129
 
10130
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
10131
                          "x x x x  x x x x  o o o o  o o o o";
10132
        min_write_delay = 9000;
10133
        max_write_delay = 9000;
10134
      ;
10135
 
10136
    memory "efuse"
10137
        size            = 1;
10138
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
10139
                          "x x x x  x x x x  x x x x  x i i i";
10140
 
10141
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
10142
                          "x x x x  x x x x  o o o o  o o o o";
10143
        min_write_delay = 9000;
10144
        max_write_delay = 9000;
10145
      ;
10146
 
10147
    memory "lock"
10148
        size            = 1;
10149
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
10150
                          "x x x x  x x x x   x x o o  o o o o";
10151
 
10152
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
10153
                          "x x x x  x x x x   1 1 i i  i i i i";
10154
        min_write_delay = 9000;
10155
        max_write_delay = 9000;
10156
      ;
10157
 
10158
    memory "calibration"
10159
        size            = 1;
10160
        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
10161
                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
10162
      ;
10163
 
10164
    memory "signature"
10165
        size            = 3;
10166
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
10167
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
10168
      ;
10169
  ;
10170
 
10171
#------------------------------------------------------------
10172
# ATmega1280
10173
#------------------------------------------------------------
10174
 
10175
part
10176
    id               = "m1280";
10177
    desc             = "ATMEGA1280";
10178
    signature        = 0x1e 0x97 0x03;
10179
    has_jtag         = yes;
10180
#    stk500_devcode   = 0xB2;
10181
#    avr910_devcode   = 0x43;
10182
    chip_erase_delay = 9000;
10183
    pagel            = 0xD7;
10184
    bs2              = 0xA0;
10185
    reset            = dedicated;
10186
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
10187
                       "x x x x  x x x x    x x x x  x x x x";
10188
 
10189
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
10190
                       "x x x x  x x x x    x x x x  x x x x";
10191
 
10192
    timeout		= 200;
10193
    stabdelay		= 100;
10194
    cmdexedelay		= 25;
10195
    synchloops		= 32;
10196
    bytedelay		= 0;
10197
    pollindex		= 3;
10198
    pollvalue		= 0x53;
10199
    predelay		= 1;
10200
    postdelay		= 1;
10201
    pollmethod		= 1;
10202
 
10203
    pp_controlstack     =
10204
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
10205
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
10206
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
10207
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
10208
    hventerstabdelay    = 100;
10209
    progmodedelay       = 0;
10210
    latchcycles         = 5;
10211
    togglevtg           = 1;
10212
    poweroffdelay       = 15;
10213
    resetdelayms        = 1;
10214
    resetdelayus        = 0;
10215
    hvleavestabdelay    = 15;
10216
    chiperasepulsewidth = 0;
10217
    chiperasepolltimeout = 10;
10218
    programfusepulsewidth = 0;
10219
    programfusepolltimeout = 5;
10220
    programlockpulsewidth = 0;
10221
    programlockpolltimeout = 5;
10222
 
10223
    idr                 = 0x31;
10224
    spmcr               = 0x57;
10225
    rampz               = 0x3b;
10226
    allowfullpagebitstream = no;
10227
 
10228
    memory "eeprom"
10229
        paged           = no; /* leave this "no" */
10230
        page_size       = 8;  /* for parallel programming */
10231
        size            = 4096;
10232
        min_write_delay = 9000;
10233
        max_write_delay = 9000;
10234
        readback_p1     = 0x00;
10235
        readback_p2     = 0x00;
10236
        read            = "  1   0   1   0      0   0   0   0",
10237
                          "  x   x   x   x    a11 a10  a9  a8",
10238
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10239
                          "  o   o   o   o      o   o   o   o";
10240
 
10241
        write           = "  1   1   0   0      0   0   0   0",
10242
                          "  x   x   x   x    a11 a10  a9  a8",
10243
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10244
                          "  i   i   i   i      i   i   i   i";
10245
 
10246
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
10247
			  "  0   0   0   0      0   0   0   0",
10248
			  "  0   0   0   0      0  a2  a1  a0",
10249
			  "  i   i   i   i      i   i   i   i";
10250
 
10251
	writepage	= "  1   1   0   0      0   0   1   0",
10252
			  "  0   0   x   x    a11 a10  a9  a8",
10253
			  " a7  a6  a5  a4     a3   0   0   0",
10254
			  "  x   x   x   x      x   x   x   x";
10255
 
10256
	mode		= 0x41;
10257
	delay		= 10;
10258
	blocksize	= 8;
10259
	readsize	= 256;
10260
      ;
10261
 
10262
    memory "flash"
10263
        paged           = yes;
10264
        size            = 131072;
10265
        page_size       = 256;
10266
        num_pages       = 512;
10267
        min_write_delay = 4500;
10268
        max_write_delay = 4500;
10269
        readback_p1     = 0x00;
10270
        readback_p2     = 0x00;
10271
        read_lo         = "  0   0   1   0      0   0   0   0",
10272
                          "a15 a14 a13 a12    a11 a10  a9  a8",
10273
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10274
                          "  o   o   o   o      o   o   o   o";
10275
 
10276
        read_hi         = "  0   0   1   0      1   0   0   0",
10277
                          "a15 a14 a13 a12    a11 a10  a9  a8",
10278
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10279
                          "  o   o   o   o      o   o   o   o";
10280
 
10281
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
10282
                          "  x   x   x   x      x   x   x   x",
10283
                          "  x  a6  a5  a4     a3  a2  a1  a0",
10284
                          "  i   i   i   i      i   i   i   i";
10285
 
10286
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
10287
                          "  x   x   x   x      x   x   x   x",
10288
                          "  x  a6  a5  a4     a3  a2  a1  a0",
10289
                          "  i   i   i   i      i   i   i   i";
10290
 
10291
        writepage       = "  0   1   0   0      1   1   0   0",
10292
                          "a15 a14 a13 a12    a11 a10  a9  a8",
10293
                          " a7   x   x   x      x   x   x   x",
10294
                          "  x   x   x   x      x   x   x   x";
10295
 
10296
	mode		= 0x41;
10297
	delay		= 10;
10298
	blocksize	= 256;
10299
	readsize	= 256;
10300
      ;
10301
 
10302
    memory "lfuse"
10303
        size            = 1;
10304
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
10305
                          "x x x x  x x x x  i i i i  i i i i";
10306
 
10307
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
10308
                          "x x x x  x x x x  o o o o  o o o o";
10309
        min_write_delay = 9000;
10310
        max_write_delay = 9000;
10311
      ;
10312
 
10313
    memory "hfuse"
10314
        size            = 1;
10315
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
10316
                          "x x x x  x x x x  i i i i  i i i i";
10317
 
10318
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
10319
                          "x x x x  x x x x  o o o o  o o o o";
10320
        min_write_delay = 9000;
10321
        max_write_delay = 9000;
10322
      ;
10323
 
10324
    memory "efuse"
10325
        size            = 1;
10326
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
10327
                          "x x x x  x x x x  x x x x  x i i i";
10328
 
10329
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
10330
                          "x x x x  x x x x  o o o o  o o o o";
10331
        min_write_delay = 9000;
10332
        max_write_delay = 9000;
10333
      ;
10334
 
10335
    memory "lock"
10336
        size            = 1;
10337
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
10338
                          "x x x x  x x x x   x x o o  o o o o";
10339
 
10340
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
10341
                          "x x x x  x x x x   1 1 i i  i i i i";
10342
        min_write_delay = 9000;
10343
        max_write_delay = 9000;
10344
      ;
10345
 
10346
    memory "calibration"
10347
        size            = 1;
10348
        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
10349
                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
10350
      ;
10351
 
10352
    memory "signature"
10353
        size            = 3;
10354
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
10355
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
10356
      ;
10357
  ;
10358
 
10359
#------------------------------------------------------------
10360
# ATmega1281
10361
#------------------------------------------------------------
10362
# Identical to ATmega1280
10363
 
10364
part
10365
    id               = "m1281";
10366
    desc             = "ATMEGA1281";
10367
    signature        = 0x1e 0x97 0x04;
10368
    has_jtag         = yes;
10369
#    stk500_devcode   = 0xB2;
10370
#    avr910_devcode   = 0x43;
10371
    chip_erase_delay = 9000;
10372
    pagel            = 0xD7;
10373
    bs2              = 0xA0;
10374
    reset            = dedicated;
10375
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
10376
                       "x x x x  x x x x    x x x x  x x x x";
10377
 
10378
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
10379
                       "x x x x  x x x x    x x x x  x x x x";
10380
 
10381
    timeout		= 200;
10382
    stabdelay		= 100;
10383
    cmdexedelay		= 25;
10384
    synchloops		= 32;
10385
    bytedelay		= 0;
10386
    pollindex		= 3;
10387
    pollvalue		= 0x53;
10388
    predelay		= 1;
10389
    postdelay		= 1;
10390
    pollmethod		= 1;
10391
 
10392
    pp_controlstack     =
10393
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
10394
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
10395
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
10396
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
10397
    hventerstabdelay    = 100;
10398
    progmodedelay       = 0;
10399
    latchcycles         = 5;
10400
    togglevtg           = 1;
10401
    poweroffdelay       = 15;
10402
    resetdelayms        = 1;
10403
    resetdelayus        = 0;
10404
    hvleavestabdelay    = 15;
10405
    chiperasepulsewidth = 0;
10406
    chiperasepolltimeout = 10;
10407
    programfusepulsewidth = 0;
10408
    programfusepolltimeout = 5;
10409
    programlockpulsewidth = 0;
10410
    programlockpolltimeout = 5;
10411
 
10412
    idr                 = 0x31;
10413
    spmcr               = 0x57;
10414
    rampz               = 0x3b;
10415
    allowfullpagebitstream = no;
10416
 
10417
    memory "eeprom"
10418
        paged           = no; /* leave this "no" */
10419
        page_size       = 8;  /* for parallel programming */
10420
        size            = 4096;
10421
        min_write_delay = 9000;
10422
        max_write_delay = 9000;
10423
        readback_p1     = 0x00;
10424
        readback_p2     = 0x00;
10425
        read            = "  1   0   1   0      0   0   0   0",
10426
                          "  x   x   x   x    a11 a10  a9  a8",
10427
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10428
                          "  o   o   o   o      o   o   o   o";
10429
 
10430
        write           = "  1   1   0   0      0   0   0   0",
10431
                          "  x   x   x   x    a11 a10  a9  a8",
10432
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10433
                          "  i   i   i   i      i   i   i   i";
10434
 
10435
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
10436
			  "  0   0   0   0      0   0   0   0",
10437
			  "  0   0   0   0      0  a2  a1  a0",
10438
			  "  i   i   i   i      i   i   i   i";
10439
 
10440
	writepage	= "  1   1   0   0      0   0   1   0",
10441
			  "  0   0   x   x    a11 a10  a9  a8",
10442
			  " a7  a6  a5  a4     a3   0   0   0",
10443
			  "  x   x   x   x      x   x   x   x";
10444
 
10445
	mode		= 0x41;
10446
	delay		= 10;
10447
	blocksize	= 8;
10448
	readsize	= 256;
10449
      ;
10450
 
10451
    memory "flash"
10452
        paged           = yes;
10453
        size            = 131072;
10454
        page_size       = 256;
10455
        num_pages       = 512;
10456
        min_write_delay = 4500;
10457
        max_write_delay = 4500;
10458
        readback_p1     = 0x00;
10459
        readback_p2     = 0x00;
10460
        read_lo         = "  0   0   1   0      0   0   0   0",
10461
                          "a15 a14 a13 a12    a11 a10  a9  a8",
10462
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10463
                          "  o   o   o   o      o   o   o   o";
10464
 
10465
        read_hi         = "  0   0   1   0      1   0   0   0",
10466
                          "a15 a14 a13 a12    a11 a10  a9  a8",
10467
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10468
                          "  o   o   o   o      o   o   o   o";
10469
 
10470
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
10471
                          "  x   x   x   x      x   x   x   x",
10472
                          "  x  a6  a5  a4     a3  a2  a1  a0",
10473
                          "  i   i   i   i      i   i   i   i";
10474
 
10475
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
10476
                          "  x   x   x   x      x   x   x   x",
10477
                          "  x  a6  a5  a4     a3  a2  a1  a0",
10478
                          "  i   i   i   i      i   i   i   i";
10479
 
10480
        writepage       = "  0   1   0   0      1   1   0   0",
10481
                          "a15 a14 a13 a12    a11 a10  a9  a8",
10482
                          " a7   x   x   x      x   x   x   x",
10483
                          "  x   x   x   x      x   x   x   x";
10484
 
10485
	mode		= 0x41;
10486
	delay		= 10;
10487
	blocksize	= 256;
10488
	readsize	= 256;
10489
      ;
10490
 
10491
    memory "lfuse"
10492
        size            = 1;
10493
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
10494
                          "x x x x  x x x x  i i i i  i i i i";
10495
 
10496
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
10497
                          "x x x x  x x x x  o o o o  o o o o";
10498
        min_write_delay = 9000;
10499
        max_write_delay = 9000;
10500
      ;
10501
 
10502
    memory "hfuse"
10503
        size            = 1;
10504
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
10505
                          "x x x x  x x x x  i i i i  i i i i";
10506
 
10507
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
10508
                          "x x x x  x x x x  o o o o  o o o o";
10509
        min_write_delay = 9000;
10510
        max_write_delay = 9000;
10511
      ;
10512
 
10513
    memory "efuse"
10514
        size            = 1;
10515
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
10516
                          "x x x x  x x x x  x x x x  x i i i";
10517
 
10518
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
10519
                          "x x x x  x x x x  o o o o  o o o o";
10520
        min_write_delay = 9000;
10521
        max_write_delay = 9000;
10522
      ;
10523
 
10524
    memory "lock"
10525
        size            = 1;
10526
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
10527
                          "x x x x  x x x x   x x o o  o o o o";
10528
 
10529
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
10530
                          "x x x x  x x x x   1 1 i i  i i i i";
10531
        min_write_delay = 9000;
10532
        max_write_delay = 9000;
10533
      ;
10534
 
10535
    memory "calibration"
10536
        size            = 1;
10537
        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
10538
                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
10539
      ;
10540
 
10541
    memory "signature"
10542
        size            = 3;
10543
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
10544
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
10545
      ;
10546
  ;
10547
 
10548
#------------------------------------------------------------
10549
# ATmega2560
10550
#------------------------------------------------------------
10551
 
10552
part
10553
    id               = "m2560";
10554
    desc             = "ATMEGA2560";
10555
    signature        = 0x1e 0x98 0x01;
10556
    has_jtag         = yes;
10557
#    stk500_devcode   = 0xB2;
10558
#    avr910_devcode   = 0x43;
10559
    chip_erase_delay = 9000;
10560
    pagel            = 0xD7;
10561
    bs2              = 0xA0;
10562
    reset            = dedicated;
10563
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
10564
                       "x x x x  x x x x    x x x x  x x x x";
10565
 
10566
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
10567
                       "x x x x  x x x x    x x x x  x x x x";
10568
 
10569
    timeout		= 200;
10570
    stabdelay		= 100;
10571
    cmdexedelay		= 25;
10572
    synchloops		= 32;
10573
    bytedelay		= 0;
10574
    pollindex		= 3;
10575
    pollvalue		= 0x53;
10576
    predelay		= 1;
10577
    postdelay		= 1;
10578
    pollmethod		= 1;
10579
 
10580
    pp_controlstack     =
10581
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
10582
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
10583
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
10584
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
10585
    hventerstabdelay    = 100;
10586
    progmodedelay       = 0;
10587
    latchcycles         = 5;
10588
    togglevtg           = 1;
10589
    poweroffdelay       = 15;
10590
    resetdelayms        = 1;
10591
    resetdelayus        = 0;
10592
    hvleavestabdelay    = 15;
10593
    chiperasepulsewidth = 0;
10594
    chiperasepolltimeout = 10;
10595
    programfusepulsewidth = 0;
10596
    programfusepolltimeout = 5;
10597
    programlockpulsewidth = 0;
10598
    programlockpolltimeout = 5;
10599
 
10600
    idr                 = 0x31;
10601
    spmcr               = 0x57;
10602
    rampz               = 0x3b;
10603
    allowfullpagebitstream = no;
10604
 
10605
    memory "eeprom"
10606
        paged           = no; /* leave this "no" */
10607
        page_size       = 8;  /* for parallel programming */
10608
        size            = 4096;
10609
        min_write_delay = 9000;
10610
        max_write_delay = 9000;
10611
        readback_p1     = 0x00;
10612
        readback_p2     = 0x00;
10613
        read            = "  1   0   1   0      0   0   0   0",
10614
                          "  x   x   x   x    a11 a10  a9  a8",
10615
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10616
                          "  o   o   o   o      o   o   o   o";
10617
 
10618
        write           = "  1   1   0   0      0   0   0   0",
10619
                          "  x   x   x   x    a11 a10  a9  a8",
10620
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10621
                          "  i   i   i   i      i   i   i   i";
10622
 
10623
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
10624
			  "  0   0   0   0      0   0   0   0",
10625
			  "  0   0   0   0      0  a2  a1  a0",
10626
			  "  i   i   i   i      i   i   i   i";
10627
 
10628
	writepage	= "  1   1   0   0      0   0   1   0",
10629
			  "  0   0   x   x    a11 a10  a9  a8",
10630
			  " a7  a6  a5  a4     a3   0   0   0",
10631
			  "  x   x   x   x      x   x   x   x";
10632
 
10633
	mode		= 0x41;
10634
	delay		= 10;
10635
	blocksize	= 8;
10636
	readsize	= 256;
10637
      ;
10638
 
10639
    memory "flash"
10640
        paged           = yes;
10641
        size            = 262144;
10642
        page_size       = 256;
10643
        num_pages       = 1024;
10644
        min_write_delay = 4500;
10645
        max_write_delay = 4500;
10646
        readback_p1     = 0x00;
10647
        readback_p2     = 0x00;
10648
        read_lo         = "  0   0   1   0      0   0   0   0",
10649
                          "a15 a14 a13 a12    a11 a10  a9  a8",
10650
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10651
                          "  o   o   o   o      o   o   o   o";
10652
 
10653
        read_hi         = "  0   0   1   0      1   0   0   0",
10654
                          "a15 a14 a13 a12    a11 a10  a9  a8",
10655
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10656
                          "  o   o   o   o      o   o   o   o";
10657
 
10658
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
10659
                          "  x   x   x   x      x   x   x   x",
10660
                          "  x  a6  a5  a4     a3  a2  a1  a0",
10661
                          "  i   i   i   i      i   i   i   i";
10662
 
10663
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
10664
                          "  x   x   x   x      x   x   x   x",
10665
                          "  x  a6  a5  a4     a3  a2  a1  a0",
10666
                          "  i   i   i   i      i   i   i   i";
10667
 
10668
        writepage       = "  0   1   0   0      1   1   0   0",
10669
                          "a15 a14 a13 a12    a11 a10  a9  a8",
10670
                          " a7   x   x   x      x   x   x   x",
10671
                          "  x   x   x   x      x   x   x   x";
10672
 
10673
        load_ext_addr   = "  0   1   0   0      1   1   0   1",
10674
                          "  0   0   0   0      0   0   0   0",
10675
                          "  0   0   0   0      0   0   0 a16",
10676
                          "  0   0   0   0      0   0   0   0";
10677
 
10678
	mode		= 0x41;
10679
	delay		= 10;
10680
	blocksize	= 256;
10681
	readsize	= 256;
10682
      ;
10683
 
10684
    memory "lfuse"
10685
        size            = 1;
10686
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
10687
                          "x x x x  x x x x  i i i i  i i i i";
10688
 
10689
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
10690
                          "x x x x  x x x x  o o o o  o o o o";
10691
        min_write_delay = 9000;
10692
        max_write_delay = 9000;
10693
      ;
10694
 
10695
    memory "hfuse"
10696
        size            = 1;
10697
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
10698
                          "x x x x  x x x x  i i i i  i i i i";
10699
 
10700
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
10701
                          "x x x x  x x x x  o o o o  o o o o";
10702
        min_write_delay = 9000;
10703
        max_write_delay = 9000;
10704
      ;
10705
 
10706
    memory "efuse"
10707
        size            = 1;
10708
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
10709
                          "x x x x  x x x x  x x x x  x i i i";
10710
 
10711
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
10712
                          "x x x x  x x x x  o o o o  o o o o";
10713
        min_write_delay = 9000;
10714
        max_write_delay = 9000;
10715
      ;
10716
 
10717
    memory "lock"
10718
        size            = 1;
10719
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
10720
                          "x x x x  x x x x   x x o o  o o o o";
10721
 
10722
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
10723
                          "x x x x  x x x x   1 1 i i  i i i i";
10724
        min_write_delay = 9000;
10725
        max_write_delay = 9000;
10726
      ;
10727
 
10728
    memory "calibration"
10729
        size            = 1;
10730
        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
10731
                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
10732
      ;
10733
 
10734
    memory "signature"
10735
        size            = 3;
10736
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
10737
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
10738
      ;
10739
  ;
10740
 
10741
#------------------------------------------------------------
10742
# ATmega2561
10743
#------------------------------------------------------------
10744
 
10745
part
10746
    id               = "m2561";
10747
    desc             = "ATMEGA2561";
10748
    signature        = 0x1e 0x98 0x02;
10749
    has_jtag         = yes;
10750
#    stk500_devcode   = 0xB2;
10751
#    avr910_devcode   = 0x43;
10752
    chip_erase_delay = 9000;
10753
    pagel            = 0xD7;
10754
    bs2              = 0xA0;
10755
    reset            = dedicated;
10756
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
10757
                       "x x x x  x x x x    x x x x  x x x x";
10758
 
10759
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
10760
                       "x x x x  x x x x    x x x x  x x x x";
10761
 
10762
    timeout		= 200;
10763
    stabdelay		= 100;
10764
    cmdexedelay		= 25;
10765
    synchloops		= 32;
10766
    bytedelay		= 0;
10767
    pollindex		= 3;
10768
    pollvalue		= 0x53;
10769
    predelay		= 1;
10770
    postdelay		= 1;
10771
    pollmethod		= 1;
10772
 
10773
    pp_controlstack     =
10774
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
10775
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
10776
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
10777
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
10778
    hventerstabdelay    = 100;
10779
    progmodedelay       = 0;
10780
    latchcycles         = 5;
10781
    togglevtg           = 1;
10782
    poweroffdelay       = 15;
10783
    resetdelayms        = 1;
10784
    resetdelayus        = 0;
10785
    hvleavestabdelay    = 15;
10786
    chiperasepulsewidth = 0;
10787
    chiperasepolltimeout = 10;
10788
    programfusepulsewidth = 0;
10789
    programfusepolltimeout = 5;
10790
    programlockpulsewidth = 0;
10791
    programlockpolltimeout = 5;
10792
 
10793
    idr                 = 0x31;
10794
    spmcr               = 0x57;
10795
    rampz               = 0x3b;
10796
    allowfullpagebitstream = no;
10797
 
10798
    memory "eeprom"
10799
        paged           = no; /* leave this "no" */
10800
        page_size       = 8;  /* for parallel programming */
10801
        size            = 4096;
10802
        min_write_delay = 9000;
10803
        max_write_delay = 9000;
10804
        readback_p1     = 0x00;
10805
        readback_p2     = 0x00;
10806
        read            = "  1   0   1   0      0   0   0   0",
10807
                          "  x   x   x   x    a11 a10  a9  a8",
10808
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10809
                          "  o   o   o   o      o   o   o   o";
10810
 
10811
        write           = "  1   1   0   0      0   0   0   0",
10812
                          "  x   x   x   x    a11 a10  a9  a8",
10813
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10814
                          "  i   i   i   i      i   i   i   i";
10815
 
10816
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
10817
			  "  0   0   0   0      0   0   0   0",
10818
			  "  0   0   0   0      0  a2  a1  a0",
10819
			  "  i   i   i   i      i   i   i   i";
10820
 
10821
	writepage	= "  1   1   0   0      0   0   1   0",
10822
			  "  0   0   x   x    a11 a10  a9  a8",
10823
			  " a7  a6  a5  a4     a3   0   0   0",
10824
			  "  x   x   x   x      x   x   x   x";
10825
 
10826
	mode		= 0x41;
10827
	delay		= 10;
10828
	blocksize	= 8;
10829
	readsize	= 256;
10830
      ;
10831
 
10832
    memory "flash"
10833
        paged           = yes;
10834
        size            = 262144;
10835
        page_size       = 256;
10836
        num_pages       = 1024;
10837
        min_write_delay = 4500;
10838
        max_write_delay = 4500;
10839
        readback_p1     = 0x00;
10840
        readback_p2     = 0x00;
10841
        read_lo         = "  0   0   1   0      0   0   0   0",
10842
                          "a15 a14 a13 a12    a11 a10  a9  a8",
10843
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10844
                          "  o   o   o   o      o   o   o   o";
10845
 
10846
        read_hi         = "  0   0   1   0      1   0   0   0",
10847
                          "a15 a14 a13 a12    a11 a10  a9  a8",
10848
                          " a7  a6  a5  a4     a3  a2  a1  a0",
10849
                          "  o   o   o   o      o   o   o   o";
10850
 
10851
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
10852
                          "  x   x   x   x      x   x   x   x",
10853
                          "  x  a6  a5  a4     a3  a2  a1  a0",
10854
                          "  i   i   i   i      i   i   i   i";
10855
 
10856
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
10857
                          "  x   x   x   x      x   x   x   x",
10858
                          "  x  a6  a5  a4     a3  a2  a1  a0",
10859
                          "  i   i   i   i      i   i   i   i";
10860
 
10861
        writepage       = "  0   1   0   0      1   1   0   0",
10862
                          "a15 a14 a13 a12    a11 a10  a9  a8",
10863
                          " a7   x   x   x      x   x   x   x",
10864
                          "  x   x   x   x      x   x   x   x";
10865
 
10866
        load_ext_addr   = "  0   1   0   0      1   1   0   1",
10867
                          "  0   0   0   0      0   0   0   0",
10868
                          "  0   0   0   0      0   0   0 a16",
10869
                          "  0   0   0   0      0   0   0   0";
10870
 
10871
	mode		= 0x41;
10872
	delay		= 10;
10873
	blocksize	= 256;
10874
	readsize	= 256;
10875
      ;
10876
 
10877
    memory "lfuse"
10878
        size            = 1;
10879
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
10880
                          "x x x x  x x x x  i i i i  i i i i";
10881
 
10882
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
10883
                          "x x x x  x x x x  o o o o  o o o o";
10884
        min_write_delay = 9000;
10885
        max_write_delay = 9000;
10886
      ;
10887
 
10888
    memory "hfuse"
10889
        size            = 1;
10890
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
10891
                          "x x x x  x x x x  i i i i  i i i i";
10892
 
10893
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
10894
                          "x x x x  x x x x  o o o o  o o o o";
10895
        min_write_delay = 9000;
10896
        max_write_delay = 9000;
10897
      ;
10898
 
10899
    memory "efuse"
10900
        size            = 1;
10901
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
10902
                          "x x x x  x x x x  x x x x  x i i i";
10903
 
10904
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
10905
                          "x x x x  x x x x  o o o o  o o o o";
10906
        min_write_delay = 9000;
10907
        max_write_delay = 9000;
10908
      ;
10909
 
10910
    memory "lock"
10911
        size            = 1;
10912
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
10913
                          "x x x x  x x x x   x x o o  o o o o";
10914
 
10915
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
10916
                          "x x x x  x x x x   1 1 i i  i i i i";
10917
        min_write_delay = 9000;
10918
        max_write_delay = 9000;
10919
      ;
10920
 
10921
    memory "calibration"
10922
        size            = 1;
10923
        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
10924
                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
10925
      ;
10926
 
10927
    memory "signature"
10928
        size            = 3;
10929
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
10930
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
10931
      ;
10932
  ;
10933
 
10934
#------------------------------------------------------------
10935
# ATmega128RFA1
10936
#------------------------------------------------------------
10937
# Identical to ATmega2561 but half the ROM
10938
 
10939
part
10940
    id               = "m128rfa1";
10941
    desc             = "ATMEGA128RFA1";
10942
    signature        = 0x1e 0xa7 0x01;
10943
    has_jtag         = yes;
10944
#    stk500_devcode   = 0xB2;
10945
#    avr910_devcode   = 0x43;
10946
    chip_erase_delay = 9000;
10947
    pagel            = 0xD7;
10948
    bs2              = 0xE2;
10949
    reset            = dedicated;
10950
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
10951
                       "x x x x  x x x x    x x x x  x x x x";
10952
 
10953
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
10954
                       "x x x x  x x x x    x x x x  x x x x";
10955
 
10956
    timeout		= 200;
10957
    stabdelay		= 100;
10958
    cmdexedelay		= 25;
10959
    synchloops		= 32;
10960
    bytedelay		= 0;
10961
    pollindex		= 3;
10962
    pollvalue		= 0x53;
10963
    predelay		= 1;
10964
    postdelay		= 1;
10965
    pollmethod		= 1;
10966
 
10967
    pp_controlstack     =
10968
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
10969
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
10970
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
10971
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
10972
    hventerstabdelay    = 100;
10973
    progmodedelay       = 0;
10974
    latchcycles         = 5;
10975
    togglevtg           = 1;
10976
    poweroffdelay       = 15;
10977
    resetdelayms        = 1;
10978
    resetdelayus        = 0;
10979
    hvleavestabdelay    = 15;
10980
    chiperasepulsewidth = 0;
10981
    chiperasepolltimeout = 10;
10982
    programfusepulsewidth = 0;
10983
    programfusepolltimeout = 5;
10984
    programlockpulsewidth = 0;
10985
    programlockpolltimeout = 5;
10986
 
10987
    idr                 = 0x31;
10988
    spmcr               = 0x57;
10989
    rampz               = 0x3b;
10990
    allowfullpagebitstream = no;
10991
 
10992
    memory "eeprom"
10993
        paged           = no; /* leave this "no" */
10994
        page_size       = 8;  /* for parallel programming */
10995
        size            = 4096;
10996
        min_write_delay = 9000;
10997
        max_write_delay = 9000;
10998
        readback_p1     = 0x00;
10999
        readback_p2     = 0x00;
11000
        read            = "  1   0   1   0      0   0   0   0",
11001
                          "  x   x   x   x    a11 a10  a9  a8",
11002
                          " a7  a6  a5  a4     a3  a2  a1  a0",
11003
                          "  o   o   o   o      o   o   o   o";
11004
 
11005
        write           = "  1   1   0   0      0   0   0   0",
11006
                          "  x   x   x   x    a11 a10  a9  a8",
11007
                          " a7  a6  a5  a4     a3  a2  a1  a0",
11008
                          "  i   i   i   i      i   i   i   i";
11009
 
11010
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
11011
			  "  0   0   0   0      0   0   0   0",
11012
			  "  0   0   0   0      0  a2  a1  a0",
11013
			  "  i   i   i   i      i   i   i   i";
11014
 
11015
	writepage	= "  1   1   0   0      0   0   1   0",
11016
			  "  0   0   x   x    a11 a10  a9  a8",
11017
			  " a7  a6  a5  a4     a3   0   0   0",
11018
			  "  x   x   x   x      x   x   x   x";
11019
 
11020
	mode		= 0x41;
11021
	delay		= 10;
11022
	blocksize	= 8;
11023
	readsize	= 256;
11024
      ;
11025
 
11026
    memory "flash"
11027
        paged           = yes;
11028
        size            = 131072;
11029
        page_size       = 256;
11030
        num_pages       = 512;
11031
        min_write_delay = 4500;
11032
        max_write_delay = 4500;
11033
        readback_p1     = 0x00;
11034
        readback_p2     = 0x00;
11035
        read_lo         = "  0   0   1   0      0   0   0   0",
11036
                          "a15 a14 a13 a12    a11 a10  a9  a8",
11037
                          " a7  a6  a5  a4     a3  a2  a1  a0",
11038
                          "  o   o   o   o      o   o   o   o";
11039
 
11040
        read_hi         = "  0   0   1   0      1   0   0   0",
11041
                          "a15 a14 a13 a12    a11 a10  a9  a8",
11042
                          " a7  a6  a5  a4     a3  a2  a1  a0",
11043
                          "  o   o   o   o      o   o   o   o";
11044
 
11045
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
11046
                          "  x   x   x   x      x   x   x   x",
11047
                          "  x  a6  a5  a4     a3  a2  a1  a0",
11048
                          "  i   i   i   i      i   i   i   i";
11049
 
11050
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
11051
                          "  x   x   x   x      x   x   x   x",
11052
                          "  x  a6  a5  a4     a3  a2  a1  a0",
11053
                          "  i   i   i   i      i   i   i   i";
11054
 
11055
        writepage       = "  0   1   0   0      1   1   0   0",
11056
                          "a15 a14 a13 a12    a11 a10  a9  a8",
11057
                          " a7   x   x   x      x   x   x   x",
11058
                          "  x   x   x   x      x   x   x   x";
11059
 
11060
	mode		= 0x41;
11061
	delay		= 10;
11062
	blocksize	= 256;
11063
	readsize	= 256;
11064
      ;
11065
 
11066
    memory "lfuse"
11067
        size            = 1;
11068
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
11069
                          "x x x x  x x x x  i i i i  i i i i";
11070
 
11071
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
11072
                          "x x x x  x x x x  o o o o  o o o o";
11073
        min_write_delay = 9000;
11074
        max_write_delay = 9000;
11075
      ;
11076
 
11077
    memory "hfuse"
11078
        size            = 1;
11079
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
11080
                          "x x x x  x x x x  i i i i  i i i i";
11081
 
11082
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
11083
                          "x x x x  x x x x  o o o o  o o o o";
11084
        min_write_delay = 9000;
11085
        max_write_delay = 9000;
11086
      ;
11087
 
11088
    memory "efuse"
11089
        size            = 1;
11090
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
11091
                          "x x x x  x x x x  x x x x  x i i i";
11092
 
11093
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
11094
                          "x x x x  x x x x  o o o o  o o o o";
11095
        min_write_delay = 9000;
11096
        max_write_delay = 9000;
11097
      ;
11098
 
11099
    memory "lock"
11100
        size            = 1;
11101
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
11102
                          "x x x x  x x x x   x x o o  o o o o";
11103
 
11104
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
11105
                          "x x x x  x x x x   1 1 i i  i i i i";
11106
        min_write_delay = 9000;
11107
        max_write_delay = 9000;
11108
      ;
11109
 
11110
    memory "calibration"
11111
        size            = 1;
11112
        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
11113
                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
11114
      ;
11115
 
11116
    memory "signature"
11117
        size            = 3;
11118
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
11119
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
11120
      ;
11121
  ;
11122
 
11123
#------------------------------------------------------------
11124
# ATtiny24
11125
#------------------------------------------------------------
11126
 
11127
part
11128
     id            = "t24";
11129
     desc          = "ATtiny24";
11130
     has_debugwire = yes;
11131
     flash_instr   = 0xB4, 0x07, 0x17;
11132
     eeprom_instr  = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
11133
	             0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC,
11134
	             0x99, 0xE1, 0xBB, 0xAC;
11135
## no STK500 devcode in XML file, use the ATtiny45 one
11136
     stk500_devcode   = 0x14;
11137
##  avr910_devcode   = ?;
11138
##  Try the AT90S2313 devcode:
11139
     avr910_devcode   = 0x20;
11140
     signature        = 0x1e 0x91 0x0b;
11141
     reset            = io;
11142
     chip_erase_delay = 4500;
11143
 
11144
     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
11145
                        "x x x x  x x x x    x x x x  x x x x";
11146
 
11147
     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
11148
                        "x x x x  x x x x    x x x x  x x x x";
11149
 
11150
    timeout		= 200;
11151
    stabdelay		= 100;
11152
    cmdexedelay		= 25;
11153
    synchloops		= 32;
11154
    bytedelay		= 0;
11155
    pollindex		= 3;
11156
    pollvalue		= 0x53;
11157
    predelay		= 1;
11158
    postdelay		= 1;
11159
    pollmethod		= 1;
11160
 
11161
    hvsp_controlstack   =
11162
        0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
11163
        0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
11164
        0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
11165
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0F;
11166
    hventerstabdelay    = 100;
11167
    hvspcmdexedelay     = 0;
11168
    synchcycles         = 6;
11169
    latchcycles         = 1;
11170
    togglevtg           = 1;
11171
    poweroffdelay       = 25;
11172
    resetdelayms        = 0;
11173
    resetdelayus        = 70;
11174
    hvleavestabdelay    = 100;
11175
    resetdelay          = 25;
11176
    chiperasepolltimeout = 40;
11177
    chiperasetime       = 0;
11178
    programfusepolltimeout = 25;
11179
    programlockpolltimeout = 25;
11180
 
11181
     memory "eeprom"
11182
         size            = 128;
11183
        paged           = no;
11184
        page_size       = 4;
11185
         min_write_delay = 4000;
11186
         max_write_delay = 4500;
11187
         readback_p1     = 0xff;
11188
         readback_p2     = 0xff;
11189
         read            = "1  0  1  0   0  0  0  0   0 0 0 x  x x x x",
11190
                           "x a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
11191
 
11192
         write           = "1  1  0  0   0  0  0  0   0 0 0 x  x x x x",
11193
                           "x a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
11194
 
11195
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
11196
			  "  0   0   0   0      0   0   0   0",
11197
			  "  0   0   0   0      0   0  a1  a0",
11198
			  "  i   i   i   i      i   i   i   i";
11199
 
11200
	writepage	= "  1   1   0   0      0   0   1   0",
11201
			  "  0   0   x   x      x   x   x   x",
11202
			  "  x  a6  a5  a4     a3  a2   0   0",
11203
			  "  x   x   x   x      x   x   x   x";
11204
 
11205
	mode		= 0x41;
11206
	delay		= 6;
11207
	blocksize	= 4;
11208
	readsize	= 256;
11209
       ;
11210
     memory "flash"
11211
         paged           = yes;
11212
         size            = 2048;
11213
         page_size       = 32;
11214
         num_pages       = 64;
11215
         min_write_delay = 4500;
11216
         max_write_delay = 4500;
11217
         readback_p1     = 0xff;
11218
         readback_p2     = 0xff;
11219
         read_lo         = "  0   0   1   0    0   0   0   0",
11220
                           "  0   0   0   0    0   0  a9  a8",
11221
                           " a7  a6  a5  a4   a3  a2  a1  a0",
11222
                           "  o   o   o   o    o   o   o   o";
11223
 
11224
         read_hi         = "  0   0   1   0    1   0   0   0",
11225
                           "  0   0   0   0    0   0  a9  a8",
11226
                           " a7  a6  a5  a4   a3  a2  a1  a0",
11227
                           "  o   o   o   o    o   o   o   o";
11228
 
11229
         loadpage_lo     = "  0   1   0   0    0   0   0   0",
11230
                           "  0   0   0   x    x   x   x   x",
11231
                           "  x   x   x   x   a3  a2  a1  a0",
11232
                           "  i   i   i   i    i   i   i   i";
11233
 
11234
         loadpage_hi     = "  0   1   0   0    1   0   0   0",
11235
                           "  0   0   0   x    x   x   x   x",
11236
                           "  x   x   x   x   a3  a2  a1  a0",
11237
                           "  i   i   i   i    i   i   i   i";
11238
 
11239
         writepage       = "  0  1  0  0   1  1  0  0",
11240
                           "  0  0  0  0   0  0 a9 a8",
11241
                           " a7 a6 a5 a4   x  x  x  x",
11242
                           "  x  x  x  x   x  x  x  x";
11243
 
11244
	mode		= 0x41;
11245
	delay		= 6;
11246
	blocksize	= 32;
11247
	readsize	= 256;
11248
       ;
11249
#   ATtiny24 has Signature Bytes: 0x1E 0x91 0x0B.
11250
     memory "signature"
11251
         size            = 3;
11252
         read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
11253
                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
11254
       ;
11255
     memory "lock"
11256
         size            = 1;
11257
         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
11258
                           "x x x x  x x x x  x x x x  x x i i";
11259
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
11260
                           "0 0 0 0  0 0 0 0  o o o o  o o o o";
11261
        min_write_delay = 9000;
11262
        max_write_delay = 9000;
11263
       ;
11264
 
11265
     memory "lfuse"
11266
         size            = 1;
11267
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
11268
                           "x x x x  x x x x  i i i i  i i i i";
11269
 
11270
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
11271
                           "x x x x  x x x x  o o o o  o o o o";
11272
        min_write_delay = 9000;
11273
        max_write_delay = 9000;
11274
       ;
11275
 
11276
     memory "hfuse"
11277
         size            = 1;
11278
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
11279
                           "x x x x  x x x x  i i i i  i i i i";
11280
 
11281
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
11282
                           "x x x x  x x x x  o o o o  o o o o";
11283
        min_write_delay = 9000;
11284
        max_write_delay = 9000;
11285
       ;
11286
 
11287
     memory "efuse"
11288
         size            = 1;
11289
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
11290
                           "x x x x  x x x x  x x x x  x x x i";
11291
 
11292
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
11293
                           "x x x x  x x x x  o o o o  o o o o";
11294
        min_write_delay = 9000;
11295
        max_write_delay = 9000;
11296
     ;
11297
 
11298
     memory "calibration"
11299
         size            = 1;
11300
         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
11301
                           "0  0  0  0   0  0  0  a0   o o o o  o o o o";
11302
     ;
11303
  ;
11304
 
11305
#------------------------------------------------------------
11306
# ATtiny44
11307
#------------------------------------------------------------
11308
 
11309
part
11310
     id            = "t44";
11311
     desc          = "ATtiny44";
11312
     has_debugwire = yes;
11313
     flash_instr   = 0xB4, 0x07, 0x17;
11314
     eeprom_instr  = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
11315
                     0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC,
11316
                     0x99, 0xE1, 0xBB, 0xAC;
11317
## no STK500 devcode in XML file, use the ATtiny45 one
11318
     stk500_devcode   = 0x14;
11319
##  avr910_devcode   = ?;
11320
##  Try the AT90S2313 devcode:
11321
     avr910_devcode   = 0x20;
11322
     signature        = 0x1e 0x92 0x07;
11323
     reset            = io;
11324
     chip_erase_delay = 4500;
11325
 
11326
     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
11327
                        "x x x x  x x x x    x x x x  x x x x";
11328
 
11329
     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
11330
                        "x x x x  x x x x    x x x x  x x x x";
11331
 
11332
    timeout		= 200;
11333
    stabdelay		= 100;
11334
    cmdexedelay		= 25;
11335
    synchloops		= 32;
11336
    bytedelay		= 0;
11337
    pollindex		= 3;
11338
    pollvalue		= 0x53;
11339
    predelay		= 1;
11340
    postdelay		= 1;
11341
    pollmethod		= 1;
11342
 
11343
    hvsp_controlstack   =
11344
        0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
11345
        0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
11346
        0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
11347
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0F;
11348
    hventerstabdelay    = 100;
11349
    hvspcmdexedelay     = 0;
11350
    synchcycles         = 6;
11351
    latchcycles         = 1;
11352
    togglevtg           = 1;
11353
    poweroffdelay       = 25;
11354
    resetdelayms        = 0;
11355
    resetdelayus        = 70;
11356
    hvleavestabdelay    = 100;
11357
    resetdelay          = 25;
11358
    chiperasepolltimeout = 40;
11359
    chiperasetime       = 0;
11360
    programfusepolltimeout = 25;
11361
    programlockpolltimeout = 25;
11362
 
11363
     memory "eeprom"
11364
         size            = 256;
11365
        paged           = no;
11366
        page_size       = 4;
11367
         min_write_delay = 4000;
11368
         max_write_delay = 4500;
11369
         readback_p1     = 0xff;
11370
         readback_p2     = 0xff;
11371
         read            = "1  0  1  0   0  0  0  0    0 0 0 x  x x x x",
11372
                           "a7 a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
11373
 
11374
         write           = "1  1  0  0   0  0  0  0    0 0 0 x  x x x x",
11375
                           "a7 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
11376
 
11377
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
11378
			  "  0   0   0   0      0   0   0   0",
11379
			  "  0   0   0   0      0   0  a1  a0",
11380
			  "  i   i   i   i      i   i   i   i";
11381
 
11382
	writepage	= "  1   1   0   0      0   0   1   0",
11383
			  "  0   0   x   x      x   x   x   x",
11384
			  "  x  a6  a5  a4     a3  a2   0   0",
11385
			  "  x   x   x   x      x   x   x   x";
11386
 
11387
	mode		= 0x41;
11388
	delay		= 6;
11389
	blocksize	= 4;
11390
	readsize	= 256;
11391
       ;
11392
     memory "flash"
11393
         paged           = yes;
11394
         size            = 4096;
11395
         page_size       = 64;
11396
         num_pages       = 64;
11397
         min_write_delay = 4500;
11398
         max_write_delay = 4500;
11399
         readback_p1     = 0xff;
11400
         readback_p2     = 0xff;
11401
         read_lo         = "  0   0   1   0    0   0   0   0",
11402
                           "  0   0   0   0    0  a10 a9  a8",
11403
                           " a7  a6  a5  a4   a3  a2  a1  a0",
11404
                           "  o   o   o   o    o   o   o   o";
11405
 
11406
         read_hi         = "  0   0   1   0    1   0   0   0",
11407
                           "  0   0   0   0    0  a10 a9  a8",
11408
                           " a7  a6  a5  a4   a3  a2  a1  a0",
11409
                           "  o   o   o   o    o   o   o   o";
11410
 
11411
         loadpage_lo     = "  0   1   0   0    0   0   0   0",
11412
                           "  0   0   0   x    x   x   x   x",
11413
                           "  x   x   x  a4   a3  a2  a1  a0",
11414
                           "  i   i   i   i    i   i   i   i";
11415
 
11416
         loadpage_hi     = "  0   1   0   0    1   0   0   0",
11417
                           "  0   0   0   x    x   x   x   x",
11418
                           "  x   x   x  a4   a3  a2  a1  a0",
11419
                           "  i   i   i   i    i   i   i   i";
11420
 
11421
         writepage       = "  0  1  0  0   1  1  0  0",
11422
                           "  0  0  0  0   0 a10 a9 a8",
11423
                           " a7 a6 a5  x   x  x  x  x",
11424
                           "  x  x  x  x   x  x  x  x";
11425
 
11426
	mode		= 0x41;
11427
	delay		= 6;
11428
	blocksize	= 32;
11429
	readsize	= 256;
11430
       ;
11431
#   ATtiny44 has Signature Bytes: 0x1E 0x92 0x07.
11432
     memory "signature"
11433
         size            = 3;
11434
         read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
11435
                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
11436
       ;
11437
     memory "lock"
11438
         size            = 1;
11439
         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
11440
                           "x x x x  x x x x  x x x x  x x i i";
11441
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
11442
                           "0 0 0 0  0 0 0 0  o o o o  o o o o";
11443
        min_write_delay = 9000;
11444
        max_write_delay = 9000;
11445
       ;
11446
 
11447
     memory "lfuse"
11448
         size            = 1;
11449
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
11450
                           "x x x x  x x x x  i i i i  i i i i";
11451
 
11452
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
11453
                           "x x x x  x x x x  o o o o  o o o o";
11454
        min_write_delay = 9000;
11455
        max_write_delay = 9000;
11456
       ;
11457
 
11458
     memory "hfuse"
11459
         size            = 1;
11460
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
11461
                           "x x x x  x x x x  i i i i  i i i i";
11462
 
11463
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
11464
                           "x x x x  x x x x  o o o o  o o o o";
11465
        min_write_delay = 9000;
11466
        max_write_delay = 9000;
11467
       ;
11468
 
11469
     memory "efuse"
11470
         size            = 1;
11471
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
11472
                           "x x x x  x x x x  x x x x  x x x i";
11473
 
11474
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
11475
                           "x x x x  x x x x  o o o o  o o o o";
11476
        min_write_delay = 9000;
11477
        max_write_delay = 9000;
11478
     ;
11479
 
11480
     memory "calibration"
11481
         size            = 1;
11482
         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
11483
                           "0  0  0  0   0  0  0  a0   o o o o  o o o o";
11484
     ;
11485
  ;
11486
 
11487
#------------------------------------------------------------
11488
# ATtiny84
11489
#------------------------------------------------------------
11490
 
11491
part
11492
     id            = "t84";
11493
     desc          = "ATtiny84";
11494
     has_debugwire = yes;
11495
     flash_instr   = 0xB4, 0x07, 0x17;
11496
     eeprom_instr  = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
11497
	             0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC,
11498
	             0x99, 0xE1, 0xBB, 0xAC;
11499
## no STK500 devcode in XML file, use the ATtiny45 one
11500
     stk500_devcode   = 0x14;
11501
##  avr910_devcode   = ?;
11502
##  Try the AT90S2313 devcode:
11503
     avr910_devcode   = 0x20;
11504
     signature        = 0x1e 0x93 0x0c;
11505
     reset            = io;
11506
     chip_erase_delay = 4500;
11507
 
11508
     pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
11509
                        "x x x x  x x x x    x x x x  x x x x";
11510
 
11511
     chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
11512
                        "x x x x  x x x x    x x x x  x x x x";
11513
 
11514
    timeout		= 200;
11515
    stabdelay		= 100;
11516
    cmdexedelay		= 25;
11517
    synchloops		= 32;
11518
    bytedelay		= 0;
11519
    pollindex		= 3;
11520
    pollvalue		= 0x53;
11521
    predelay		= 1;
11522
    postdelay		= 1;
11523
    pollmethod		= 1;
11524
 
11525
    hvsp_controlstack   =
11526
        0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
11527
        0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
11528
        0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
11529
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0F;
11530
    hventerstabdelay    = 100;
11531
    hvspcmdexedelay     = 0;
11532
    synchcycles         = 6;
11533
    latchcycles         = 1;
11534
    togglevtg           = 1;
11535
    poweroffdelay       = 25;
11536
    resetdelayms        = 0;
11537
    resetdelayus        = 70;
11538
    hvleavestabdelay    = 100;
11539
    resetdelay          = 25;
11540
    chiperasepolltimeout = 40;
11541
    chiperasetime       = 0;
11542
    programfusepolltimeout = 25;
11543
    programlockpolltimeout = 25;
11544
 
11545
     memory "eeprom"
11546
         size            = 512;
11547
        paged           = no;
11548
        page_size       = 4;
11549
         min_write_delay = 4000;
11550
         max_write_delay = 4500;
11551
         readback_p1     = 0xff;
11552
         readback_p2     = 0xff;
11553
         read            = "1  0  1  0   0  0  0  0    0 0 0 x  x x x a8",
11554
                           "a7 a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
11555
 
11556
         write           = "1  1  0  0   0  0  0  0    0 0 0 x  x x x a8",
11557
                           "a8 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
11558
 
11559
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
11560
			  "  0   0   0   0      0   0   0   0",
11561
			  "  0   0   0   0      0   0  a1  a0",
11562
			  "  i   i   i   i      i   i   i   i";
11563
 
11564
	writepage	= "  1   1   0   0      0   0   1   0",
11565
			  "  0   0   x   x      x   x   x   x",
11566
			  "  x  a6  a5  a4     a3  a2   0   0",
11567
			  "  x   x   x   x      x   x   x   x";
11568
 
11569
	mode		= 0x41;
11570
	delay		= 6;
11571
	blocksize	= 4;
11572
	readsize	= 256;
11573
       ;
11574
     memory "flash"
11575
         paged           = yes;
11576
         size            = 8192;
11577
         page_size       = 64;
11578
         num_pages       = 128;
11579
         min_write_delay = 4500;
11580
         max_write_delay = 4500;
11581
         readback_p1     = 0xff;
11582
         readback_p2     = 0xff;
11583
         read_lo         = "  0   0   1   0    0   0   0   0",
11584
                           "  0   0   0   0  a11 a10  a9  a8",
11585
                           " a7  a6  a5  a4   a3  a2  a1  a0",
11586
                           "  o   o   o   o    o   o   o   o";
11587
 
11588
         read_hi         = "  0   0   1   0    1   0   0   0",
11589
                           "  0   0   0   0  a11 a10  a9  a8",
11590
                           " a7  a6  a5  a4   a3  a2  a1  a0",
11591
                           "  o   o   o   o    o   o   o   o";
11592
 
11593
         loadpage_lo     = "  0   1   0   0    0   0   0   0",
11594
                           "  0   0   0   x    x   x   x   x",
11595
                           "  x   x   x  a4   a3  a2  a1  a0",
11596
                           "  i   i   i   i    i   i   i   i";
11597
 
11598
         loadpage_hi     = "  0   1   0   0    1   0   0   0",
11599
                           "  0   0   0   x    x   x   x   x",
11600
                           "  x   x   x  a4   a3  a2  a1  a0",
11601
                           "  i   i   i   i    i   i   i   i";
11602
 
11603
         writepage       = "  0  1  0  0   1   1   0  0",
11604
                           "  0  0  0  0  a11 a10 a9 a8",
11605
                           " a7 a6 a5  x   x  x  x  x",
11606
                           "  x  x  x  x   x  x  x  x";
11607
 
11608
	mode		= 0x41;
11609
	delay		= 6;
11610
	blocksize	= 32;
11611
	readsize	= 256;
11612
       ;
11613
#   ATtiny84 has Signature Bytes: 0x1E 0x93 0x0C.
11614
     memory "signature"
11615
         size            = 3;
11616
         read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
11617
                           "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
11618
       ;
11619
 
11620
     memory "lock"
11621
         size            = 1;
11622
         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
11623
                           "x x x x  x x x x  x x x x  x x i i";
11624
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
11625
                           "0 0 0 0  0 0 0 0  o o o o  o o o o";
11626
        min_write_delay = 9000;
11627
        max_write_delay = 9000;
11628
       ;
11629
 
11630
     memory "lfuse"
11631
         size            = 1;
11632
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
11633
                           "x x x x  x x x x  i i i i  i i i i";
11634
 
11635
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
11636
                           "x x x x  x x x x  o o o o  o o o o";
11637
        min_write_delay = 9000;
11638
        max_write_delay = 9000;
11639
       ;
11640
 
11641
     memory "hfuse"
11642
         size            = 1;
11643
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
11644
                           "x x x x  x x x x  i i i i  i i i i";
11645
 
11646
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
11647
                           "x x x x  x x x x  o o o o  o o o o";
11648
        min_write_delay = 9000;
11649
        max_write_delay = 9000;
11650
       ;
11651
 
11652
     memory "efuse"
11653
         size            = 1;
11654
         write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
11655
                           "x x x x  x x x x  x x x x  x x x i";
11656
 
11657
         read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
11658
                           "x x x x  x x x x  o o o o  o o o o";
11659
        min_write_delay = 9000;
11660
        max_write_delay = 9000;
11661
     ;
11662
 
11663
     memory "calibration"
11664
         size            = 1;
11665
         read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
11666
                           "0  0  0  0   0  0  0  a0   o o o o  o o o o";
11667
     ;
11668
  ;
11669
 
11670
#------------------------------------------------------------
11671
# ATmega32u4
11672
#------------------------------------------------------------
11673
 
11674
part
11675
    id               = "m32u4";
11676
    desc             = "ATmega32U4";
11677
    signature        = 0x1e 0x95 0x87;
11678
    has_jtag         = yes;
11679
#    stk500_devcode   = 0xB2;
11680
#    avr910_devcode   = 0x43;
11681
    chip_erase_delay = 9000;
11682
    pagel            = 0xD7;
11683
    bs2              = 0xA0;
11684
    reset            = dedicated;
11685
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
11686
                       "x x x x  x x x x    x x x x  x x x x";
11687
 
11688
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
11689
                       "x x x x  x x x x    x x x x  x x x x";
11690
 
11691
    timeout		= 200;
11692
    stabdelay		= 100;
11693
    cmdexedelay		= 25;
11694
    synchloops		= 32;
11695
    bytedelay		= 0;
11696
    pollindex		= 3;
11697
    pollvalue		= 0x53;
11698
    predelay		= 1;
11699
    postdelay		= 1;
11700
    pollmethod		= 1;
11701
 
11702
    pp_controlstack     =
11703
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
11704
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
11705
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
11706
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
11707
    hventerstabdelay    = 100;
11708
    progmodedelay       = 0;
11709
    latchcycles         = 5;
11710
    togglevtg           = 1;
11711
    poweroffdelay       = 15;
11712
    resetdelayms        = 1;
11713
    resetdelayus        = 0;
11714
    hvleavestabdelay    = 15;
11715
    chiperasepulsewidth = 0;
11716
    chiperasepolltimeout = 10;
11717
    programfusepulsewidth = 0;
11718
    programfusepolltimeout = 5;
11719
    programlockpulsewidth = 0;
11720
    programlockpolltimeout = 5;
11721
 
11722
    idr                 = 0x31;
11723
    spmcr               = 0x57;
11724
    rampz               = 0x3b;
11725
    allowfullpagebitstream = no;
11726
 
11727
    memory "eeprom"
11728
        paged           = no; /* leave this "no" */
11729
        page_size       = 8;  /* for parallel programming */
11730
        size            = 1024;
11731
        min_write_delay = 9000;
11732
        max_write_delay = 9000;
11733
        readback_p1     = 0x00;
11734
        readback_p2     = 0x00;
11735
        read            = "  1   0   1   0      0   0   0   0",
11736
                          "  x   x   x   x      x a10  a9  a8",
11737
                          " a7  a6  a5  a4     a3  a2  a1  a0",
11738
                          "  o   o   o   o      o   o   o   o";
11739
 
11740
        write           = "  1   1   0   0      0   0   0   0",
11741
                          "  x   x   x   x      x a10  a9  a8",
11742
                          " a7  a6  a5  a4     a3  a2  a1  a0",
11743
                          "  i   i   i   i      i   i   i   i";
11744
 
11745
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
11746
			  "  0   0   0   0      0   0   0   0",
11747
			  "  0   0   0   0      0  a2  a1  a0",
11748
			  "  i   i   i   i      i   i   i   i";
11749
 
11750
	writepage	= "  1   1   0   0      0   0   1   0",
11751
			  "  0   0   x   x      x a10  a9  a8",
11752
			  " a7  a6  a5  a4     a3   0   0   0",
11753
			  "  x   x   x   x      x   x   x   x";
11754
 
11755
	mode		= 0x41;
11756
	delay		= 10;
11757
	blocksize	= 8;
11758
	readsize	= 256;
11759
      ;
11760
 
11761
    memory "flash"
11762
        paged           = yes;
11763
        size            = 32768;
11764
        page_size       = 128;
11765
        num_pages       = 256;
11766
        min_write_delay = 4500;
11767
        max_write_delay = 4500;
11768
        readback_p1     = 0x00;
11769
        readback_p2     = 0x00;
11770
        read_lo         = "  0   0   1   0      0   0   0   0",
11771
                          "  0 a14 a13 a12    a11 a10  a9  a8",
11772
                          " a7  a6  a5  a4     a3  a2  a1  a0",
11773
                          "  o   o   o   o      o   o   o   o";
11774
 
11775
        read_hi         = "  0   0   1   0      1   0   0   0",
11776
                          "  0 a14 a13 a12    a11 a10  a9  a8",
11777
                          " a7  a6  a5  a4     a3  a2  a1  a0",
11778
                          "  o   o   o   o      o   o   o   o";
11779
 
11780
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
11781
                          "  x   x   x   x      x   x   x   x",
11782
                          "  x   x  a5  a4     a3  a2  a1  a0",
11783
                          "  i   i   i   i      i   i   i   i";
11784
 
11785
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
11786
                          "  x   x   x   x      x   x   x   x",
11787
                          "  x   x  a5  a4     a3  a2  a1  a0",
11788
                          "  i   i   i   i      i   i   i   i";
11789
 
11790
        writepage       = "  0   1   0   0      1   1   0   0",
11791
                          " a15 a14 a13 a12    a11 a10  a9  a8",
11792
                          " a7  a6   x   x      x   x   x   x",
11793
                          "  x   x   x   x      x   x   x   x";
11794
 
11795
	mode		= 0x41;
11796
	delay		= 6;
11797
	blocksize	= 128;
11798
	readsize	= 256;
11799
      ;
11800
 
11801
    memory "lfuse"
11802
        size            = 1;
11803
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
11804
                          "x x x x  x x x x  i i i i  i i i i";
11805
 
11806
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
11807
                          "x x x x  x x x x  o o o o  o o o o";
11808
        min_write_delay = 9000;
11809
        max_write_delay = 9000;
11810
      ;
11811
 
11812
    memory "hfuse"
11813
        size            = 1;
11814
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
11815
                          "x x x x  x x x x  i i i i  i i i i";
11816
 
11817
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
11818
                          "x x x x  x x x x  o o o o  o o o o";
11819
        min_write_delay = 9000;
11820
        max_write_delay = 9000;
11821
      ;
11822
 
11823
    memory "efuse"
11824
        size            = 1;
11825
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
11826
                          "x x x x  x x x x  x x x x  i i i i";
11827
 
11828
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
11829
                          "x x x x  x x x x  o o o o  o o o o";
11830
        min_write_delay = 9000;
11831
        max_write_delay = 9000;
11832
      ;
11833
 
11834
    memory "lock"
11835
        size            = 1;
11836
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
11837
                          "x x x x  x x x x   x x o o  o o o o";
11838
 
11839
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
11840
                          "x x x x  x x x x   1 1 i i  i i i i";
11841
        min_write_delay = 9000;
11842
        max_write_delay = 9000;
11843
      ;
11844
 
11845
    memory "calibration"
11846
        size            = 1;
11847
        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
11848
                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
11849
      ;
11850
 
11851
    memory "signature"
11852
        size            = 3;
11853
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
11854
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
11855
      ;
11856
  ;
11857
 
11858
#------------------------------------------------------------
11859
# AT90USB646
11860
#------------------------------------------------------------
11861
 
11862
part
11863
    id               = "usb646";
11864
    desc             = "AT90USB646";
11865
    signature        = 0x1e 0x96 0x82;
11866
    has_jtag         = yes;
11867
#    stk500_devcode   = 0xB2;
11868
#    avr910_devcode   = 0x43;
11869
    chip_erase_delay = 9000;
11870
    pagel            = 0xD7;
11871
    bs2              = 0xA0;
11872
    reset            = dedicated;
11873
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
11874
                       "x x x x  x x x x    x x x x  x x x x";
11875
 
11876
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
11877
                       "x x x x  x x x x    x x x x  x x x x";
11878
 
11879
    timeout		= 200;
11880
    stabdelay		= 100;
11881
    cmdexedelay		= 25;
11882
    synchloops		= 32;
11883
    bytedelay		= 0;
11884
    pollindex		= 3;
11885
    pollvalue		= 0x53;
11886
    predelay		= 1;
11887
    postdelay		= 1;
11888
    pollmethod		= 1;
11889
 
11890
    pp_controlstack     =
11891
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
11892
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
11893
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
11894
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
11895
    hventerstabdelay    = 100;
11896
    progmodedelay       = 0;
11897
    latchcycles         = 5;
11898
    togglevtg           = 1;
11899
    poweroffdelay       = 15;
11900
    resetdelayms        = 1;
11901
    resetdelayus        = 0;
11902
    hvleavestabdelay    = 15;
11903
    chiperasepulsewidth = 0;
11904
    chiperasepolltimeout = 10;
11905
    programfusepulsewidth = 0;
11906
    programfusepolltimeout = 5;
11907
    programlockpulsewidth = 0;
11908
    programlockpolltimeout = 5;
11909
 
11910
    idr                 = 0x31;
11911
    spmcr               = 0x57;
11912
    rampz               = 0x3b;
11913
    allowfullpagebitstream = no;
11914
 
11915
    memory "eeprom"
11916
        paged           = no; /* leave this "no" */
11917
        page_size       = 8;  /* for parallel programming */
11918
        size            = 2048;
11919
        min_write_delay = 9000;
11920
        max_write_delay = 9000;
11921
        readback_p1     = 0x00;
11922
        readback_p2     = 0x00;
11923
        read            = "  1   0   1   0      0   0   0   0",
11924
                          "  x   x   x   x      x a10  a9  a8",
11925
                          " a7  a6  a5  a4     a3  a2  a1  a0",
11926
                          "  o   o   o   o      o   o   o   o";
11927
 
11928
        write           = "  1   1   0   0      0   0   0   0",
11929
                          "  x   x   x   x      x a10  a9  a8",
11930
                          " a7  a6  a5  a4     a3  a2  a1  a0",
11931
                          "  i   i   i   i      i   i   i   i";
11932
 
11933
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
11934
			  "  0   0   0   0      0   0   0   0",
11935
			  "  0   0   0   0      0  a2  a1  a0",
11936
			  "  i   i   i   i      i   i   i   i";
11937
 
11938
	writepage	= "  1   1   0   0      0   0   1   0",
11939
			  "  0   0   x   x      x a10  a9  a8",
11940
			  " a7  a6  a5  a4     a3   0   0   0",
11941
			  "  x   x   x   x      x   x   x   x";
11942
 
11943
	mode		= 0x41;
11944
	delay		= 10;
11945
	blocksize	= 8;
11946
	readsize	= 256;
11947
      ;
11948
 
11949
    memory "flash"
11950
        paged           = yes;
11951
        size            = 65536;
11952
        page_size       = 256;
11953
        num_pages       = 256;
11954
        min_write_delay = 4500;
11955
        max_write_delay = 4500;
11956
        readback_p1     = 0x00;
11957
        readback_p2     = 0x00;
11958
        read_lo         = "  0   0   1   0      0   0   0   0",
11959
                          "  0 a14 a13 a12    a11 a10  a9  a8",
11960
                          " a7  a6  a5  a4     a3  a2  a1  a0",
11961
                          "  o   o   o   o      o   o   o   o";
11962
 
11963
        read_hi         = "  0   0   1   0      1   0   0   0",
11964
                          "  0 a14 a13 a12    a11 a10  a9  a8",
11965
                          " a7  a6  a5  a4     a3  a2  a1  a0",
11966
                          "  o   o   o   o      o   o   o   o";
11967
 
11968
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
11969
                          "  x   x   x   x      x   x   x   x",
11970
                          "  x  a6  a5  a4     a3  a2  a1  a0",
11971
                          "  i   i   i   i      i   i   i   i";
11972
 
11973
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
11974
                          "  x   x   x   x      x   x   x   x",
11975
                          "  x  a6  a5  a4     a3  a2  a1  a0",
11976
                          "  i   i   i   i      i   i   i   i";
11977
 
11978
        writepage       = "  0   1   0   0      1   1   0   0",
11979
                          "  0 a14 a13 a12    a11 a10  a9  a8",
11980
                          " a7   x   x   x      x   x   x   x",
11981
                          "  x   x   x   x      x   x   x   x";
11982
 
11983
	mode		= 0x41;
11984
	delay		= 6;
11985
	blocksize	= 256;
11986
	readsize	= 256;
11987
      ;
11988
 
11989
    memory "lfuse"
11990
        size            = 1;
11991
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
11992
                          "x x x x  x x x x  i i i i  i i i i";
11993
 
11994
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
11995
                          "x x x x  x x x x  o o o o  o o o o";
11996
        min_write_delay = 9000;
11997
        max_write_delay = 9000;
11998
      ;
11999
 
12000
    memory "hfuse"
12001
        size            = 1;
12002
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
12003
                          "x x x x  x x x x  i i i i  i i i i";
12004
 
12005
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
12006
                          "x x x x  x x x x  o o o o  o o o o";
12007
        min_write_delay = 9000;
12008
        max_write_delay = 9000;
12009
      ;
12010
 
12011
    memory "efuse"
12012
        size            = 1;
12013
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
12014
                          "x x x x  x x x x  x x x x  i i i i";
12015
 
12016
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
12017
                          "x x x x  x x x x  o o o o  o o o o";
12018
        min_write_delay = 9000;
12019
        max_write_delay = 9000;
12020
      ;
12021
 
12022
    memory "lock"
12023
        size            = 1;
12024
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
12025
                          "x x x x  x x x x   x x o o  o o o o";
12026
 
12027
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
12028
                          "x x x x  x x x x   1 1 i i  i i i i";
12029
        min_write_delay = 9000;
12030
        max_write_delay = 9000;
12031
      ;
12032
 
12033
    memory "calibration"
12034
        size            = 1;
12035
        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
12036
                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
12037
      ;
12038
 
12039
    memory "signature"
12040
        size            = 3;
12041
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
12042
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
12043
      ;
12044
  ;
12045
 
12046
#------------------------------------------------------------
12047
# AT90USB647
12048
#------------------------------------------------------------
12049
# identical to AT90USB646
12050
 
12051
part
12052
    id               = "usb647";
12053
    desc             = "AT90USB647";
12054
    signature        = 0x1e 0x96 0x82;
12055
    has_jtag         = yes;
12056
#    stk500_devcode   = 0xB2;
12057
#    avr910_devcode   = 0x43;
12058
    chip_erase_delay = 9000;
12059
    pagel            = 0xD7;
12060
    bs2              = 0xA0;
12061
    reset            = dedicated;
12062
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
12063
                       "x x x x  x x x x    x x x x  x x x x";
12064
 
12065
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
12066
                       "x x x x  x x x x    x x x x  x x x x";
12067
 
12068
    timeout		= 200;
12069
    stabdelay		= 100;
12070
    cmdexedelay		= 25;
12071
    synchloops		= 32;
12072
    bytedelay		= 0;
12073
    pollindex		= 3;
12074
    pollvalue		= 0x53;
12075
    predelay		= 1;
12076
    postdelay		= 1;
12077
    pollmethod		= 1;
12078
 
12079
    pp_controlstack     =
12080
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
12081
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
12082
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
12083
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
12084
    hventerstabdelay    = 100;
12085
    progmodedelay       = 0;
12086
    latchcycles         = 5;
12087
    togglevtg           = 1;
12088
    poweroffdelay       = 15;
12089
    resetdelayms        = 1;
12090
    resetdelayus        = 0;
12091
    hvleavestabdelay    = 15;
12092
    chiperasepulsewidth = 0;
12093
    chiperasepolltimeout = 10;
12094
    programfusepulsewidth = 0;
12095
    programfusepolltimeout = 5;
12096
    programlockpulsewidth = 0;
12097
    programlockpolltimeout = 5;
12098
 
12099
    idr                 = 0x31;
12100
    spmcr               = 0x57;
12101
    rampz               = 0x3b;
12102
    allowfullpagebitstream = no;
12103
 
12104
    memory "eeprom"
12105
        paged           = no; /* leave this "no" */
12106
        page_size       = 8;  /* for parallel programming */
12107
        size            = 2048;
12108
        min_write_delay = 9000;
12109
        max_write_delay = 9000;
12110
        readback_p1     = 0x00;
12111
        readback_p2     = 0x00;
12112
        read            = "  1   0   1   0      0   0   0   0",
12113
                          "  x   x   x   x      x a10  a9  a8",
12114
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12115
                          "  o   o   o   o      o   o   o   o";
12116
 
12117
        write           = "  1   1   0   0      0   0   0   0",
12118
                          "  x   x   x   x      x a10  a9  a8",
12119
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12120
                          "  i   i   i   i      i   i   i   i";
12121
 
12122
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
12123
			  "  0   0   0   0      0   0   0   0",
12124
			  "  0   0   0   0      0  a2  a1  a0",
12125
			  "  i   i   i   i      i   i   i   i";
12126
 
12127
	writepage	= "  1   1   0   0      0   0   1   0",
12128
			  "  0   0   x   x      x a10  a9  a8",
12129
			  " a7  a6  a5  a4     a3   0   0   0",
12130
			  "  x   x   x   x      x   x   x   x";
12131
 
12132
	mode		= 0x41;
12133
	delay		= 10;
12134
	blocksize	= 8;
12135
	readsize	= 256;
12136
      ;
12137
 
12138
    memory "flash"
12139
        paged           = yes;
12140
        size            = 65536;
12141
        page_size       = 256;
12142
        num_pages       = 256;
12143
        min_write_delay = 4500;
12144
        max_write_delay = 4500;
12145
        readback_p1     = 0x00;
12146
        readback_p2     = 0x00;
12147
        read_lo         = "  0   0   1   0      0   0   0   0",
12148
                          "  0 a14 a13 a12    a11 a10  a9  a8",
12149
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12150
                          "  o   o   o   o      o   o   o   o";
12151
 
12152
        read_hi         = "  0   0   1   0      1   0   0   0",
12153
                          "  0 a14 a13 a12    a11 a10  a9  a8",
12154
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12155
                          "  o   o   o   o      o   o   o   o";
12156
 
12157
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
12158
                          "  x   x   x   x      x   x   x   x",
12159
                          "  x  a6  a5  a4     a3  a2  a1  a0",
12160
                          "  i   i   i   i      i   i   i   i";
12161
 
12162
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
12163
                          "  x   x   x   x      x   x   x   x",
12164
                          "  x  a6  a5  a4     a3  a2  a1  a0",
12165
                          "  i   i   i   i      i   i   i   i";
12166
 
12167
        writepage       = "  0   1   0   0      1   1   0   0",
12168
                          "  0 a14 a13 a12    a11 a10  a9  a8",
12169
                          " a7   x   x   x      x   x   x   x",
12170
                          "  x   x   x   x      x   x   x   x";
12171
 
12172
	mode		= 0x41;
12173
	delay		= 6;
12174
	blocksize	= 256;
12175
	readsize	= 256;
12176
      ;
12177
 
12178
    memory "lfuse"
12179
        size            = 1;
12180
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
12181
                          "x x x x  x x x x  i i i i  i i i i";
12182
 
12183
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
12184
                          "x x x x  x x x x  o o o o  o o o o";
12185
        min_write_delay = 9000;
12186
        max_write_delay = 9000;
12187
      ;
12188
 
12189
    memory "hfuse"
12190
        size            = 1;
12191
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
12192
                          "x x x x  x x x x  i i i i  i i i i";
12193
 
12194
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
12195
                          "x x x x  x x x x  o o o o  o o o o";
12196
        min_write_delay = 9000;
12197
        max_write_delay = 9000;
12198
      ;
12199
 
12200
    memory "efuse"
12201
        size            = 1;
12202
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
12203
                          "x x x x  x x x x  x x x x  i i i i";
12204
 
12205
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
12206
                          "x x x x  x x x x  o o o o  o o o o";
12207
        min_write_delay = 9000;
12208
        max_write_delay = 9000;
12209
      ;
12210
 
12211
    memory "lock"
12212
        size            = 1;
12213
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
12214
                          "x x x x  x x x x   x x o o  o o o o";
12215
 
12216
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
12217
                          "x x x x  x x x x   1 1 i i  i i i i";
12218
        min_write_delay = 9000;
12219
        max_write_delay = 9000;
12220
      ;
12221
 
12222
    memory "calibration"
12223
        size            = 1;
12224
        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
12225
                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
12226
      ;
12227
 
12228
    memory "signature"
12229
        size            = 3;
12230
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
12231
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
12232
      ;
12233
  ;
12234
 
12235
#------------------------------------------------------------
12236
# AT90USB1286
12237
#------------------------------------------------------------
12238
 
12239
part
12240
    id               = "usb1286";
12241
    desc             = "AT90USB1286";
12242
    signature        = 0x1e 0x97 0x82;
12243
    has_jtag         = yes;
12244
#    stk500_devcode   = 0xB2;
12245
#    avr910_devcode   = 0x43;
12246
    chip_erase_delay = 9000;
12247
    pagel            = 0xD7;
12248
    bs2              = 0xA0;
12249
    reset            = dedicated;
12250
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
12251
                       "x x x x  x x x x    x x x x  x x x x";
12252
 
12253
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
12254
                       "x x x x  x x x x    x x x x  x x x x";
12255
 
12256
    timeout		= 200;
12257
    stabdelay		= 100;
12258
    cmdexedelay		= 25;
12259
    synchloops		= 32;
12260
    bytedelay		= 0;
12261
    pollindex		= 3;
12262
    pollvalue		= 0x53;
12263
    predelay		= 1;
12264
    postdelay		= 1;
12265
    pollmethod		= 1;
12266
 
12267
    pp_controlstack     =
12268
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
12269
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
12270
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
12271
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
12272
    hventerstabdelay    = 100;
12273
    progmodedelay       = 0;
12274
    latchcycles         = 5;
12275
    togglevtg           = 1;
12276
    poweroffdelay       = 15;
12277
    resetdelayms        = 1;
12278
    resetdelayus        = 0;
12279
    hvleavestabdelay    = 15;
12280
    chiperasepulsewidth = 0;
12281
    chiperasepolltimeout = 10;
12282
    programfusepulsewidth = 0;
12283
    programfusepolltimeout = 5;
12284
    programlockpulsewidth = 0;
12285
    programlockpolltimeout = 5;
12286
 
12287
    idr                 = 0x31;
12288
    spmcr               = 0x57;
12289
    rampz               = 0x3b;
12290
    allowfullpagebitstream = no;
12291
 
12292
    memory "eeprom"
12293
        paged           = no; /* leave this "no" */
12294
        page_size       = 8;  /* for parallel programming */
12295
        size            = 4096;
12296
        min_write_delay = 9000;
12297
        max_write_delay = 9000;
12298
        readback_p1     = 0x00;
12299
        readback_p2     = 0x00;
12300
        read            = "  1   0   1   0      0   0   0   0",
12301
                          "  x   x   x   x    a11 a10  a9  a8",
12302
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12303
                          "  o   o   o   o      o   o   o   o";
12304
 
12305
        write           = "  1   1   0   0      0   0   0   0",
12306
                          "  x   x   x   x    a11 a10  a9  a8",
12307
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12308
                          "  i   i   i   i      i   i   i   i";
12309
 
12310
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
12311
			  "  0   0   0   0      0   0   0   0",
12312
			  "  0   0   0   0      0  a2  a1  a0",
12313
			  "  i   i   i   i      i   i   i   i";
12314
 
12315
	writepage	= "  1   1   0   0      0   0   1   0",
12316
			  "  0   0   x   x      x a10  a9  a8",
12317
			  " a7  a6  a5  a4     a3   0   0   0",
12318
			  "  x   x   x   x      x   x   x   x";
12319
 
12320
	mode		= 0x41;
12321
	delay		= 10;
12322
	blocksize	= 8;
12323
	readsize	= 256;
12324
      ;
12325
 
12326
    memory "flash"
12327
        paged           = yes;
12328
        size            = 131072;
12329
        page_size       = 256;
12330
        num_pages       = 512;
12331
        min_write_delay = 4500;
12332
        max_write_delay = 4500;
12333
        readback_p1     = 0x00;
12334
        readback_p2     = 0x00;
12335
        read_lo         = "  0   0   1   0      0   0   0   0",
12336
                          "a15 a14 a13 a12    a11 a10  a9  a8",
12337
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12338
                          "  o   o   o   o      o   o   o   o";
12339
 
12340
        read_hi         = "  0   0   1   0      1   0   0   0",
12341
                          "a15 a14 a13 a12    a11 a10  a9  a8",
12342
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12343
                          "  o   o   o   o      o   o   o   o";
12344
 
12345
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
12346
                          "  x   x   x   x      x   x   x   x",
12347
                          "  x  a6  a5  a4     a3  a2  a1  a0",
12348
                          "  i   i   i   i      i   i   i   i";
12349
 
12350
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
12351
                          "  x   x   x   x      x   x   x   x",
12352
                          "  x  a6  a5  a4     a3  a2  a1  a0",
12353
                          "  i   i   i   i      i   i   i   i";
12354
 
12355
        writepage       = "  0   1   0   0      1   1   0   0",
12356
                          "a15 a14 a13 a12    a11 a10  a9  a8",
12357
                          " a7   x   x   x      x   x   x   x",
12358
                          "  x   x   x   x      x   x   x   x";
12359
 
12360
	mode		= 0x41;
12361
	delay		= 6;
12362
	blocksize	= 256;
12363
	readsize	= 256;
12364
      ;
12365
 
12366
    memory "lfuse"
12367
        size            = 1;
12368
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
12369
                          "x x x x  x x x x  i i i i  i i i i";
12370
 
12371
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
12372
                          "x x x x  x x x x  o o o o  o o o o";
12373
        min_write_delay = 9000;
12374
        max_write_delay = 9000;
12375
      ;
12376
 
12377
    memory "hfuse"
12378
        size            = 1;
12379
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
12380
                          "x x x x  x x x x  i i i i  i i i i";
12381
 
12382
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
12383
                          "x x x x  x x x x  o o o o  o o o o";
12384
        min_write_delay = 9000;
12385
        max_write_delay = 9000;
12386
      ;
12387
 
12388
    memory "efuse"
12389
        size            = 1;
12390
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
12391
                          "x x x x  x x x x  x x x x  i i i i";
12392
 
12393
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
12394
                          "x x x x  x x x x  o o o o  o o o o";
12395
        min_write_delay = 9000;
12396
        max_write_delay = 9000;
12397
      ;
12398
 
12399
    memory "lock"
12400
        size            = 1;
12401
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
12402
                          "x x x x  x x x x   x x o o  o o o o";
12403
 
12404
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
12405
                          "x x x x  x x x x   1 1 i i  i i i i";
12406
        min_write_delay = 9000;
12407
        max_write_delay = 9000;
12408
      ;
12409
 
12410
    memory "calibration"
12411
        size            = 1;
12412
        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
12413
                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
12414
      ;
12415
 
12416
    memory "signature"
12417
        size            = 3;
12418
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
12419
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
12420
      ;
12421
  ;
12422
 
12423
#------------------------------------------------------------
12424
# AT90USB1287
12425
#------------------------------------------------------------
12426
# identical to AT90USB1286
12427
 
12428
part
12429
    id               = "usb1287";
12430
    desc             = "AT90USB1287";
12431
    signature        = 0x1e 0x97 0x82;
12432
    has_jtag         = yes;
12433
#    stk500_devcode   = 0xB2;
12434
#    avr910_devcode   = 0x43;
12435
    chip_erase_delay = 9000;
12436
    pagel            = 0xD7;
12437
    bs2              = 0xA0;
12438
    reset            = dedicated;
12439
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
12440
                       "x x x x  x x x x    x x x x  x x x x";
12441
 
12442
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
12443
                       "x x x x  x x x x    x x x x  x x x x";
12444
 
12445
    timeout		= 200;
12446
    stabdelay		= 100;
12447
    cmdexedelay		= 25;
12448
    synchloops		= 32;
12449
    bytedelay		= 0;
12450
    pollindex		= 3;
12451
    pollvalue		= 0x53;
12452
    predelay		= 1;
12453
    postdelay		= 1;
12454
    pollmethod		= 1;
12455
 
12456
    pp_controlstack     =
12457
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
12458
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
12459
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
12460
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
12461
    hventerstabdelay    = 100;
12462
    progmodedelay       = 0;
12463
    latchcycles         = 5;
12464
    togglevtg           = 1;
12465
    poweroffdelay       = 15;
12466
    resetdelayms        = 1;
12467
    resetdelayus        = 0;
12468
    hvleavestabdelay    = 15;
12469
    chiperasepulsewidth = 0;
12470
    chiperasepolltimeout = 10;
12471
    programfusepulsewidth = 0;
12472
    programfusepolltimeout = 5;
12473
    programlockpulsewidth = 0;
12474
    programlockpolltimeout = 5;
12475
 
12476
    idr                 = 0x31;
12477
    spmcr               = 0x57;
12478
    rampz               = 0x3b;
12479
    allowfullpagebitstream = no;
12480
 
12481
    memory "eeprom"
12482
        paged           = no; /* leave this "no" */
12483
        page_size       = 8;  /* for parallel programming */
12484
        size            = 4096;
12485
        min_write_delay = 9000;
12486
        max_write_delay = 9000;
12487
        readback_p1     = 0x00;
12488
        readback_p2     = 0x00;
12489
        read            = "  1   0   1   0      0   0   0   0",
12490
                          "  x   x   x   x    a11 a10  a9  a8",
12491
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12492
                          "  o   o   o   o      o   o   o   o";
12493
 
12494
        write           = "  1   1   0   0      0   0   0   0",
12495
                          "  x   x   x   x    a11 a10  a9  a8",
12496
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12497
                          "  i   i   i   i      i   i   i   i";
12498
 
12499
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
12500
			  "  0   0   0   0      0   0   0   0",
12501
			  "  0   0   0   0      0  a2  a1  a0",
12502
			  "  i   i   i   i      i   i   i   i";
12503
 
12504
	writepage	= "  1   1   0   0      0   0   1   0",
12505
			  "  0   0   x   x      x a10  a9  a8",
12506
			  " a7  a6  a5  a4     a3   0   0   0",
12507
			  "  x   x   x   x      x   x   x   x";
12508
 
12509
	mode		= 0x41;
12510
	delay		= 10;
12511
	blocksize	= 8;
12512
	readsize	= 256;
12513
      ;
12514
 
12515
    memory "flash"
12516
        paged           = yes;
12517
        size            = 131072;
12518
        page_size       = 256;
12519
        num_pages       = 512;
12520
        min_write_delay = 4500;
12521
        max_write_delay = 4500;
12522
        readback_p1     = 0x00;
12523
        readback_p2     = 0x00;
12524
        read_lo         = "  0   0   1   0      0   0   0   0",
12525
                          "a15 a14 a13 a12    a11 a10  a9  a8",
12526
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12527
                          "  o   o   o   o      o   o   o   o";
12528
 
12529
        read_hi         = "  0   0   1   0      1   0   0   0",
12530
                          "a15 a14 a13 a12    a11 a10  a9  a8",
12531
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12532
                          "  o   o   o   o      o   o   o   o";
12533
 
12534
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
12535
                          "  x   x   x   x      x   x   x   x",
12536
                          "  x  a6  a5  a4     a3  a2  a1  a0",
12537
                          "  i   i   i   i      i   i   i   i";
12538
 
12539
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
12540
                          "  x   x   x   x      x   x   x   x",
12541
                          "  x  a6  a5  a4     a3  a2  a1  a0",
12542
                          "  i   i   i   i      i   i   i   i";
12543
 
12544
        writepage       = "  0   1   0   0      1   1   0   0",
12545
                          "a15 a14 a13 a12    a11 a10  a9  a8",
12546
                          " a7   x   x   x      x   x   x   x",
12547
                          "  x   x   x   x      x   x   x   x";
12548
 
12549
	mode		= 0x41;
12550
	delay		= 6;
12551
	blocksize	= 256;
12552
	readsize	= 256;
12553
      ;
12554
 
12555
    memory "lfuse"
12556
        size            = 1;
12557
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
12558
                          "x x x x  x x x x  i i i i  i i i i";
12559
 
12560
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
12561
                          "x x x x  x x x x  o o o o  o o o o";
12562
        min_write_delay = 9000;
12563
        max_write_delay = 9000;
12564
      ;
12565
 
12566
    memory "hfuse"
12567
        size            = 1;
12568
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
12569
                          "x x x x  x x x x  i i i i  i i i i";
12570
 
12571
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
12572
                          "x x x x  x x x x  o o o o  o o o o";
12573
        min_write_delay = 9000;
12574
        max_write_delay = 9000;
12575
      ;
12576
 
12577
    memory "efuse"
12578
        size            = 1;
12579
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
12580
                          "x x x x  x x x x  x x x x  i i i i";
12581
 
12582
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
12583
                          "x x x x  x x x x  o o o o  o o o o";
12584
        min_write_delay = 9000;
12585
        max_write_delay = 9000;
12586
      ;
12587
 
12588
    memory "lock"
12589
        size            = 1;
12590
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
12591
                          "x x x x  x x x x   x x o o  o o o o";
12592
 
12593
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
12594
                          "x x x x  x x x x   1 1 i i  i i i i";
12595
        min_write_delay = 9000;
12596
        max_write_delay = 9000;
12597
      ;
12598
 
12599
    memory "calibration"
12600
        size            = 1;
12601
        read            = "0 0 1 1  1 0 0 0    x x x x  x x x x",
12602
                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
12603
      ;
12604
 
12605
    memory "signature"
12606
        size            = 3;
12607
        read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
12608
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
12609
      ;
12610
  ;
12611
 
12612
 
12613
#------------------------------------------------------------
12614
# AT90USB162
12615
#------------------------------------------------------------
12616
 
12617
part
12618
    id               = "usb162";
12619
    desc             = "AT90USB162";
12620
    has_jtag         = no;
12621
    has_debugwire    = yes;
12622
    signature        = 0x1e 0x94 0x82;
12623
    chip_erase_delay = 9000;
12624
    reset            = io;
12625
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
12626
                       "x x x x  x x x x    x x x x  x x x x";
12627
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
12628
                       "x x x x  x x x x    x x x x  x x x x";
12629
    pagel            = 0xD7;
12630
    bs2              = 0xC6;
12631
 
12632
    timeout		= 200;
12633
    stabdelay		= 100;
12634
    cmdexedelay		= 25;
12635
    synchloops		= 32;
12636
    bytedelay		= 0;
12637
    pollindex		= 3;
12638
    pollvalue		= 0x53;
12639
    predelay		= 1;
12640
    postdelay		= 1;
12641
    pollmethod		= 1;
12642
    pp_controlstack     =
12643
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
12644
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
12645
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
12646
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
12647
    hventerstabdelay    = 100;
12648
    progmodedelay       = 0;
12649
    latchcycles         = 5;
12650
    togglevtg           = 1;
12651
    poweroffdelay       = 15;
12652
    resetdelayms        = 1;
12653
    resetdelayus        = 0;
12654
    hvleavestabdelay    = 15;
12655
    chiperasepulsewidth = 0;
12656
    chiperasepolltimeout = 10;
12657
    programfusepulsewidth = 0;
12658
    programfusepolltimeout = 5;
12659
    programlockpulsewidth = 0;
12660
    programlockpolltimeout = 5;
12661
 
12662
    memory "eeprom"
12663
        paged           = no; /* leave this "no" */
12664
        page_size       = 4;  /* for parallel programming */
12665
        size            = 512;
12666
        num_pages       = 128;
12667
        min_write_delay = 9000;
12668
        max_write_delay = 9000;
12669
        readback_p1     = 0x00;
12670
        readback_p2     = 0x00;
12671
        read            = "  1   0   1   0      0   0   0   0",
12672
                          "  0   0   0   0    a11 a10  a9  a8",
12673
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12674
                          "  o   o   o   o      o   o   o   o";
12675
 
12676
        write           = "  1   1   0   0      0   0   0   0",
12677
                          "  0   0   0   0    a11 a10  a9  a8",
12678
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12679
                          "  i   i   i   i      i   i   i   i";
12680
 
12681
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
12682
			  "  0   0   0   0      0   0   0   0",
12683
			  "  0   0   0   0      0   0  a1  a0",
12684
			  "  i   i   i   i      i   i   i   i";
12685
 
12686
	writepage	= "  1   1   0   0      0   0   1   0",
12687
                          "  0   0   0   0    a11 a10  a9  a8",
12688
                          " a7  a6  a5  a4     a3  a2   0   0",
12689
			  "  x   x   x   x      x   x   x   x";
12690
 
12691
	mode		= 0x41;
12692
	delay		= 20;
12693
	blocksize	= 4;
12694
	readsize	= 256;
12695
      ;
12696
 
12697
    memory "flash"
12698
        paged           = yes;
12699
        size            = 16384;
12700
        page_size       = 128;
12701
        num_pages       = 128;
12702
        min_write_delay = 4500;
12703
        max_write_delay = 4500;
12704
        readback_p1     = 0x00;
12705
        readback_p2     = 0x00;
12706
        read_lo         = "  0   0   1   0      0   0   0   0",
12707
                          "a15 a14 a13 a12    a11 a10  a9  a8",
12708
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12709
                          "  o   o   o   o      o   o   o   o";
12710
 
12711
        read_hi         = "  0   0   1   0      1   0   0   0",
12712
                          "a15 a14 a13 a12    a11 a10  a9  a8",
12713
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12714
                          "  o   o   o   o      o   o   o   o";
12715
 
12716
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
12717
                          "  x   x   x   x      x   x   x   x",
12718
                          "  x   x  a5  a4     a3  a2  a1  a0",
12719
                          "  i   i   i   i      i   i   i   i";
12720
 
12721
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
12722
                          "  x   x   x   x      x   x   x   x",
12723
                          "  x   x  a5  a4     a3  a2  a1  a0",
12724
                          "  i   i   i   i      i   i   i   i";
12725
 
12726
        writepage       = "  0   1   0   0      1   1   0   0",
12727
                          "a15 a14 a13 a12    a11 a10  a9  a8",
12728
                          " a7  a6   x   x      x   x   x   x",
12729
                          "  x   x   x   x      x   x   x   x";
12730
 
12731
	mode		= 0x41;
12732
	delay		= 6;
12733
	blocksize	= 128;
12734
	readsize	= 256;
12735
      ;
12736
 
12737
    memory "lfuse"
12738
        size            = 1;
12739
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
12740
                          "x x x x  x x x x  i i i i  i i i i";
12741
 
12742
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
12743
                          "x x x x  x x x x  o o o o  o o o o";
12744
        min_write_delay = 9000;
12745
        max_write_delay = 9000;
12746
      ;
12747
 
12748
    memory "hfuse"
12749
        size            = 1;
12750
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
12751
                          "x x x x  x x x x  i i i i  i i i i";
12752
 
12753
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
12754
                          "x x x x  x x x x  o o o o  o o o o";
12755
        min_write_delay = 9000;
12756
        max_write_delay = 9000;
12757
      ;
12758
 
12759
    memory "efuse"
12760
        size            = 1;
12761
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
12762
                          "x x x x  x x x x  i i i i  i i i i";
12763
 
12764
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
12765
                          "x x x x  x x x x  o o o o  o o o o";
12766
        min_write_delay = 9000;
12767
        max_write_delay = 9000;
12768
      ;
12769
 
12770
    memory "lock"
12771
        size            = 1;
12772
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
12773
                          "x x x x  x x x x   x x o o  o o o o";
12774
 
12775
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
12776
                          "x x x x  x x x x   1 1 i i  i i i i";
12777
        min_write_delay = 9000;
12778
        max_write_delay = 9000;
12779
      ;
12780
 
12781
    memory "calibration"
12782
        size            = 1;
12783
        read            = "0 0 1 1  1 0 0 0    0 0 0 x  x x x x",
12784
                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
12785
      ;
12786
    memory "signature"
12787
        size            = 3;
12788
        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
12789
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
12790
      ;
12791
  ;
12792
 
12793
#------------------------------------------------------------
12794
# AT90USB82
12795
#------------------------------------------------------------
12796
# Changes against AT90USB162 (beside IDs)
12797
#    memory "flash"
12798
#        size            = 8192;
12799
#        num_pages       = 64;
12800
 
12801
part
12802
    id               = "usb82";
12803
    desc             = "AT90USB82";
12804
    has_jtag         = no;
12805
    has_debugwire    = yes;
12806
    signature        = 0x1e 0x93 0x82;
12807
    chip_erase_delay = 9000;
12808
    reset            = io;
12809
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
12810
                       "x x x x  x x x x    x x x x  x x x x";
12811
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
12812
                       "x x x x  x x x x    x x x x  x x x x";
12813
    pagel            = 0xD7;
12814
    bs2              = 0xC6;
12815
 
12816
    timeout		= 200;
12817
    stabdelay		= 100;
12818
    cmdexedelay		= 25;
12819
    synchloops		= 32;
12820
    bytedelay		= 0;
12821
    pollindex		= 3;
12822
    pollvalue		= 0x53;
12823
    predelay		= 1;
12824
    postdelay		= 1;
12825
    pollmethod		= 1;
12826
    pp_controlstack     =
12827
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
12828
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
12829
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
12830
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
12831
    hventerstabdelay    = 100;
12832
    progmodedelay       = 0;
12833
    latchcycles         = 5;
12834
    togglevtg           = 1;
12835
    poweroffdelay       = 15;
12836
    resetdelayms        = 1;
12837
    resetdelayus        = 0;
12838
    hvleavestabdelay    = 15;
12839
    chiperasepulsewidth = 0;
12840
    chiperasepolltimeout = 10;
12841
    programfusepulsewidth = 0;
12842
    programfusepolltimeout = 5;
12843
    programlockpulsewidth = 0;
12844
    programlockpolltimeout = 5;
12845
 
12846
    memory "eeprom"
12847
        paged           = no; /* leave this "no" */
12848
        page_size       = 4;  /* for parallel programming */
12849
        size            = 512;
12850
        num_pages       = 128;
12851
        min_write_delay = 9000;
12852
        max_write_delay = 9000;
12853
        readback_p1     = 0x00;
12854
        readback_p2     = 0x00;
12855
        read            = "  1   0   1   0      0   0   0   0",
12856
                          "  0   0   0   0    a11 a10  a9  a8",
12857
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12858
                          "  o   o   o   o      o   o   o   o";
12859
 
12860
        write           = "  1   1   0   0      0   0   0   0",
12861
                          "  0   0   0   0    a11 a10  a9  a8",
12862
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12863
                          "  i   i   i   i      i   i   i   i";
12864
 
12865
	loadpage_lo	= "  1   1   0   0      0   0   0   1",
12866
			  "  0   0   0   0      0   0   0   0",
12867
			  "  0   0   0   0      0   0  a1  a0",
12868
			  "  i   i   i   i      i   i   i   i";
12869
 
12870
	writepage	= "  1   1   0   0      0   0   1   0",
12871
                          "  0   0   0   0    a11 a10  a9  a8",
12872
                          " a7  a6  a5  a4     a3  a2   0   0",
12873
			  "  x   x   x   x      x   x   x   x";
12874
 
12875
	mode		= 0x41;
12876
	delay		= 20;
12877
	blocksize	= 4;
12878
	readsize	= 256;
12879
      ;
12880
 
12881
    memory "flash"
12882
        paged           = yes;
12883
        size            = 8192;
12884
        page_size       = 128;
12885
        num_pages       = 64;
12886
        min_write_delay = 4500;
12887
        max_write_delay = 4500;
12888
        readback_p1     = 0x00;
12889
        readback_p2     = 0x00;
12890
        read_lo         = "  0   0   1   0      0   0   0   0",
12891
                          "a15 a14 a13 a12    a11 a10  a9  a8",
12892
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12893
                          "  o   o   o   o      o   o   o   o";
12894
 
12895
        read_hi         = "  0   0   1   0      1   0   0   0",
12896
                          "a15 a14 a13 a12    a11 a10  a9  a8",
12897
                          " a7  a6  a5  a4     a3  a2  a1  a0",
12898
                          "  o   o   o   o      o   o   o   o";
12899
 
12900
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
12901
                          "  x   x   x   x      x   x   x   x",
12902
                          "  x   x  a5  a4     a3  a2  a1  a0",
12903
                          "  i   i   i   i      i   i   i   i";
12904
 
12905
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
12906
                          "  x   x   x   x      x   x   x   x",
12907
                          "  x   x  a5  a4     a3  a2  a1  a0",
12908
                          "  i   i   i   i      i   i   i   i";
12909
 
12910
        writepage       = "  0   1   0   0      1   1   0   0",
12911
                          "a15 a14 a13 a12    a11 a10  a9  a8",
12912
                          " a7  a6   x   x      x   x   x   x",
12913
                          "  x   x   x   x      x   x   x   x";
12914
 
12915
	mode		= 0x41;
12916
	delay		= 6;
12917
	blocksize	= 128;
12918
	readsize	= 256;
12919
      ;
12920
 
12921
    memory "lfuse"
12922
        size            = 1;
12923
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
12924
                          "x x x x  x x x x  i i i i  i i i i";
12925
 
12926
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
12927
                          "x x x x  x x x x  o o o o  o o o o";
12928
        min_write_delay = 9000;
12929
        max_write_delay = 9000;
12930
      ;
12931
 
12932
    memory "hfuse"
12933
        size            = 1;
12934
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
12935
                          "x x x x  x x x x  i i i i  i i i i";
12936
 
12937
        read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
12938
                          "x x x x  x x x x  o o o o  o o o o";
12939
        min_write_delay = 9000;
12940
        max_write_delay = 9000;
12941
      ;
12942
 
12943
    memory "efuse"
12944
        size            = 1;
12945
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 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  1 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 "lock"
12955
        size            = 1;
12956
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
12957
                          "x x x x  x x x x   x x o o  o o o o";
12958
 
12959
        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
12960
                          "x x x x  x x x x   1 1 i i  i i i i";
12961
        min_write_delay = 9000;
12962
        max_write_delay = 9000;
12963
      ;
12964
 
12965
    memory "calibration"
12966
        size            = 1;
12967
        read            = "0 0 1 1  1 0 0 0    0 0 0 x  x x x x",
12968
                          "0 0 0 0  0 0 0 0    o o o o  o o o o";
12969
      ;
12970
    memory "signature"
12971
        size            = 3;
12972
        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
12973
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
12974
      ;
12975
  ;
12976
 
12977
#------------------------------------------------------------
12978
# ATmega325
12979
#------------------------------------------------------------
12980
 
12981
part
12982
    id               = "m325";
12983
    desc             = "ATMEGA325";
12984
    signature        = 0x1e 0x95 0x05;
12985
    has_jtag         = yes;
12986
#   stk500_devcode   = 0x??; # No STK500v1 support?
12987
#   avr910_devcode   = 0x??; # Try the ATmega16 one
12988
    avr910_devcode   = 0x74;
12989
    pagel            = 0xd7;
12990
    bs2              = 0xa0;
12991
    chip_erase_delay = 9000;
12992
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
12993
                       "0 0 0 0  0 0 0 0    0 0 0 0  0 0 0 0";
12994
 
12995
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
12996
                       "0 0 0 0  0 0 0 0    0 0 0 0  0 0 0 0";
12997
 
12998
    timeout             = 200;
12999
    stabdelay           = 100;
13000
    cmdexedelay         = 25;
13001
    synchloops          = 32;
13002
    bytedelay           = 0;
13003
    pollindex           = 3;
13004
    pollvalue           = 0x53;
13005
    predelay            = 1;
13006
    postdelay           = 1;
13007
    pollmethod          = 1;
13008
 
13009
    pp_controlstack     =
13010
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
13011
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
13012
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
13013
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
13014
    hventerstabdelay    = 100;
13015
    progmodedelay       = 0;
13016
    latchcycles         = 5;
13017
    togglevtg           = 1;
13018
    poweroffdelay       = 15;
13019
    resetdelayms        = 1;
13020
    resetdelayus        = 0;
13021
    hvleavestabdelay    = 15;
13022
    chiperasepulsewidth = 0;
13023
    chiperasepolltimeout = 10;
13024
    programfusepulsewidth = 0;
13025
    programfusepolltimeout = 5;
13026
    programlockpulsewidth = 0;
13027
    programlockpolltimeout = 5;
13028
 
13029
    idr                 = 0x31;
13030
    spmcr               = 0x57;
13031
    allowfullpagebitstream = no;
13032
 
13033
    memory "eeprom"
13034
        paged           = no; /* leave this "no" */
13035
        page_size       = 4;  /* for parallel programming */
13036
        size            = 1024;
13037
        min_write_delay = 9000;
13038
        max_write_delay = 9000;
13039
        readback_p1     = 0xff;
13040
        readback_p2     = 0xff;
13041
        read            = "  1   0   1   0      0   0   0   0",
13042
                          "  0   0   0   0      0   0  a9  a8",
13043
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13044
                          "  o   o   o   o      o   o   o   o";
13045
 
13046
        write           = "  1   1   0   0      0   0   0   0",
13047
                          "  0   0   0   0      0   0  a9  a8",
13048
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13049
                          "  i   i   i   i      i   i   i   i";
13050
 
13051
        loadpage_lo     = "  1   1   0   0      0   0   0   1",
13052
                          "  0   0   0   0      0   0   0   0",
13053
                          "  0   0   0   0      0   0  a1  a0",
13054
                          "  i   i   i   i      i   i   i   i";
13055
 
13056
        writepage       = "  1   1   0   0      0   0   1   0",
13057
                          "  0   0   0   0      0   0  a9  a8",
13058
                          " a7  a6  a5  a4     a3  a2   0   0",
13059
                          "  x   x   x   x      x   x   x   x";
13060
 
13061
        mode            = 0x41;
13062
        delay           = 10;
13063
        blocksize       = 4;
13064
        readsize        = 256;
13065
      ;
13066
 
13067
    memory "flash"
13068
        paged           = yes;
13069
        size            = 32768;
13070
        page_size       = 128;
13071
        num_pages       = 256;
13072
        min_write_delay = 4500;
13073
        max_write_delay = 4500;
13074
        readback_p1     = 0xff;
13075
        readback_p2     = 0xff;
13076
        read_lo         = "  0   0   1   0      0   0   0   0",
13077
                          "  0 a14 a13 a12    a11 a10  a9  a8",
13078
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13079
                          "  o   o   o   o      o   o   o   o";
13080
 
13081
        read_hi         = "  0   0   1   0      1   0   0   0",
13082
                          "  0 a14 a13 a12    a11 a10  a9  a8",
13083
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13084
                          "  o   o   o   o      o   o   o   o";
13085
 
13086
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
13087
                          "  0   0   0   0      0   0   0   0",
13088
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13089
                          "  i   i   i   i      i   i   i   i";
13090
 
13091
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
13092
                          "  0   0   0   0      0   0   0   0",
13093
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13094
                          "  i   i   i   i      i   i   i   i";
13095
 
13096
        writepage       = "  0   1   0   0      1   1   0   0",
13097
                          "  0 a14 a13 a12    a11 a10  a9  a8",
13098
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13099
                          "  x   x   x   x      x   x   x   x";
13100
 
13101
        mode            = 0x41;
13102
        delay           = 10;
13103
        blocksize       = 128;
13104
        readsize        = 256;
13105
      ;
13106
 
13107
    memory "lock"
13108
        size            = 1;
13109
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
13110
                          "x x x x  x x x x   x x o o  o o o o";
13111
 
13112
        write           = "1 0 1 0  1 1 0 0   1 1 1 0  0 0 0 0",
13113
                          "0 0 0 0  0 0 0 0   1 1 i i  i i i i";
13114
        min_write_delay = 9000;
13115
        max_write_delay = 9000;
13116
      ;
13117
 
13118
    memory "lfuse"
13119
        size            = 1;
13120
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
13121
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
13122
 
13123
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
13124
                          "0 0 0 0  0 0 0 0   i i i i  i i i i";
13125
        min_write_delay = 9000;
13126
        max_write_delay = 9000;
13127
      ;
13128
 
13129
    memory "hfuse"
13130
        size            = 1;
13131
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
13132
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
13133
 
13134
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
13135
                          "0 0 0 0  0 0 0 0   i i i i  i i i i";
13136
        min_write_delay = 9000;
13137
        max_write_delay = 9000;
13138
      ;
13139
 
13140
    memory "efuse"
13141
        size            = 1;
13142
 
13143
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
13144
                          "0 0 0 0  0 0 0 0  o o o o  o o o o";
13145
 
13146
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
13147
                          "0 0 0 0  0 0 0 0  1 1 1 1  1 i i i";
13148
        min_write_delay = 9000;
13149
        max_write_delay = 9000;
13150
      ;
13151
 
13152
    memory "signature"
13153
        size            = 3;
13154
        read            = "0  0  1  1   0  0  0  0   0  0  0  0   0  0  0  0",
13155
                          "0  0  0  0   0  0 a1 a0   o  o  o  o   o  o  o  o";
13156
      ;
13157
 
13158
    memory "calibration"
13159
        size            = 1;
13160
 
13161
        read            = "0 0 1 1  1 0 0 0   0 0 0 0  0 0 0 0",
13162
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
13163
        ;
13164
  ;
13165
 
13166
#------------------------------------------------------------
13167
# ATmega645
13168
#------------------------------------------------------------
13169
 
13170
part
13171
    id               = "m645";
13172
    desc             = "ATMEGA645";
13173
    signature        = 0x1E 0x96 0x05;
13174
    has_jtag         = yes;
13175
#   stk500_devcode   = 0x??; # No STK500v1 support?
13176
#   avr910_devcode   = 0x??; # Try the ATmega16 one
13177
    avr910_devcode   = 0x74;
13178
    pagel            = 0xd7;
13179
    bs2              = 0xa0;
13180
    chip_erase_delay = 9000;
13181
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
13182
                       "0 0 0 0  0 0 0 0    0 0 0 0  0 0 0 0";
13183
 
13184
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
13185
                       "0 0 0 0  0 0 0 0    0 0 0 0  0 0 0 0";
13186
 
13187
    timeout             = 200;
13188
    stabdelay           = 100;
13189
    cmdexedelay         = 25;
13190
    synchloops          = 32;
13191
    bytedelay           = 0;
13192
    pollindex           = 3;
13193
    pollvalue           = 0x53;
13194
    predelay            = 1;
13195
    postdelay           = 1;
13196
    pollmethod          = 1;
13197
 
13198
    pp_controlstack     =
13199
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
13200
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
13201
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
13202
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
13203
    hventerstabdelay    = 100;
13204
    progmodedelay       = 0;
13205
    latchcycles         = 5;
13206
    togglevtg           = 1;
13207
    poweroffdelay       = 15;
13208
    resetdelayms        = 1;
13209
    resetdelayus        = 0;
13210
    hvleavestabdelay    = 15;
13211
    chiperasepulsewidth = 0;
13212
    chiperasepolltimeout = 10;
13213
    programfusepulsewidth = 0;
13214
    programfusepolltimeout = 5;
13215
    programlockpulsewidth = 0;
13216
    programlockpolltimeout = 5;
13217
 
13218
    idr                 = 0x31;
13219
    spmcr               = 0x57;
13220
    allowfullpagebitstream = no;
13221
 
13222
    memory "eeprom"
13223
        paged           = no; /* leave this "no" */
13224
        page_size       = 8;  /* for parallel programming */
13225
        size            = 2048;
13226
        min_write_delay = 9000;
13227
        max_write_delay = 9000;
13228
        readback_p1     = 0xff;
13229
        readback_p2     = 0xff;
13230
        read            = "  1   0   1   0      0   0   0   0",
13231
                          "  0   0   0   0      0 a10  a9  a8",
13232
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13233
                          "  o   o   o   o      o   o   o   o";
13234
 
13235
        write           = "  1   1   0   0      0   0   0   0",
13236
                          "  0   0   0   0      0 a10  a9  a8",
13237
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13238
                          "  i   i   i   i      i   i   i   i";
13239
 
13240
        loadpage_lo     = "  1   1   0   0      0   0   0   1",
13241
                          "  0   0   0   0      0   0   0   0",
13242
                          "  0   0   0   0      0  a2  a1  a0",
13243
                          "  i   i   i   i      i   i   i   i";
13244
 
13245
        writepage       = "  1   1   0   0      0   0   1   0",
13246
                          "  0   0   0   0      0 a10  a9  a8",
13247
                          " a7  a6  a5  a4     a3   0   0   0",
13248
                          "  x   x   x   x      x   x   x   x";
13249
 
13250
        mode            = 0x41;
13251
        delay           = 10;
13252
        blocksize       = 8;
13253
        readsize        = 256;
13254
      ;
13255
 
13256
    memory "flash"
13257
        paged           = yes;
13258
        size            = 65536;
13259
        page_size       = 256;
13260
        num_pages       = 256;
13261
        min_write_delay = 4500;
13262
        max_write_delay = 4500;
13263
        readback_p1     = 0xff;
13264
        readback_p2     = 0xff;
13265
        read_lo         = "   0   0   1   0      0   0   0   0",
13266
                          " a15 a14 a13 a12    a11 a10  a9  a8",
13267
                          "  a7  a6  a5  a4     a3  a2  a1  a0",
13268
                          "   o   o   o   o      o   o   o   o";
13269
 
13270
        read_hi         = "   0   0   1   0      1   0   0   0",
13271
                          " a15 a14 a13 a12    a11 a10  a9  a8",
13272
                          "  a7  a6  a5  a4     a3  a2  a1  a0",
13273
                          "   o   o   o   o      o   o   o   o";
13274
 
13275
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
13276
                          "  0   0   0   0      0   0   0   0",
13277
                          "  a7 a6  a5  a4     a3  a2  a1  a0",
13278
                          "  i   i   i   i      i   i   i   i";
13279
 
13280
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
13281
                          "  0   0   0   0      0   0   0   0",
13282
                          "  a7 a6  a5  a4     a3  a2  a1  a0",
13283
                          "  i   i   i   i      i   i   i   i";
13284
 
13285
        writepage       = "   0   1   0   0      1   1   0   0",
13286
                          " a15 a14 a13 a12    a11 a10  a9  a8",
13287
                          "  a7  a6  a5  a4     a3  a2  a1  a0",
13288
                          "   0   0   0   0      0   0   0   0";
13289
 
13290
        mode            = 0x41;
13291
        delay           = 10;
13292
        blocksize       = 128;
13293
        readsize        = 256;
13294
      ;
13295
 
13296
    memory "lock"
13297
        size            = 1;
13298
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
13299
                          "x x x x  x x x x   x x o o  o o o o";
13300
 
13301
        write           = "1 0 1 0  1 1 0 0   1 1 1 0  0 0 0 0",
13302
                          "0 0 0 0  0 0 0 0   1 1 i i  i i i i";
13303
        min_write_delay = 9000;
13304
        max_write_delay = 9000;
13305
      ;
13306
 
13307
    memory "lfuse"
13308
        size            = 1;
13309
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
13310
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
13311
 
13312
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
13313
                          "0 0 0 0  0 0 0 0   i i i i  i i i i";
13314
        min_write_delay = 9000;
13315
        max_write_delay = 9000;
13316
      ;
13317
 
13318
    memory "hfuse"
13319
        size            = 1;
13320
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
13321
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
13322
 
13323
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
13324
                          "0 0 0 0  0 0 0 0   i i i i  i i i i";
13325
        min_write_delay = 9000;
13326
        max_write_delay = 9000;
13327
      ;
13328
 
13329
    memory "efuse"
13330
        size            = 1;
13331
 
13332
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
13333
                          "0 0 0 0  0 0 0 0  o o o o  o o o o";
13334
 
13335
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
13336
                          "0 0 0 0  0 0 0 0  1 1 1 1  1 i i i";
13337
        min_write_delay = 9000;
13338
        max_write_delay = 9000;
13339
      ;
13340
 
13341
    memory "signature"
13342
        size            = 3;
13343
        read            = "0  0  1  1   0  0  0  0   0  0  0  0   0  0  0  0",
13344
                          "0  0  0  0   0  0 a1 a0   o  o  o  o   o  o  o  o";
13345
      ;
13346
 
13347
    memory "calibration"
13348
        size            = 1;
13349
 
13350
        read            = "0 0 1 1  1 0 0 0   0 0 0 0  0 0 0 0",
13351
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
13352
        ;
13353
  ;
13354
 
13355
#------------------------------------------------------------
13356
# ATmega3250
13357
#------------------------------------------------------------
13358
 
13359
part
13360
    id               = "m3250";
13361
    desc             = "ATMEGA3250";
13362
    signature        = 0x1E 0x95 0x06;
13363
    has_jtag         = yes;
13364
#   stk500_devcode   = 0x??; # No STK500v1 support?
13365
#   avr910_devcode   = 0x??; # Try the ATmega16 one
13366
    avr910_devcode   = 0x74;
13367
    pagel            = 0xd7;
13368
    bs2              = 0xa0;
13369
    chip_erase_delay = 9000;
13370
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
13371
                       "0 0 0 0  0 0 0 0    0 0 0 0  0 0 0 0";
13372
 
13373
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
13374
                       "0 0 0 0  0 0 0 0    0 0 0 0  0 0 0 0";
13375
 
13376
    timeout             = 200;
13377
    stabdelay           = 100;
13378
    cmdexedelay         = 25;
13379
    synchloops          = 32;
13380
    bytedelay           = 0;
13381
    pollindex           = 3;
13382
    pollvalue           = 0x53;
13383
    predelay            = 1;
13384
    postdelay           = 1;
13385
    pollmethod          = 1;
13386
 
13387
    pp_controlstack     =
13388
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
13389
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
13390
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
13391
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
13392
    hventerstabdelay    = 100;
13393
    progmodedelay       = 0;
13394
    latchcycles         = 5;
13395
    togglevtg           = 1;
13396
    poweroffdelay       = 15;
13397
    resetdelayms        = 1;
13398
    resetdelayus        = 0;
13399
    hvleavestabdelay    = 15;
13400
    chiperasepulsewidth = 0;
13401
    chiperasepolltimeout = 10;
13402
    programfusepulsewidth = 0;
13403
    programfusepolltimeout = 5;
13404
    programlockpulsewidth = 0;
13405
    programlockpolltimeout = 5;
13406
 
13407
    idr                 = 0x31;
13408
    spmcr               = 0x57;
13409
    allowfullpagebitstream = no;
13410
 
13411
    memory "eeprom"
13412
        paged           = no; /* leave this "no" */
13413
        page_size       = 4;  /* for parallel programming */
13414
        size            = 1024;
13415
        min_write_delay = 9000;
13416
        max_write_delay = 9000;
13417
        readback_p1     = 0xff;
13418
        readback_p2     = 0xff;
13419
        read            = "  1   0   1   0      0   0   0   0",
13420
                          "  0   0   0   0      0   0  a9  a8",
13421
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13422
                          "  o   o   o   o      o   o   o   o";
13423
 
13424
        write           = "  1   1   0   0      0   0   0   0",
13425
                          "  0   0   0   0      0   0  a9  a8",
13426
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13427
                          "  i   i   i   i      i   i   i   i";
13428
 
13429
        loadpage_lo     = "  1   1   0   0      0   0   0   1",
13430
                          "  0   0   0   0      0   0   0   0",
13431
                          "  0   0   0   0      0   0  a1  a0",
13432
                          "  i   i   i   i      i   i   i   i";
13433
 
13434
        writepage       = "  1   1   0   0      0   0   1   0",
13435
                          "  0   0   0   0      0   0  a9  a8",
13436
                          " a7  a6  a5  a4     a3  a2   0   0",
13437
                          "  x   x   x   x      x   x   x   x";
13438
 
13439
        mode            = 0x41;
13440
        delay           = 10;
13441
        blocksize       = 4;
13442
        readsize        = 256;
13443
      ;
13444
 
13445
    memory "flash"
13446
        paged           = yes;
13447
        size            = 32768;
13448
        page_size       = 128;
13449
        num_pages       = 256;
13450
        min_write_delay = 4500;
13451
        max_write_delay = 4500;
13452
        readback_p1     = 0xff;
13453
        readback_p2     = 0xff;
13454
        read_lo         = "  0   0   1   0      0   0   0   0",
13455
                          "  0 a14 a13 a12    a11 a10  a9  a8",
13456
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13457
                          "  o   o   o   o      o   o   o   o";
13458
 
13459
        read_hi         = "  0   0   1   0      1   0   0   0",
13460
                          "  0 a14 a13 a12    a11 a10  a9  a8",
13461
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13462
                          "  o   o   o   o      o   o   o   o";
13463
 
13464
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
13465
                          "  0   0   0   0      0   0   0   0",
13466
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13467
                          "  i   i   i   i      i   i   i   i";
13468
 
13469
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
13470
                          "  0   0   0   0      0   0   0   0",
13471
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13472
                          "  i   i   i   i      i   i   i   i";
13473
 
13474
        writepage       = "  0   1   0   0      1   1   0   0",
13475
                          "  0 a14 a13 a12    a11 a10  a9  a8",
13476
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13477
                          "  x   x   x   x      x   x   x   x";
13478
 
13479
        mode            = 0x41;
13480
        delay           = 10;
13481
        blocksize       = 128;
13482
        readsize        = 256;
13483
      ;
13484
 
13485
    memory "lock"
13486
        size            = 1;
13487
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
13488
                          "x x x x  x x x x   x x o o  o o o o";
13489
 
13490
        write           = "1 0 1 0  1 1 0 0   1 1 1 0  0 0 0 0",
13491
                          "0 0 0 0  0 0 0 0   1 1 i i  i i i i";
13492
        min_write_delay = 9000;
13493
        max_write_delay = 9000;
13494
      ;
13495
 
13496
    memory "lfuse"
13497
        size            = 1;
13498
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
13499
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
13500
 
13501
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
13502
                          "0 0 0 0  0 0 0 0   i i i i  i i i i";
13503
        min_write_delay = 9000;
13504
        max_write_delay = 9000;
13505
      ;
13506
 
13507
    memory "hfuse"
13508
        size            = 1;
13509
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
13510
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
13511
 
13512
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
13513
                          "0 0 0 0  0 0 0 0   i i i i  i i i i";
13514
        min_write_delay = 9000;
13515
        max_write_delay = 9000;
13516
      ;
13517
 
13518
    memory "efuse"
13519
        size            = 1;
13520
 
13521
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
13522
                          "0 0 0 0  0 0 0 0  o o o o  o o o o";
13523
 
13524
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
13525
                          "0 0 0 0  0 0 0 0  1 1 1 1  1 i i i";
13526
        min_write_delay = 9000;
13527
        max_write_delay = 9000;
13528
      ;
13529
 
13530
    memory "signature"
13531
        size            = 3;
13532
        read            = "0  0  1  1   0  0  0  0   0  0  0  0   0  0  0  0",
13533
                          "0  0  0  0   0  0 a1 a0   o  o  o  o   o  o  o  o";
13534
      ;
13535
 
13536
    memory "calibration"
13537
        size            = 1;
13538
 
13539
        read            = "0 0 1 1  1 0 0 0   0 0 0 0  0 0 0 0",
13540
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
13541
        ;
13542
  ;
13543
 
13544
#------------------------------------------------------------
13545
# ATmega6450
13546
#------------------------------------------------------------
13547
 
13548
part
13549
    id               = "m6450";
13550
    desc             = "ATMEGA6450";
13551
    signature        = 0x1E 0x96 0x06;
13552
    has_jtag         = yes;
13553
#   stk500_devcode   = 0x??; # No STK500v1 support?
13554
#   avr910_devcode   = 0x??; # Try the ATmega16 one
13555
    avr910_devcode   = 0x74;
13556
    pagel            = 0xd7;
13557
    bs2              = 0xa0;
13558
    chip_erase_delay = 9000;
13559
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
13560
                       "0 0 0 0  0 0 0 0    0 0 0 0  0 0 0 0";
13561
 
13562
    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
13563
                       "0 0 0 0  0 0 0 0    0 0 0 0  0 0 0 0";
13564
 
13565
    timeout             = 200;
13566
    stabdelay           = 100;
13567
    cmdexedelay         = 25;
13568
    synchloops          = 32;
13569
    bytedelay           = 0;
13570
    pollindex           = 3;
13571
    pollvalue           = 0x53;
13572
    predelay            = 1;
13573
    postdelay           = 1;
13574
    pollmethod          = 1;
13575
 
13576
    pp_controlstack     =
13577
        0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
13578
        0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
13579
        0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
13580
        0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
13581
    hventerstabdelay    = 100;
13582
    progmodedelay       = 0;
13583
    latchcycles         = 5;
13584
    togglevtg           = 1;
13585
    poweroffdelay       = 15;
13586
    resetdelayms        = 1;
13587
    resetdelayus        = 0;
13588
    hvleavestabdelay    = 15;
13589
    chiperasepulsewidth = 0;
13590
    chiperasepolltimeout = 10;
13591
    programfusepulsewidth = 0;
13592
    programfusepolltimeout = 5;
13593
    programlockpulsewidth = 0;
13594
    programlockpolltimeout = 5;
13595
 
13596
    idr                 = 0x31;
13597
    spmcr               = 0x57;
13598
    allowfullpagebitstream = no;
13599
 
13600
    memory "eeprom"
13601
        paged           = no; /* leave this "no" */
13602
        page_size       = 8;  /* for parallel programming */
13603
        size            = 2048;
13604
        min_write_delay = 9000;
13605
        max_write_delay = 9000;
13606
        readback_p1     = 0xff;
13607
        readback_p2     = 0xff;
13608
        read            = "  1   0   1   0      0   0   0   0",
13609
                          "  0   0   0   0      0 a10  a9  a8",
13610
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13611
                          "  o   o   o   o      o   o   o   o";
13612
 
13613
        write           = "  1   1   0   0      0   0   0   0",
13614
                          "  0   0   0   0      0 a10  a9  a8",
13615
                          " a7  a6  a5  a4     a3  a2  a1  a0",
13616
                          "  i   i   i   i      i   i   i   i";
13617
 
13618
        loadpage_lo     = "  1   1   0   0      0   0   0   1",
13619
                          "  0   0   0   0      0   0   0   0",
13620
                          "  0   0   0   0      0  a2  a1  a0",
13621
                          "  i   i   i   i      i   i   i   i";
13622
 
13623
        writepage       = "  1   1   0   0      0   0   1   0",
13624
                          "  0   0   0   0      0 a10  a9  a8",
13625
                          " a7  a6  a5  a4     a3   0   0   0",
13626
                          "  x   x   x   x      x   x   x   x";
13627
 
13628
        mode            = 0x41;
13629
        delay           = 10;
13630
        blocksize       = 4;
13631
        readsize        = 256;
13632
      ;
13633
 
13634
    memory "flash"
13635
        paged           = yes;
13636
        size            = 65536;
13637
        page_size       = 256;
13638
        num_pages       = 256;
13639
        min_write_delay = 4500;
13640
        max_write_delay = 4500;
13641
        readback_p1     = 0xff;
13642
        readback_p2     = 0xff;
13643
        read_lo         = "   0   0   1   0      0   0   0   0",
13644
                          " a15 a14 a13 a12    a11 a10  a9  a8",
13645
                          "  a7  a6  a5  a4     a3  a2  a1  a0",
13646
                          "   o   o   o   o      o   o   o   o";
13647
 
13648
        read_hi         = "   0   0   1   0      1   0   0   0",
13649
                          " a15 a14 a13 a12    a11 a10  a9  a8",
13650
                          "  a7  a6  a5  a4     a3  a2  a1  a0",
13651
                          "   o   o   o   o      o   o   o   o";
13652
 
13653
        loadpage_lo     = "  0   1   0   0      0   0   0   0",
13654
                          "  0   0   0   0      0   0   0   0",
13655
                          "  a7 a6  a5  a4     a3  a2  a1  a0",
13656
                          "  i   i   i   i      i   i   i   i";
13657
 
13658
        loadpage_hi     = "  0   1   0   0      1   0   0   0",
13659
                          "  0   0   0   0      0   0   0   0",
13660
                          "  a7 a6  a5  a4     a3  a2  a1  a0",
13661
                          "  i   i   i   i      i   i   i   i";
13662
 
13663
        writepage       = "   0   1   0   0      1   1   0   0",
13664
                          " a15 a14 a13 a12    a11 a10  a9  a8",
13665
                          "  a7  a6  a5  a4     a3  a2  a1  a0",
13666
                          "   0   0   0   0      0   0   0   0";
13667
 
13668
        mode            = 0x41;
13669
        delay           = 10;
13670
        blocksize       = 128;
13671
        readsize        = 256;
13672
      ;
13673
 
13674
    memory "lock"
13675
        size            = 1;
13676
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
13677
                          "x x x x  x x x x   x x o o  o o o o";
13678
 
13679
        write           = "1 0 1 0  1 1 0 0   1 1 1 0  0 0 0 0",
13680
                          "0 0 0 0  0 0 0 0   1 1 i i  i i i i";
13681
        min_write_delay = 9000;
13682
        max_write_delay = 9000;
13683
      ;
13684
 
13685
    memory "lfuse"
13686
        size            = 1;
13687
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
13688
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
13689
 
13690
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
13691
                          "0 0 0 0  0 0 0 0   i i i i  i i i i";
13692
        min_write_delay = 9000;
13693
        max_write_delay = 9000;
13694
      ;
13695
 
13696
    memory "hfuse"
13697
        size            = 1;
13698
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
13699
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
13700
 
13701
        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
13702
                          "0 0 0 0  0 0 0 0   i i i i  i i i i";
13703
        min_write_delay = 9000;
13704
        max_write_delay = 9000;
13705
      ;
13706
 
13707
    memory "efuse"
13708
        size            = 1;
13709
 
13710
        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
13711
                          "0 0 0 0  0 0 0 0  o o o o  o o o o";
13712
 
13713
        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
13714
                          "0 0 0 0  0 0 0 0  1 1 1 1  1 i i i";
13715
        min_write_delay = 9000;
13716
        max_write_delay = 9000;
13717
      ;
13718
 
13719
    memory "signature"
13720
        size            = 3;
13721
        read            = "0  0  1  1   0  0  0  0   0  0  0  0   0  0  0  0",
13722
                          "0  0  0  0   0  0 a1 a0   o  o  o  o   o  o  o  o";
13723
      ;
13724
 
13725
    memory "calibration"
13726
        size            = 1;
13727
 
13728
        read            = "0 0 1 1  1 0 0 0   0 0 0 0  0 0 0 0",
13729
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
13730
        ;
13731
  ;
13732
 
13733
#------------------------------------------------------------
13734
# ATXMEGA64A1
13735
#------------------------------------------------------------
13736
 
13737
part
13738
    id		= "x64a1";
13739
    desc	= "ATXMEGA64A1";
13740
    signature	= 0x1e 0x96 0x4e;
13741
    has_jtag	= yes;
13742
    has_pdi	= yes;
13743
    nvm_base	= 0x01c0;
13744
 
13745
    memory "eeprom"
13746
        size		= 0x0800;
13747
        offset		= 0x08c0000;
13748
        page_size	= 0x20;
13749
        readsize	= 0x100;
13750
    ;
13751
 
13752
    memory "application"
13753
        size		= 0x00010000;
13754
        offset		= 0x0800000;
13755
        page_size	= 0x100;
13756
        readsize	= 0x100;
13757
    ;
13758
 
13759
    memory "apptable"
13760
        size		= 0x00001000;
13761
        offset		= 0x0080f000;
13762
        page_size	= 0x100;
13763
        readsize	= 0x100;
13764
    ;
13765
 
13766
    memory "boot"
13767
        size		= 0x00001000;
13768
        offset		= 0x00810000;
13769
        page_size	= 0x100;
13770
        readsize	= 0x100;
13771
    ;
13772
 
13773
    memory "flash"
13774
        size		= 0x00011000;
13775
        offset		= 0x0800000;
13776
        page_size	= 0x100;
13777
        readsize	= 0x100;
13778
    ;
13779
 
13780
    memory "prodsig"
13781
        size		= 0x200;
13782
        offset		= 0x8e0200;
13783
        page_size	= 0x100;
13784
        readsize	= 0x100;
13785
    ;
13786
 
13787
    memory "usersig"
13788
        size		= 0x200;
13789
        offset		= 0x8e0400;
13790
        page_size	= 0x100;
13791
        readsize	= 0x100;
13792
    ;
13793
 
13794
    memory "signature"
13795
        size		= 3;
13796
        offset		= 0x1000090;
13797
    ;
13798
 
13799
    memory "fuse0"
13800
        size		= 1;
13801
        offset		= 0x8f0020;
13802
    ;
13803
 
13804
    memory "fuse1"
13805
        size		= 1;
13806
        offset		= 0x8f0021;
13807
    ;
13808
 
13809
    memory "fuse2"
13810
        size		= 1;
13811
        offset		= 0x8f0022;
13812
    ;
13813
 
13814
    memory "fuse4"
13815
        size		= 1;
13816
        offset		= 0x8f0024;
13817
    ;
13818
 
13819
    memory "fuse5"
13820
        size		= 1;
13821
        offset		= 0x8f0025;
13822
    ;
13823
 
13824
    memory "lock"
13825
        size		= 1;
13826
        offset		= 0x8f0027;
13827
    ;
13828
;
13829
 
13830
#------------------------------------------------------------
13831
# ATXMEGA128A1
13832
#------------------------------------------------------------
13833
 
13834
part
13835
    id		= "x128a1";
13836
    desc	= "ATXMEGA128A1";
13837
    signature	= 0x1e 0x97 0x4c;
13838
    has_jtag	= yes;
13839
    has_pdi	= yes;
13840
    nvm_base	= 0x01c0;
13841
 
13842
    memory "eeprom"
13843
        size		= 0x0800;
13844
        offset		= 0x08c0000;
13845
        page_size	= 0x20;
13846
        readsize	= 0x100;
13847
    ;
13848
 
13849
    memory "application"
13850
        size		= 0x00020000;
13851
        offset		= 0x0800000;
13852
        page_size	= 0x100;
13853
        readsize	= 0x100;
13854
    ;
13855
 
13856
    memory "apptable"
13857
        size		= 0x00002000;
13858
        offset		= 0x0081e000;
13859
        page_size	= 0x100;
13860
        readsize	= 0x100;
13861
    ;
13862
 
13863
    memory "boot"
13864
        size		= 0x00002000;
13865
        offset		= 0x00820000;
13866
        page_size	= 0x100;
13867
        readsize	= 0x100;
13868
    ;
13869
 
13870
    memory "flash"
13871
        size		= 0x00022000;
13872
        offset		= 0x0800000;
13873
        page_size	= 0x100;
13874
        readsize	= 0x100;
13875
    ;
13876
 
13877
    memory "prodsig"
13878
        size		= 0x200;
13879
        offset		= 0x8e0200;
13880
        page_size	= 0x100;
13881
        readsize	= 0x100;
13882
    ;
13883
 
13884
    memory "usersig"
13885
        size		= 0x200;
13886
        offset		= 0x8e0400;
13887
        page_size	= 0x100;
13888
        readsize	= 0x100;
13889
    ;
13890
 
13891
    memory "signature"
13892
        size		= 3;
13893
        offset		= 0x1000090;
13894
    ;
13895
 
13896
    memory "fuse0"
13897
        size		= 1;
13898
        offset		= 0x8f0020;
13899
    ;
13900
 
13901
    memory "fuse1"
13902
        size		= 1;
13903
        offset		= 0x8f0021;
13904
    ;
13905
 
13906
    memory "fuse2"
13907
        size		= 1;
13908
        offset		= 0x8f0022;
13909
    ;
13910
 
13911
    memory "fuse4"
13912
        size		= 1;
13913
        offset		= 0x8f0024;
13914
    ;
13915
 
13916
    memory "fuse5"
13917
        size		= 1;
13918
        offset		= 0x8f0025;
13919
    ;
13920
 
13921
    memory "lock"
13922
        size		= 1;
13923
        offset		= 0x8f0027;
13924
    ;
13925
;
13926
 
13927
#------------------------------------------------------------
13928
# ATXMEGA128A1REVD
13929
#------------------------------------------------------------
13930
 
13931
part
13932
    id		= "x128a1d";
13933
    desc	= "ATXMEGA128A1REVD";
13934
    signature	= 0x1e 0x97 0x41;
13935
    has_jtag	= yes;
13936
    has_pdi	= yes;
13937
    nvm_base	= 0x01c0;
13938
 
13939
    memory "eeprom"
13940
        size		= 0x0800;
13941
        offset		= 0x08c0000;
13942
        page_size	= 0x20;
13943
        readsize	= 0x100;
13944
    ;
13945
 
13946
    memory "application"
13947
        size		= 0x00020000;
13948
        offset		= 0x0800000;
13949
        page_size	= 0x100;
13950
        readsize	= 0x100;
13951
    ;
13952
 
13953
    memory "apptable"
13954
        size		= 0x00002000;
13955
        offset		= 0x0081e000;
13956
        page_size	= 0x100;
13957
        readsize	= 0x100;
13958
    ;
13959
 
13960
    memory "boot"
13961
        size		= 0x00002000;
13962
        offset		= 0x00820000;
13963
        page_size	= 0x100;
13964
        readsize	= 0x100;
13965
    ;
13966
 
13967
    memory "flash"
13968
        size		= 0x00022000;
13969
        offset		= 0x0800000;
13970
        page_size	= 0x100;
13971
        readsize	= 0x100;
13972
    ;
13973
 
13974
    memory "prodsig"
13975
        size		= 0x200;
13976
        offset		= 0x8e0200;
13977
        page_size	= 0x100;
13978
        readsize	= 0x100;
13979
    ;
13980
 
13981
    memory "usersig"
13982
        size		= 0x200;
13983
        offset		= 0x8e0400;
13984
        page_size	= 0x100;
13985
        readsize	= 0x100;
13986
    ;
13987
 
13988
    memory "signature"
13989
        size		= 3;
13990
        offset		= 0x1000090;
13991
    ;
13992
 
13993
    memory "fuse0"
13994
        size		= 1;
13995
        offset		= 0x8f0020;
13996
    ;
13997
 
13998
    memory "fuse1"
13999
        size		= 1;
14000
        offset		= 0x8f0021;
14001
    ;
14002
 
14003
    memory "fuse2"
14004
        size		= 1;
14005
        offset		= 0x8f0022;
14006
    ;
14007
 
14008
    memory "fuse4"
14009
        size		= 1;
14010
        offset		= 0x8f0024;
14011
    ;
14012
 
14013
    memory "fuse5"
14014
        size		= 1;
14015
        offset		= 0x8f0025;
14016
    ;
14017
 
14018
    memory "lock"
14019
        size		= 1;
14020
        offset		= 0x8f0027;
14021
    ;
14022
;
14023
 
14024
#------------------------------------------------------------
14025
# ATXMEGA192A1
14026
#------------------------------------------------------------
14027
 
14028
part
14029
    id		= "x192a1";
14030
    desc	= "ATXMEGA192A1";
14031
    signature	= 0x1e 0x97 0x4e;
14032
    has_jtag	= yes;
14033
    has_pdi	= yes;
14034
    nvm_base	= 0x01c0;
14035
 
14036
    memory "eeprom"
14037
        size		= 0x0800;
14038
        offset		= 0x08c0000;
14039
        page_size	= 0x20;
14040
        readsize	= 0x100;
14041
    ;
14042
 
14043
    memory "application"
14044
        size		= 0x00030000;
14045
        offset		= 0x0800000;
14046
        page_size	= 0x100;
14047
        readsize	= 0x100;
14048
    ;
14049
 
14050
    memory "apptable"
14051
        size		= 0x00002000;
14052
        offset		= 0x0082e000;
14053
        page_size	= 0x100;
14054
        readsize	= 0x100;
14055
    ;
14056
 
14057
    memory "boot"
14058
        size		= 0x00002000;
14059
        offset		= 0x00830000;
14060
        page_size	= 0x100;
14061
        readsize	= 0x100;
14062
    ;
14063
 
14064
    memory "flash"
14065
        size		= 0x00032000;
14066
        offset		= 0x0800000;
14067
        page_size	= 0x100;
14068
        readsize	= 0x100;
14069
    ;
14070
 
14071
    memory "prodsig"
14072
        size		= 0x200;
14073
        offset		= 0x8e0200;
14074
        page_size	= 0x100;
14075
        readsize	= 0x100;
14076
    ;
14077
 
14078
    memory "usersig"
14079
        size		= 0x200;
14080
        offset		= 0x8e0400;
14081
        page_size	= 0x100;
14082
        readsize	= 0x100;
14083
    ;
14084
 
14085
    memory "signature"
14086
        size		= 3;
14087
        offset		= 0x1000090;
14088
    ;
14089
 
14090
    memory "fuse0"
14091
        size		= 1;
14092
        offset		= 0x8f0020;
14093
    ;
14094
 
14095
    memory "fuse1"
14096
        size		= 1;
14097
        offset		= 0x8f0021;
14098
    ;
14099
 
14100
    memory "fuse2"
14101
        size		= 1;
14102
        offset		= 0x8f0022;
14103
    ;
14104
 
14105
    memory "fuse4"
14106
        size		= 1;
14107
        offset		= 0x8f0024;
14108
    ;
14109
 
14110
    memory "fuse5"
14111
        size		= 1;
14112
        offset		= 0x8f0025;
14113
    ;
14114
 
14115
    memory "lock"
14116
        size		= 1;
14117
        offset		= 0x8f0027;
14118
    ;
14119
;
14120
 
14121
#------------------------------------------------------------
14122
# ATXMEGA256A1
14123
#------------------------------------------------------------
14124
 
14125
part
14126
    id		= "x256a1";
14127
    desc	= "ATXMEGA256A1";
14128
    signature	= 0x1e 0x98 0x46;
14129
    has_jtag	= yes;
14130
    has_pdi	= yes;
14131
    nvm_base	= 0x01c0;
14132
 
14133
    memory "eeprom"
14134
        size		= 0x1000;
14135
        offset		= 0x08c0000;
14136
        page_size	= 0x20;
14137
        readsize	= 0x100;
14138
    ;
14139
 
14140
    memory "application"
14141
        size		= 0x00040000;
14142
        offset		= 0x0800000;
14143
        page_size	= 0x100;
14144
        readsize	= 0x100;
14145
    ;
14146
 
14147
    memory "apptable"
14148
        size		= 0x00002000;
14149
        offset		= 0x0083e000;
14150
        page_size	= 0x100;
14151
        readsize	= 0x100;
14152
    ;
14153
 
14154
    memory "boot"
14155
        size		= 0x00002000;
14156
        offset		= 0x00840000;
14157
        page_size	= 0x100;
14158
        readsize	= 0x100;
14159
    ;
14160
 
14161
    memory "flash"
14162
        size		= 0x00042000;
14163
        offset		= 0x0800000;
14164
        page_size	= 0x100;
14165
        readsize	= 0x100;
14166
    ;
14167
 
14168
    memory "prodsig"
14169
        size		= 0x200;
14170
        offset		= 0x8e0200;
14171
        page_size	= 0x100;
14172
        readsize	= 0x100;
14173
    ;
14174
 
14175
    memory "usersig"
14176
        size		= 0x200;
14177
        offset		= 0x8e0400;
14178
        page_size	= 0x100;
14179
        readsize	= 0x100;
14180
    ;
14181
 
14182
    memory "signature"
14183
        size		= 3;
14184
        offset		= 0x1000090;
14185
    ;
14186
 
14187
    memory "fuse0"
14188
        size		= 1;
14189
        offset		= 0x8f0020;
14190
    ;
14191
 
14192
    memory "fuse1"
14193
        size		= 1;
14194
        offset		= 0x8f0021;
14195
    ;
14196
 
14197
    memory "fuse2"
14198
        size		= 1;
14199
        offset		= 0x8f0022;
14200
    ;
14201
 
14202
    memory "fuse4"
14203
        size		= 1;
14204
        offset		= 0x8f0024;
14205
    ;
14206
 
14207
    memory "fuse5"
14208
        size		= 1;
14209
        offset		= 0x8f0025;
14210
    ;
14211
 
14212
    memory "lock"
14213
        size		= 1;
14214
        offset		= 0x8f0027;
14215
    ;
14216
;
14217
 
14218
#------------------------------------------------------------
14219
# ATXMEGA64A3
14220
#------------------------------------------------------------
14221
 
14222
part
14223
    id		= "x64a3";
14224
    desc	= "ATXMEGA64A3";
14225
    signature	= 0x1e 0x96 0x42;
14226
    has_jtag	= yes;
14227
    has_pdi	= yes;
14228
    nvm_base	= 0x01c0;
14229
 
14230
    memory "eeprom"
14231
        size		= 0x0800;
14232
        offset		= 0x08c0000;
14233
        page_size	= 0x20;
14234
        readsize	= 0x100;
14235
    ;
14236
 
14237
    memory "application"
14238
        size		= 0x00010000;
14239
        offset		= 0x0800000;
14240
        page_size	= 0x100;
14241
        readsize	= 0x100;
14242
    ;
14243
 
14244
    memory "apptable"
14245
        size		= 0x00001000;
14246
        offset		= 0x0080f000;
14247
        page_size	= 0x100;
14248
        readsize	= 0x100;
14249
    ;
14250
 
14251
    memory "boot"
14252
        size		= 0x00001000;
14253
        offset		= 0x00810000;
14254
        page_size	= 0x100;
14255
        readsize	= 0x100;
14256
    ;
14257
 
14258
    memory "flash"
14259
        size		= 0x00011000;
14260
        offset		= 0x0800000;
14261
        page_size	= 0x100;
14262
        readsize	= 0x100;
14263
    ;
14264
 
14265
    memory "prodsig"
14266
        size		= 0x200;
14267
        offset		= 0x8e0200;
14268
        page_size	= 0x100;
14269
        readsize	= 0x100;
14270
    ;
14271
 
14272
    memory "usersig"
14273
        size		= 0x200;
14274
        offset		= 0x8e0400;
14275
        page_size	= 0x100;
14276
        readsize	= 0x100;
14277
    ;
14278
 
14279
    memory "signature"
14280
        size		= 3;
14281
        offset		= 0x1000090;
14282
    ;
14283
 
14284
    memory "fuse0"
14285
        size		= 1;
14286
        offset		= 0x8f0020;
14287
    ;
14288
 
14289
    memory "fuse1"
14290
        size		= 1;
14291
        offset		= 0x8f0021;
14292
    ;
14293
 
14294
    memory "fuse2"
14295
        size		= 1;
14296
        offset		= 0x8f0022;
14297
    ;
14298
 
14299
    memory "fuse4"
14300
        size		= 1;
14301
        offset		= 0x8f0024;
14302
    ;
14303
 
14304
    memory "fuse5"
14305
        size		= 1;
14306
        offset		= 0x8f0025;
14307
    ;
14308
 
14309
    memory "lock"
14310
        size		= 1;
14311
        offset		= 0x8f0027;
14312
    ;
14313
;
14314
 
14315
#------------------------------------------------------------
14316
# ATXMEGA128A3
14317
#------------------------------------------------------------
14318
 
14319
part
14320
    id		= "x128a3";
14321
    desc	= "ATXMEGA128A3";
14322
    signature	= 0x1e 0x97 0x42;
14323
    has_jtag	= yes;
14324
    has_pdi	= yes;
14325
    nvm_base	= 0x01c0;
14326
 
14327
    memory "eeprom"
14328
        size		= 0x0800;
14329
        offset		= 0x08c0000;
14330
        page_size	= 0x20;
14331
        readsize	= 0x100;
14332
    ;
14333
 
14334
    memory "application"
14335
        size		= 0x00020000;
14336
        offset		= 0x0800000;
14337
        page_size	= 0x100;
14338
        readsize	= 0x100;
14339
    ;
14340
 
14341
    memory "apptable"
14342
        size		= 0x00002000;
14343
        offset		= 0x0081e000;
14344
        page_size	= 0x100;
14345
        readsize	= 0x100;
14346
    ;
14347
 
14348
    memory "boot"
14349
        size		= 0x00002000;
14350
        offset		= 0x00820000;
14351
        page_size	= 0x100;
14352
        readsize	= 0x100;
14353
    ;
14354
 
14355
    memory "flash"
14356
        size		= 0x00022000;
14357
        offset		= 0x0800000;
14358
        page_size	= 0x100;
14359
        readsize	= 0x100;
14360
    ;
14361
 
14362
    memory "prodsig"
14363
        size		= 0x200;
14364
        offset		= 0x8e0200;
14365
        page_size	= 0x100;
14366
        readsize	= 0x100;
14367
    ;
14368
 
14369
    memory "usersig"
14370
        size		= 0x200;
14371
        offset		= 0x8e0400;
14372
        page_size	= 0x100;
14373
        readsize	= 0x100;
14374
    ;
14375
 
14376
    memory "signature"
14377
        size		= 3;
14378
        offset		= 0x1000090;
14379
    ;
14380
 
14381
    memory "fuse0"
14382
        size		= 1;
14383
        offset		= 0x8f0020;
14384
    ;
14385
 
14386
    memory "fuse1"
14387
        size		= 1;
14388
        offset		= 0x8f0021;
14389
    ;
14390
 
14391
    memory "fuse2"
14392
        size		= 1;
14393
        offset		= 0x8f0022;
14394
    ;
14395
 
14396
    memory "fuse4"
14397
        size		= 1;
14398
        offset		= 0x8f0024;
14399
    ;
14400
 
14401
    memory "fuse5"
14402
        size		= 1;
14403
        offset		= 0x8f0025;
14404
    ;
14405
 
14406
    memory "lock"
14407
        size		= 1;
14408
        offset		= 0x8f0027;
14409
    ;
14410
;
14411
 
14412
#------------------------------------------------------------
14413
# ATXMEGA192A3
14414
#------------------------------------------------------------
14415
 
14416
part
14417
    id		= "x192a3";
14418
    desc	= "ATXMEGA192A3";
14419
    signature	= 0x1e 0x97 0x44;
14420
    has_jtag	= yes;
14421
    has_pdi	= yes;
14422
    nvm_base	= 0x01c0;
14423
 
14424
    memory "eeprom"
14425
        size		= 0x0800;
14426
        offset		= 0x08c0000;
14427
        page_size	= 0x20;
14428
        readsize	= 0x100;
14429
    ;
14430
 
14431
    memory "application"
14432
        size		= 0x00030000;
14433
        offset		= 0x0800000;
14434
        page_size	= 0x100;
14435
        readsize	= 0x100;
14436
    ;
14437
 
14438
    memory "apptable"
14439
        size		= 0x00002000;
14440
        offset		= 0x0082e000;
14441
        page_size	= 0x100;
14442
        readsize	= 0x100;
14443
    ;
14444
 
14445
    memory "boot"
14446
        size		= 0x00002000;
14447
        offset		= 0x00830000;
14448
        page_size	= 0x100;
14449
        readsize	= 0x100;
14450
    ;
14451
 
14452
    memory "flash"
14453
        size		= 0x00032000;
14454
        offset		= 0x0800000;
14455
        page_size	= 0x100;
14456
        readsize	= 0x100;
14457
    ;
14458
 
14459
    memory "prodsig"
14460
        size		= 0x200;
14461
        offset		= 0x8e0200;
14462
        page_size	= 0x100;
14463
        readsize	= 0x100;
14464
    ;
14465
 
14466
    memory "usersig"
14467
        size		= 0x200;
14468
        offset		= 0x8e0400;
14469
        page_size	= 0x100;
14470
        readsize	= 0x100;
14471
    ;
14472
 
14473
    memory "signature"
14474
        size		= 3;
14475
        offset		= 0x1000090;
14476
    ;
14477
 
14478
    memory "fuse0"
14479
        size		= 1;
14480
        offset		= 0x8f0020;
14481
    ;
14482
 
14483
    memory "fuse1"
14484
        size		= 1;
14485
        offset		= 0x8f0021;
14486
    ;
14487
 
14488
    memory "fuse2"
14489
        size		= 1;
14490
        offset		= 0x8f0022;
14491
    ;
14492
 
14493
    memory "fuse4"
14494
        size		= 1;
14495
        offset		= 0x8f0024;
14496
    ;
14497
 
14498
    memory "fuse5"
14499
        size		= 1;
14500
        offset		= 0x8f0025;
14501
    ;
14502
 
14503
    memory "lock"
14504
        size		= 1;
14505
        offset		= 0x8f0027;
14506
    ;
14507
;
14508
 
14509
#------------------------------------------------------------
14510
# ATXMEGA256A3
14511
#------------------------------------------------------------
14512
 
14513
part
14514
    id		= "x256a3";
14515
    desc	= "ATXMEGA256A3";
14516
    signature	= 0x1e 0x98 0x42;
14517
    has_jtag	= yes;
14518
    has_pdi	= yes;
14519
    nvm_base	= 0x01c0;
14520
 
14521
    memory "eeprom"
14522
        size		= 0x1000;
14523
        offset		= 0x08c0000;
14524
        page_size	= 0x20;
14525
        readsize	= 0x100;
14526
    ;
14527
 
14528
    memory "application"
14529
        size		= 0x00040000;
14530
        offset		= 0x0800000;
14531
        page_size	= 0x100;
14532
        readsize	= 0x100;
14533
    ;
14534
 
14535
    memory "apptable"
14536
        size		= 0x00002000;
14537
        offset		= 0x0083e000;
14538
        page_size	= 0x100;
14539
        readsize	= 0x100;
14540
    ;
14541
 
14542
    memory "boot"
14543
        size		= 0x00002000;
14544
        offset		= 0x00840000;
14545
        page_size	= 0x100;
14546
        readsize	= 0x100;
14547
    ;
14548
 
14549
    memory "flash"
14550
        size		= 0x00042000;
14551
        offset		= 0x0800000;
14552
        page_size	= 0x100;
14553
        readsize	= 0x100;
14554
    ;
14555
 
14556
    memory "prodsig"
14557
        size		= 0x200;
14558
        offset		= 0x8e0200;
14559
        page_size	= 0x100;
14560
        readsize	= 0x100;
14561
    ;
14562
 
14563
    memory "usersig"
14564
        size		= 0x200;
14565
        offset		= 0x8e0400;
14566
        page_size	= 0x100;
14567
        readsize	= 0x100;
14568
    ;
14569
 
14570
    memory "signature"
14571
        size		= 3;
14572
        offset		= 0x1000090;
14573
    ;
14574
 
14575
    memory "fuse0"
14576
        size		= 1;
14577
        offset		= 0x8f0020;
14578
    ;
14579
 
14580
    memory "fuse1"
14581
        size		= 1;
14582
        offset		= 0x8f0021;
14583
    ;
14584
 
14585
    memory "fuse2"
14586
        size		= 1;
14587
        offset		= 0x8f0022;
14588
    ;
14589
 
14590
    memory "fuse4"
14591
        size		= 1;
14592
        offset		= 0x8f0024;
14593
    ;
14594
 
14595
    memory "fuse5"
14596
        size		= 1;
14597
        offset		= 0x8f0025;
14598
    ;
14599
 
14600
    memory "lock"
14601
        size		= 1;
14602
        offset		= 0x8f0027;
14603
    ;
14604
;
14605
 
14606
#------------------------------------------------------------
14607
# ATXMEGA256A3B
14608
#------------------------------------------------------------
14609
 
14610
part
14611
    id		= "x256a3b";
14612
    desc	= "ATXMEGA256A3B";
14613
    signature	= 0x1e 0x98 0x43;
14614
    has_jtag	= yes;
14615
    has_pdi	= yes;
14616
    nvm_base	= 0x01c0;
14617
 
14618
    memory "eeprom"
14619
        size		= 0x1000;
14620
        offset		= 0x08c0000;
14621
        page_size	= 0x20;
14622
        readsize	= 0x100;
14623
    ;
14624
 
14625
    memory "application"
14626
        size		= 0x00040000;
14627
        offset		= 0x0800000;
14628
        page_size	= 0x100;
14629
        readsize	= 0x100;
14630
    ;
14631
 
14632
    memory "apptable"
14633
        size		= 0x00002000;
14634
        offset		= 0x0083e000;
14635
        page_size	= 0x100;
14636
        readsize	= 0x100;
14637
    ;
14638
 
14639
    memory "boot"
14640
        size		= 0x00002000;
14641
        offset		= 0x00840000;
14642
        page_size	= 0x100;
14643
        readsize	= 0x100;
14644
    ;
14645
 
14646
    memory "flash"
14647
        size		= 0x00042000;
14648
        offset		= 0x0800000;
14649
        page_size	= 0x100;
14650
        readsize	= 0x100;
14651
    ;
14652
 
14653
    memory "prodsig"
14654
        size		= 0x200;
14655
        offset		= 0x8e0200;
14656
        page_size	= 0x100;
14657
        readsize	= 0x100;
14658
    ;
14659
 
14660
    memory "usersig"
14661
        size		= 0x200;
14662
        offset		= 0x8e0400;
14663
        page_size	= 0x100;
14664
        readsize	= 0x100;
14665
    ;
14666
 
14667
    memory "signature"
14668
        size		= 3;
14669
        offset		= 0x1000090;
14670
    ;
14671
 
14672
    memory "fuse0"
14673
        size		= 1;
14674
        offset		= 0x8f0020;
14675
    ;
14676
 
14677
    memory "fuse1"
14678
        size		= 1;
14679
        offset		= 0x8f0021;
14680
    ;
14681
 
14682
    memory "fuse2"
14683
        size		= 1;
14684
        offset		= 0x8f0022;
14685
    ;
14686
 
14687
    memory "fuse4"
14688
        size		= 1;
14689
        offset		= 0x8f0024;
14690
    ;
14691
 
14692
    memory "fuse5"
14693
        size		= 1;
14694
        offset		= 0x8f0025;
14695
    ;
14696
 
14697
    memory "lock"
14698
        size		= 1;
14699
        offset		= 0x8f0027;
14700
    ;
14701
;
14702
 
14703
#------------------------------------------------------------
14704
# ATXMEGA16A4
14705
#------------------------------------------------------------
14706
 
14707
part
14708
    id		= "x16a4";
14709
    desc	= "ATXMEGA16A4";
14710
    signature	= 0x1e 0x94 0x41;
14711
    has_jtag	= yes;
14712
    has_pdi	= yes;
14713
    nvm_base	= 0x01c0;
14714
 
14715
    memory "eeprom"
14716
        size		= 0x0400;
14717
        offset		= 0x08c0000;
14718
        page_size	= 0x20;
14719
        readsize	= 0x100;
14720
    ;
14721
 
14722
    memory "application"
14723
        size		= 0x00004000;
14724
        offset		= 0x0800000;
14725
        page_size	= 0x100;
14726
        readsize	= 0x100;
14727
    ;
14728
 
14729
    memory "apptable"
14730
        size		= 0x00001000;
14731
        offset		= 0x00803000;
14732
        page_size	= 0x100;
14733
        readsize	= 0x100;
14734
    ;
14735
 
14736
    memory "boot"
14737
        size		= 0x00001000;
14738
        offset		= 0x00804000;
14739
        page_size	= 0x100;
14740
        readsize	= 0x100;
14741
    ;
14742
 
14743
    memory "flash"
14744
        size		= 0x00005000;
14745
        offset		= 0x0800000;
14746
        page_size	= 0x100;
14747
        readsize	= 0x100;
14748
    ;
14749
 
14750
    memory "prodsig"
14751
        size		= 0x200;
14752
        offset		= 0x8e0200;
14753
        page_size	= 0x100;
14754
        readsize	= 0x100;
14755
    ;
14756
 
14757
    memory "usersig"
14758
        size		= 0x200;
14759
        offset		= 0x8e0400;
14760
        page_size	= 0x100;
14761
        readsize	= 0x100;
14762
    ;
14763
 
14764
    memory "signature"
14765
        size		= 3;
14766
        offset		= 0x1000090;
14767
    ;
14768
 
14769
    memory "fuse0"
14770
        size		= 1;
14771
        offset		= 0x8f0020;
14772
    ;
14773
 
14774
    memory "fuse1"
14775
        size		= 1;
14776
        offset		= 0x8f0021;
14777
    ;
14778
 
14779
    memory "fuse2"
14780
        size		= 1;
14781
        offset		= 0x8f0022;
14782
    ;
14783
 
14784
    memory "fuse4"
14785
        size		= 1;
14786
        offset		= 0x8f0024;
14787
    ;
14788
 
14789
    memory "fuse5"
14790
        size		= 1;
14791
        offset		= 0x8f0025;
14792
    ;
14793
 
14794
    memory "lock"
14795
        size		= 1;
14796
        offset		= 0x8f0027;
14797
    ;
14798
;
14799
 
14800
#------------------------------------------------------------
14801
# ATXMEGA32A4
14802
#------------------------------------------------------------
14803
 
14804
part
14805
    id		= "x32a4";
14806
    desc	= "ATXMEGA32A4";
14807
    signature	= 0x1e 0x95 0x41;
14808
    has_jtag	= yes;
14809
    has_pdi	= yes;
14810
    nvm_base	= 0x01c0;
14811
 
14812
    memory "eeprom"
14813
        size		= 0x0400;
14814
        offset		= 0x08c0000;
14815
        page_size	= 0x20;
14816
        readsize	= 0x100;
14817
    ;
14818
 
14819
    memory "application"
14820
        size		= 0x00008000;
14821
        offset		= 0x0800000;
14822
        page_size	= 0x100;
14823
        readsize	= 0x100;
14824
    ;
14825
 
14826
    memory "apptable"
14827
        size		= 0x00001000;
14828
        offset		= 0x00807000;
14829
        page_size	= 0x100;
14830
        readsize	= 0x100;
14831
    ;
14832
 
14833
    memory "boot"
14834
        size		= 0x00001000;
14835
        offset		= 0x00808000;
14836
        page_size	= 0x100;
14837
        readsize	= 0x100;
14838
    ;
14839
 
14840
    memory "flash"
14841
        size		= 0x00009000;
14842
        offset		= 0x0800000;
14843
        page_size	= 0x100;
14844
        readsize	= 0x100;
14845
    ;
14846
 
14847
    memory "prodsig"
14848
        size		= 0x200;
14849
        offset		= 0x8e0200;
14850
        page_size	= 0x100;
14851
        readsize	= 0x100;
14852
    ;
14853
 
14854
    memory "usersig"
14855
        size		= 0x200;
14856
        offset		= 0x8e0400;
14857
        page_size	= 0x100;
14858
        readsize	= 0x100;
14859
    ;
14860
 
14861
    memory "signature"
14862
        size		= 3;
14863
        offset		= 0x1000090;
14864
    ;
14865
 
14866
    memory "fuse0"
14867
        size		= 1;
14868
        offset		= 0x8f0020;
14869
    ;
14870
 
14871
    memory "fuse1"
14872
        size		= 1;
14873
        offset		= 0x8f0021;
14874
    ;
14875
 
14876
    memory "fuse2"
14877
        size		= 1;
14878
        offset		= 0x8f0022;
14879
    ;
14880
 
14881
    memory "fuse4"
14882
        size		= 1;
14883
        offset		= 0x8f0024;
14884
    ;
14885
 
14886
    memory "fuse5"
14887
        size		= 1;
14888
        offset		= 0x8f0025;
14889
    ;
14890
 
14891
    memory "lock"
14892
        size		= 1;
14893
        offset		= 0x8f0027;
14894
    ;
14895
;
14896
 
14897
#------------------------------------------------------------
14898
# ATXMEGA64A4
14899
#------------------------------------------------------------
14900
 
14901
part
14902
    id		= "x64a4";
14903
    desc	= "ATXMEGA64A4";
14904
    signature	= 0x1e 0x96 0x46;
14905
    has_jtag	= yes;
14906
    has_pdi	= yes;
14907
    nvm_base	= 0x01c0;
14908
 
14909
    memory "eeprom"
14910
        size		= 0x0800;
14911
        offset		= 0x08c0000;
14912
        page_size	= 0x20;
14913
        readsize	= 0x100;
14914
    ;
14915
 
14916
    memory "application"
14917
        size		= 0x00010000;
14918
        offset		= 0x0800000;
14919
        page_size	= 0x100;
14920
        readsize	= 0x100;
14921
    ;
14922
 
14923
    memory "apptable"
14924
        size		= 0x00001000;
14925
        offset		= 0x0080f000;
14926
        page_size	= 0x100;
14927
        readsize	= 0x100;
14928
    ;
14929
 
14930
    memory "boot"
14931
        size		= 0x00001000;
14932
        offset		= 0x00810000;
14933
        page_size	= 0x100;
14934
        readsize	= 0x100;
14935
    ;
14936
 
14937
    memory "flash"
14938
        size		= 0x00011000;
14939
        offset		= 0x0800000;
14940
        page_size	= 0x100;
14941
        readsize	= 0x100;
14942
    ;
14943
 
14944
    memory "prodsig"
14945
        size		= 0x200;
14946
        offset		= 0x8e0200;
14947
        page_size	= 0x100;
14948
        readsize	= 0x100;
14949
    ;
14950
 
14951
    memory "usersig"
14952
        size		= 0x200;
14953
        offset		= 0x8e0400;
14954
        page_size	= 0x100;
14955
        readsize	= 0x100;
14956
    ;
14957
 
14958
    memory "signature"
14959
        size		= 3;
14960
        offset		= 0x1000090;
14961
    ;
14962
 
14963
    memory "fuse0"
14964
        size		= 1;
14965
        offset		= 0x8f0020;
14966
    ;
14967
 
14968
    memory "fuse1"
14969
        size		= 1;
14970
        offset		= 0x8f0021;
14971
    ;
14972
 
14973
    memory "fuse2"
14974
        size		= 1;
14975
        offset		= 0x8f0022;
14976
    ;
14977
 
14978
    memory "fuse4"
14979
        size		= 1;
14980
        offset		= 0x8f0024;
14981
    ;
14982
 
14983
    memory "fuse5"
14984
        size		= 1;
14985
        offset		= 0x8f0025;
14986
    ;
14987
 
14988
    memory "lock"
14989
        size		= 1;
14990
        offset		= 0x8f0027;
14991
    ;
14992
;
14993
 
14994
#------------------------------------------------------------
14995
# ATXMEGA128A4
14996
#------------------------------------------------------------
14997
 
14998
part
14999
    id		= "x128a4";
15000
    desc	= "ATXMEGA128A4";
15001
    signature	= 0x1e 0x97 0x46;
15002
    has_jtag	= yes;
15003
    has_pdi	= yes;
15004
    nvm_base	= 0x01c0;
15005
 
15006
    memory "eeprom"
15007
        size		= 0x0800;
15008
        offset		= 0x08c0000;
15009
        page_size	= 0x20;
15010
        readsize	= 0x100;
15011
    ;
15012
 
15013
    memory "application"
15014
        size		= 0x00020000;
15015
        offset		= 0x0800000;
15016
        page_size	= 0x100;
15017
        readsize	= 0x100;
15018
    ;
15019
 
15020
    memory "apptable"
15021
        size		= 0x00002000;
15022
        offset		= 0x0081e000;
15023
        page_size	= 0x100;
15024
        readsize	= 0x100;
15025
    ;
15026
 
15027
    memory "boot"
15028
        size		= 0x00002000;
15029
        offset		= 0x00820000;
15030
        page_size	= 0x100;
15031
        readsize	= 0x100;
15032
    ;
15033
 
15034
    memory "flash"
15035
        size		= 0x00022000;
15036
        offset		= 0x0800000;
15037
        page_size	= 0x100;
15038
        readsize	= 0x100;
15039
    ;
15040
 
15041
    memory "prodsig"
15042
        size		= 0x200;
15043
        offset		= 0x8e0200;
15044
        page_size	= 0x100;
15045
        readsize	= 0x100;
15046
    ;
15047
 
15048
    memory "usersig"
15049
        size		= 0x200;
15050
        offset		= 0x8e0400;
15051
        page_size	= 0x100;
15052
        readsize	= 0x100;
15053
    ;
15054
 
15055
    memory "signature"
15056
        size		= 3;
15057
        offset		= 0x1000090;
15058
    ;
15059
 
15060
    memory "fuse0"
15061
        size		= 1;
15062
        offset		= 0x8f0020;
15063
    ;
15064
 
15065
    memory "fuse1"
15066
        size		= 1;
15067
        offset		= 0x8f0021;
15068
    ;
15069
 
15070
    memory "fuse2"
15071
        size		= 1;
15072
        offset		= 0x8f0022;
15073
    ;
15074
 
15075
    memory "fuse4"
15076
        size		= 1;
15077
        offset		= 0x8f0024;
15078
    ;
15079
 
15080
    memory "fuse5"
15081
        size		= 1;
15082
        offset		= 0x8f0025;
15083
    ;
15084
 
15085
    memory "lock"
15086
        size		= 1;
15087
        offset		= 0x8f0027;
15088
    ;
15089
;
15090
 
15091
 
15092
#------------------------------------------------------------
15093
# AVR32UC3A0512
15094
#------------------------------------------------------------
15095
 
15096
part
15097
    id		= "ucr2";
15098
    desc	= "32UC3A0512";
15099
    signature	= 0xED 0xC0 0x3F;
15100
    has_jtag	= yes;
15101
    is_avr32    = yes;
15102
 
15103
    memory "flash"
15104
        paged           = yes;
15105
        page_size		= 512;               # bytes
15106
        readsize		= 512;				 # bytes
15107
        num_pages       = 1024;              # could be set dynamicly
15108
        size			= 0x00080000;		 # could be set dynamicly
15109
        offset			= 0x80000000;
15110
    ;
15111
;
15112
 
15113
#------------------------------------------------------------
15114
# ATtiny4
15115
#------------------------------------------------------------
15116
 
15117
part
15118
    id		= "t4";
15119
    desc	= "ATtiny4";
15120
    signature	= 0x1e 0x8f 0x0a;
15121
    has_tpi	= yes;
15122
 
15123
    memory "flash"
15124
        size		= 512;
15125
        offset		= 0x4000;
15126
        page_size	= 16;
15127
        blocksize	= 128;
15128
    ;
15129
 
15130
    memory "signature"
15131
        size		= 3;
15132
        offset		= 0x3fc0;
15133
    ;
15134
 
15135
    memory "fuse"
15136
        size		= 1;
15137
        offset		= 0x3f40;
15138
	blocksize	= 4;
15139
    ;
15140
 
15141
    memory "calibration"
15142
        size		= 1;
15143
        offset		= 0x3f80;
15144
    ;
15145
 
15146
    memory "lockbits"
15147
        size		= 1;
15148
        offset		= 0x3f00;
15149
    ;
15150
;
15151
 
15152
 
15153
#------------------------------------------------------------
15154
# ATtiny5
15155
#------------------------------------------------------------
15156
 
15157
part
15158
    id		= "t5";
15159
    desc	= "ATtiny5";
15160
    signature	= 0x1e 0x8f 0x09;
15161
    has_tpi	= yes;
15162
 
15163
    memory "flash"
15164
        size		= 512;
15165
        offset		= 0x4000;
15166
        page_size	= 16;
15167
        blocksize	= 128;
15168
    ;
15169
 
15170
    memory "signature"
15171
        size		= 3;
15172
        offset		= 0x3fc0;
15173
    ;
15174
 
15175
    memory "fuse"
15176
        size		= 1;
15177
        offset		= 0x3f40;
15178
	blocksize	= 4;
15179
    ;
15180
 
15181
    memory "calibration"
15182
        size		= 1;
15183
        offset		= 0x3f80;
15184
    ;
15185
 
15186
    memory "lockbits"
15187
        size		= 1;
15188
        offset		= 0x3f00;
15189
    ;
15190
;
15191
 
15192
 
15193
#------------------------------------------------------------
15194
# ATtiny9
15195
#------------------------------------------------------------
15196
 
15197
part
15198
    id		= "t8";
15199
    desc	= "ATtiny9";
15200
    signature	= 0x1e 0x90 0x08;
15201
    has_tpi	= yes;
15202
 
15203
    memory "flash"
15204
        size		= 1024;
15205
        offset		= 0x4000;
15206
        page_size	= 16;
15207
        blocksize	= 128;
15208
    ;
15209
 
15210
    memory "signature"
15211
        size		= 3;
15212
        offset		= 0x3fc0;
15213
    ;
15214
 
15215
    memory "fuse"
15216
        size		= 1;
15217
        offset		= 0x3f40;
15218
	blocksize	= 4;
15219
    ;
15220
 
15221
    memory "calibration"
15222
        size		= 1;
15223
        offset		= 0x3f80;
15224
    ;
15225
 
15226
    memory "lockbits"
15227
        size		= 1;
15228
        offset		= 0x3f00;
15229
    ;
15230
;
15231
 
15232
 
15233
#------------------------------------------------------------
15234
# ATtiny10
15235
#------------------------------------------------------------
15236
 
15237
part
15238
    id		= "t10";
15239
    desc	= "ATtiny10";
15240
    signature	= 0x1e 0x90 0x03;
15241
    has_tpi	= yes;
15242
 
15243
    memory "flash"
15244
        size		= 1024;
15245
        offset		= 0x4000;
15246
        page_size	= 16;
15247
        blocksize	= 128;
15248
    ;
15249
 
15250
    memory "signature"
15251
        size		= 3;
15252
        offset		= 0x3fc0;
15253
    ;
15254
 
15255
    memory "fuse"
15256
        size		= 1;
15257
        offset		= 0x3f40;
15258
	blocksize	= 4;
15259
    ;
15260
 
15261
    memory "calibration"
15262
        size		= 1;
15263
        offset		= 0x3f80;
15264
    ;
15265
 
15266
    memory "lockbits"
15267
        size		= 1;
15268
        offset		= 0x3f00;
15269
    ;
15270
;
15271
 
15272