10d4ca681206b3941f4dfc00cf04d9fbe80aaa10
[pub/USBasp.git] / bin / win-avrdude / avrdude.conf
1 # $Id: avrdude.conf.in,v 1.58 2005/09/18 00:44:20 bdean Exp $
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 | avr910 | jtagmkii; # programmer type
19 # baudrate = <num> ; # baudrate for avr910-programmer
20 # vcc = <num1> [, <num2> ... ] ; # pin number(s)
21 # reset = <num> ; # pin number
22 # sck = <num> ; # pin number
23 # mosi = <num> ; # pin number
24 # miso = <num> ; # pin number
25 # errled = <num> ; # pin number
26 # rdyled = <num> ; # pin number
27 # pgmled = <num> ; # pin number
28 # vfyled = <num> ; # pin number
29 # ;
30 #
31 # part
32 # id = <id> ; # quoted string
33 # desc = <description> ; # quoted string
34 # has_jtag = <yes/no> ; # part has JTAG i/f
35 # devicecode = <num> ; # deprecated, use stk500_devcode
36 # stk500_devcode = <num> ; # numeric
37 # avr910_devcode = <num> ; # numeric
38 # chip_erase_delay = <num> ; # micro-seconds
39 # reset = dedicated | io;
40 # retry_pulse = reset | sck;
41 # pgm_enable = <instruction format> ;
42 # chip_erase = <instruction format> ;
43 # chip_erase_delay = <num> ; # chip erase delay (us)
44 # # STK500 parameters (parallel programming IO lines)
45 # pagel = <num> ; # pin name in hex, i.e., 0xD7
46 # bs2 = <num> ; # pin name in hex, i.e., 0xA0
47 # serial = <yes/no> ; # can use serial downloading
48 # parallel = <yes/no/pseudo>; # can use par. programming
49 # # STK500v2 parameters, to be taken from Atmel's XML files
50 # timeout = <num> ;
51 # stabdelay = <num> ;
52 # cmdexdelay = <num> ;
53 # synchloops = <num> ;
54 # bytedelay = <num> ;
55 # pollvalue = <num> ;
56 # pollindex = <num> ;
57 # predelay = <num> ;
58 # postdelay = <num> ;
59 # pollmethod = <num> ;
60 # mode = <num> ;
61 # delay = <num> ;
62 # blocksize = <num> ;
63 # readsize = <num> ;
64 # # JTAG ICE mkII parameters, also from XML files
65 # allowfullpagebitstream = <yes/no> ;
66 # enablepageprogramming = <yes/no> ;
67 # idr = <num> ; # IO addr of IDR (OCD) reg.
68 # rampz = <num> ; # IO addr of RAMPZ reg.
69 # spmcr = <num> ; # mem addr of SPMC[S]R reg.
70 # eecr = <num> ; # mem addr of EECR reg.
71 # # (only when != 0x3c)
72 #
73 # memory <memtype>
74 # paged = <yes/no> ; # yes / no
75 # size = <num> ; # bytes
76 # page_size = <num> ; # bytes
77 # num_pages = <num> ; # numeric
78 # min_write_delay = <num> ; # micro-seconds
79 # max_write_delay = <num> ; # micro-seconds
80 # readback_p1 = <num> ; # byte value
81 # readback_p2 = <num> ; # byte value
82 # pwroff_after_write = <yes/no> ; # yes / no
83 # read = <instruction format> ;
84 # write = <instruction format> ;
85 # read_lo = <instruction format> ;
86 # read_hi = <instruction format> ;
87 # write_lo = <instruction format> ;
88 # write_hi = <instruction format> ;
89 # loadpage_lo = <instruction format> ;
90 # loadpage_hi = <instruction format> ;
91 # writepage = <instruction format> ;
92 # ;
93 # ;
94 #
95 # If any of the above parameters are not specified, the default value
96 # of 0 is used for numerics or the empty string ("") for string
97 # values. If a required parameter is left empty, AVRDUDE will
98 # complain.
99 #
100 # NOTES:
101 # * 'devicecode' is the device code used by the STK500 (see codes
102 # listed below)
103 # * Not all memory types will implement all instructions.
104 # * AVR Fuse bits and Lock bits are implemented as a type of memory.
105 # * Example memory types are:
106 # "flash", "eeprom", "fuse", "lfuse" (low fuse), "hfuse" (high
107 # fuse), "signature", "calibration", "lock"
108 # * The memory type specified on the avrdude command line must match
109 # one of the memory types defined for the specified chip.
110 # * The pwroff_after_write flag causes avrdude to attempt to
111 # power the device off and back on after an unsuccessful write to
112 # the affected memory area if VCC programmer pins are defined. If
113 # VCC pins are not defined for the programmer, a message
114 # indicating that the device needs a power-cycle is printed out.
115 # This flag was added to work around a problem with the
116 # at90s4433/2333's; see the at90s4433 errata at:
117 #
118 # http://www.atmel.com/atmel/acrobat/doc1280.pdf
119 #
120 # INSTRUCTION FORMATS
121 #
122 # Instruction formats are specified as a comma seperated list of
123 # string values containing information (bit specifiers) about each
124 # of the 32 bits of the instruction. Bit specifiers may be one of
125 # the following formats:
126 #
127 # '1' = the bit is always set on input as well as output
128 #
129 # '0' = the bit is always clear on input as well as output
130 #
131 # 'x' = the bit is ignored on input and output
132 #
133 # 'a' = the bit is an address bit, the bit-number matches this bit
134 # specifier's position within the current instruction byte
135 #
136 # 'aN' = the bit is the Nth address bit, bit-number = N, i.e., a12
137 # is address bit 12 on input, a0 is address bit 0.
138 #
139 # 'i' = the bit is an input data bit
140 #
141 # 'o' = the bit is an output data bit
142 #
143 # Each instruction must be composed of 32 bit specifiers. The
144 # instruction specification closely follows the instruction data
145 # provided in Atmel's data sheets for their parts.
146 #
147 # See below for some examples.
148 #
149 #
150 # The following are STK500 part device codes to use for the
151 # "devicecode" field of the part. These came from Atmel's software
152 # section avr061.zip which accompanies the application note
153 # AVR061 available from:
154 #
155 # http://www.atmel.com/atmel/acrobat/doc2525.pdf
156 #
157
158 #define ATTINY10 0x10
159 #define ATTINY11 0x11
160 #define ATTINY12 0x12
161 #define ATTINY15 0x13
162 #define ATTINY13 0x14
163
164 #define ATTINY22 0x20
165 #define ATTINY26 0x21
166 #define ATTINY28 0x22
167 #define ATTINY2313 0x23
168
169 #define AT90S1200 0x33
170
171 #define AT90S2313 0x40
172 #define AT90S2323 0x41
173 #define AT90S2333 0x42
174 #define AT90S2343 0x43
175
176 #define AT90S4414 0x50
177 #define AT90S4433 0x51
178 #define AT90S4434 0x52
179 #define ATMEGA48 0x59
180
181 #define AT90S8515 0x60
182 #define AT90S8535 0x61
183 #define AT90C8534 0x62
184 #define ATMEGA8515 0x63
185 #define ATMEGA8535 0x64
186
187 #define ATMEGA8 0x70
188 #define ATMEGA88 0x73
189
190 #define ATMEGA161 0x80
191 #define ATMEGA163 0x81
192 #define ATMEGA16 0x82
193 #define ATMEGA162 0x83
194 #define ATMEGA169 0x84
195
196 #define ATMEGA323 0x90
197 #define ATMEGA32 0x91
198
199 #define ATMEGA64 0xA0
200
201 #define ATMEGA103 0xB1
202 #define ATMEGA128 0xB2
203 #define AT90CAN128 0xB3
204
205 #define AT86RF401 0xD0
206
207 #define AT89START 0xE0
208 #define AT89S51 0xE0
209 #define AT89S52 0xE1
210
211
212 #
213 # Overall avrdude defaults
214 #
215 default_parallel = "lpt1";
216 default_serial = "com1";
217
218
219 #
220 # PROGRAMMER DEFINITIONS
221 #
222
223 programmer
224 id = "bsd";
225 desc = "Brian Dean's Programmer, http://www.bsdhome.com/avrdude/";
226 type = par;
227 vcc = 2, 3, 4, 5;
228 reset = 7;
229 sck = 8;
230 mosi = 9;
231 miso = 10;
232 ;
233
234 programmer
235 id = "avrisp";
236 desc = "Atmel AVR ISP";
237 type = stk500;
238 ;
239
240 programmer
241 id = "avrispv2";
242 desc = "Atmel AVR ISP V2";
243 type = stk500v2;
244 ;
245
246 programmer
247 id = "stk500";
248 desc = "Atmel STK500";
249 type = stk500;
250 ;
251
252 programmer
253 id = "stk500v2";
254 desc = "Atmel STK500 V2";
255 type = stk500v2;
256 ;
257
258 programmer
259 id = "avr910";
260 desc = "Atmel Low Cost Serial Programmer";
261 type = avr910;
262 ;
263
264 programmer
265 id = "usbasp";
266 desc = "usbasp";
267 type = usbasp;
268 ;
269
270 programmer
271 id = "butterfly";
272 desc = "Atmel Butterfly Development Board";
273 type = butterfly;
274 ;
275
276 programmer
277 id = "avr109";
278 desc = "Atmel AppNote AVR109 Boot Loader";
279 type = butterfly;
280 ;
281
282 programmer
283 id = "avr911";
284 desc = "Atmel AppNote AVR911 AVROSP";
285 type = butterfly;
286 ;
287
288 programmer
289 id = "jtagmkII";
290 desc = "Atmel JTAG ICE mkII";
291 baudrate = 19200; # default is 19200
292 type = jtagmkii;
293 ;
294
295 # easier to type
296 programmer
297 id = "jtag2slow";
298 desc = "Atmel JTAG ICE mkII";
299 baudrate = 19200; # default is 19200
300 type = jtagmkii;
301 ;
302
303 # JTAG ICE mkII @ 115200 Bd
304 programmer
305 id = "jtag2fast";
306 desc = "Atmel JTAG ICE mkII";
307 baudrate = 115200;
308 type = jtagmkii;
309 ;
310
311 # make the fast one the default, people will love that
312 programmer
313 id = "jtag2";
314 desc = "Atmel JTAG ICE mkII";
315 baudrate = 115200;
316 type = jtagmkii;
317 ;
318
319 programmer
320 id = "pavr";
321 desc = "Jason Kyle's pAVR Serial Programmer";
322 type = avr910;
323 ;
324
325 programmer
326 id = "stk200";
327 desc = "STK200";
328 type = par;
329 buff = 4, 5;
330 sck = 6;
331 mosi = 7;
332 reset = 9;
333 miso = 10;
334 ;
335
336 # The programming dongle used by the popular Ponyprog
337 # utility. It is almost similar to the STK200 one,
338 # except that there is a LED indicating that the
339 # programming is currently in progress.
340
341 programmer
342 id = "pony-stk200";
343 desc = "Pony Prog STK200";
344 type = par;
345 buff = 4, 5;
346 sck = 6;
347 mosi = 7;
348 reset = 9;
349 miso = 10;
350 pgmled = 8;
351 ;
352
353 programmer
354 id = "dt006";
355 desc = "Dontronics DT006";
356 type = par;
357 reset = 4;
358 sck = 5;
359 mosi = 2;
360 miso = 11;
361 ;
362
363 programmer
364 id = "bascom";
365 desc = "Bascom SAMPLE programming cable";
366 type = par;
367 reset = 4;
368 sck = 5;
369 mosi = 2;
370 miso = 11;
371 ;
372
373 programmer
374 id = "alf";
375 desc = "Nightshade ALF-PgmAVR, http://nightshade.homeip.net/";
376 type = par;
377 vcc = 2, 3, 4, 5;
378 buff = 6;
379 reset = 7;
380 sck = 8;
381 mosi = 9;
382 miso = 10;
383 errled = 1;
384 rdyled = 14;
385 pgmled = 16;
386 vfyled = 17;
387 ;
388
389 programmer
390 id = "sp12";
391 desc = "Steve Bolt's Programmer";
392 type = par;
393 vcc = 4,5,6,7,8;
394 reset = 3;
395 sck = 2;
396 mosi = 9;
397 miso = 11;
398 ;
399
400 programmer
401 id = "picoweb";
402 desc = "Picoweb Programming Cable, http://www.picoweb.net/";
403 type = par;
404 reset = 2;
405 sck = 3;
406 mosi = 4;
407 miso = 13;
408 ;
409
410 programmer
411 id = "abcmini";
412 desc = "ABCmini Board, aka Dick Smith HOTCHIP";
413 type = par;
414 reset = 4;
415 sck = 3;
416 mosi = 2;
417 miso = 10;
418 ;
419
420 programmer
421 id = "futurlec";
422 desc = "Futurlec.com programming cable.";
423 type = par;
424 reset = 3;
425 sck = 2;
426 mosi = 1;
427 miso = 10;
428 ;
429
430
431 # From the contributor of the "xil" jtag cable:
432 # The "vcc" definition isn't really vcc (the cable gets its power from
433 # the programming circuit) but is necessary to switch one of the
434 # buffer lines (trying to add it to the "buff" lines doesn't work).
435 # With this, TMS connects to RESET, TDI to MOSI, TDO to MISO and TCK
436 # to SCK (plus vcc/gnd of course)
437 programmer
438 id = "xil";
439 desc = "Xilinx JTAG cable";
440 type = par;
441 mosi = 2;
442 sck = 3;
443 reset = 4;
444 buff = 5;
445 miso = 13;
446 vcc = 6;
447 ;
448
449
450 programmer
451 id = "dapa";
452 desc = "Direct AVR Parallel Access cable";
453 type = par;
454 vcc = 3;
455 reset = 16;
456 sck = 1;
457 mosi = 2;
458 miso = 11;
459 ;
460
461
462 #
463 # some ultra cheap programmers use bitbanging on the
464 # serialport.
465 #
466
467 # serial ponyprog design (dasa2 in uisp)
468 # reset=!txd sck=rts mosi=dtr miso=cts
469
470 programmer
471 id = "ponyser";
472 desc = "serial port banging, design ponyprog serial";
473 type = serbb;
474 reset = ~3;
475 sck = 6;
476 mosi = 4;
477 miso = 7;
478 ;
479
480 # unknown (dasa in uisp)
481 # reset=rts sck=dtr mosi=txd miso=cts
482
483 programmer
484 id = "dasa";
485 desc = "serial port banging, reset=rts sck=dtr mosi=txd miso=cts";
486 type = serbb;
487 reset = 6;
488 sck = 4;
489 mosi = 3;
490 miso = 7;
491 ;
492
493 # unknown (dasa3 in uisp)
494 # reset=!dtr sck=rts mosi=txd miso=cts
495
496 programmer
497 id = "dasa3";
498 desc = "serial port banging, reset=!dtr sck=rts mosi=txd miso=cts";
499 type = serbb;
500 reset = ~4;
501 sck = 6;
502 mosi = 3;
503 miso = 7;
504 ;
505
506 #
507 # PART DEFINITIONS
508 #
509
510 #------------------------------------------------------------
511 # ATtiny12
512 #------------------------------------------------------------
513
514 part
515 id = "t12";
516 desc = "ATtiny12";
517 stk500_devcode = 0x12;
518 avr910_devcode = 0x55;
519 chip_erase_delay = 20000;
520 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
521 "x x x x x x x x x x x x x x x x";
522
523 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
524 "x x x x x x x x x x x x x x x x";
525
526 timeout = 200;
527 stabdelay = 100;
528 cmdexedelay = 25;
529 synchloops = 32;
530 bytedelay = 0;
531 pollindex = 3;
532 pollvalue = 0x53;
533 predelay = 1;
534 postdelay = 1;
535 pollmethod = 0;
536
537 memory "eeprom"
538 size = 64;
539 min_write_delay = 9000;
540 max_write_delay = 20000;
541 readback_p1 = 0xff;
542 readback_p2 = 0xff;
543 read = "1 0 1 0 0 0 0 0 x x x x x x x x",
544 "x x a5 a4 a3 a2 a1 a0 o o o o o o o o";
545
546 write = "1 1 0 0 0 0 0 0 x x x x x x x x",
547 "x x a5 a4 a3 a2 a1 a0 i i i i i i i i";
548
549 mode = 0x04;
550 delay = 8;
551 blocksize = 64;
552 readsize = 256;
553 ;
554
555 memory "flash"
556 size = 1024;
557 min_write_delay = 4500;
558 max_write_delay = 20000;
559 readback_p1 = 0xff;
560 readback_p2 = 0xff;
561 read_lo = " 0 0 1 0 0 0 0 0",
562 " x x x x x x x a8",
563 " a7 a6 a5 a4 a3 a2 a1 a0",
564 " o o o o o o o o";
565
566 read_hi = " 0 0 1 0 1 0 0 0",
567 " x x x x x x x a8",
568 " a7 a6 a5 a4 a3 a2 a1 a0",
569 " o o o o o o o o";
570
571 write_lo = " 0 1 0 0 0 0 0 0",
572 " x x x x x x x a8",
573 " a7 a6 a5 a4 a3 a2 a1 a0",
574 " i i i i i i i i";
575
576 write_hi = " 0 1 0 0 1 0 0 0",
577 " x x x x x x x a8",
578 " a7 a6 a5 a4 a3 a2 a1 a0",
579 " i i i i i i i i";
580
581 mode = 0x04;
582 delay = 5;
583 blocksize = 128;
584 readsize = 256;
585 ;
586
587 memory "signature"
588 size = 3;
589 read = "0 0 1 1 0 0 0 0 x x x x x x x x",
590 "0 0 0 0 0 0 a1 a0 o o o o o o o o";
591 ;
592
593 memory "lock"
594 size = 1;
595 read = "0 1 0 1 1 0 0 0 x x x x x x x x",
596 "x x x x x x x x x x x x x o o x";
597
598 write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
599 "x x x x x x x x x x x x x x x x";
600 ;
601
602 memory "calibration"
603 size = 1;
604 read = "0 0 1 1 1 0 0 0 x x x x x x x x",
605 "0 0 0 0 0 0 0 0 o o o o o o o o";
606 ;
607
608 memory "fuse"
609 size = 1;
610 read = "0 1 0 1 0 0 0 0 x x x x x x x x",
611 "x x x x x x x x o o o o o o o o";
612
613 write = "1 0 1 0 1 1 0 0 1 0 1 x x x x x",
614 "x x x x x x x x i i i i i i i i";
615 ;
616 ;
617
618 #------------------------------------------------------------
619 # ATtiny13
620 #------------------------------------------------------------
621
622 part
623 id = "t13";
624 desc = "ATtiny13";
625 stk500_devcode = 0x14;
626 chip_erase_delay = 4000;
627 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
628 "x x x x x x x x x x x x x x x x";
629
630 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
631 "x x x x x x x x x x x x x x x x";
632
633 timeout = 200;
634 stabdelay = 100;
635 cmdexedelay = 25;
636 synchloops = 32;
637 bytedelay = 0;
638 pollindex = 3;
639 pollvalue = 0x53;
640 predelay = 1;
641 postdelay = 1;
642 pollmethod = 1;
643
644 memory "eeprom"
645 size = 64;
646 min_write_delay = 4000;
647 max_write_delay = 4000;
648 readback_p1 = 0xff;
649 readback_p2 = 0xff;
650 read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x",
651 "x x a5 a4 a3 a2 a1 a0 o o o o o o o o";
652
653 write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x",
654 "x x a5 a4 a3 a2 a1 a0 i i i i i i i i";
655
656 mode = 0x41;
657 delay = 5;
658 blocksize = 4;
659 readsize = 256;
660 ;
661
662 memory "flash"
663 paged = yes;
664 size = 1024;
665 page_size = 32;
666 num_pages = 32;
667 min_write_delay = 4500;
668 max_write_delay = 4500;
669 readback_p1 = 0xff;
670 readback_p2 = 0xff;
671 read_lo = " 0 0 1 0 0 0 0 0",
672 " 0 0 0 0 0 0 0 a8",
673 " a7 a6 a5 a4 a3 a2 a1 a0",
674 " o o o o o o o o";
675
676 read_hi = " 0 0 1 0 1 0 0 0",
677 " 0 0 0 0 0 0 0 a8",
678 " a7 a6 a5 a4 a3 a2 a1 a0",
679 " o o o o o o o o";
680
681 loadpage_lo = " 0 1 0 0 0 0 0 0",
682 " 0 0 0 x x x x x",
683 " x x x x a3 a2 a1 a0",
684 " i i i i i i i i";
685
686 loadpage_hi = " 0 1 0 0 1 0 0 0",
687 " 0 0 0 x x x x x",
688 " x x x x a3 a2 a1 a0",
689 " i i i i i i i i";
690
691 writepage = " 0 1 0 0 1 1 0 0",
692 " 0 0 0 0 0 0 0 a8",
693 " a7 a6 a5 a4 x x x x",
694 " x x x x x x x x";
695
696 mode = 0x41;
697 delay = 6;
698 blocksize = 32;
699 readsize = 256;
700 ;
701
702 memory "signature"
703 size = 3;
704 read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
705 "x x x x x x a1 a0 o o o o o o o o";
706 ;
707
708 memory "lock"
709 size = 1;
710 min_write_delay = 4500;
711 max_write_delay = 4500;
712
713 read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
714 "x x x x x x x x x x o o o o o o";
715
716 write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
717 "x x x x x x x x 1 1 i i i i i i";
718 ;
719
720 memory "calibration"
721 size = 1;
722 read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
723 "0 0 0 0 0 0 0 0 o o o o o o o o";
724 ;
725
726 memory "lfuse"
727 size = 1;
728 min_write_delay = 4500;
729 max_write_delay = 4500;
730
731 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
732 "x x x x x x x x i i i i i i i i";
733
734 read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
735 "x x x x x x x x o o o o o o o o";
736 ;
737
738 memory "hfuse"
739 size = 1;
740 min_write_delay = 4500;
741 max_write_delay = 4500;
742
743 write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
744 "x x x x x x x x i i i i i i i i";
745
746 read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
747 "x x x x x x x x o o o o o o o o";
748 ;
749
750 ;
751
752
753 #------------------------------------------------------------
754 # ATtiny15
755 #------------------------------------------------------------
756
757 part
758 id = "t15";
759 desc = "ATtiny15";
760 stk500_devcode = 0x13;
761 avr910_devcode = 0x56;
762 chip_erase_delay = 8200;
763 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
764 "x x x x x x x x x x x x x x x x";
765
766 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
767 "x x x x x x x x x x x x x x x x";
768
769 timeout = 200;
770 stabdelay = 100;
771 cmdexedelay = 25;
772 synchloops = 32;
773 bytedelay = 0;
774 pollindex = 3;
775 pollvalue = 0x53;
776 predelay = 1;
777 postdelay = 1;
778 pollmethod = 0;
779
780 memory "eeprom"
781 size = 64;
782 min_write_delay = 8200;
783 max_write_delay = 8200;
784 readback_p1 = 0xff;
785 readback_p2 = 0xff;
786 read = "1 0 1 0 0 0 0 0 x x x x x x x x",
787 "x x a5 a4 a3 a2 a1 a0 o o o o o o o o";
788
789 write = "1 1 0 0 0 0 0 0 x x x x x x x x",
790 "x x a5 a4 a3 a2 a1 a0 i i i i i i i i";
791
792 mode = 0x04;
793 delay = 10;
794 blocksize = 64;
795 readsize = 256;
796 ;
797
798 memory "flash"
799 size = 1024;
800 min_write_delay = 4100;
801 max_write_delay = 4100;
802 readback_p1 = 0xff;
803 readback_p2 = 0xff;
804 read_lo = " 0 0 1 0 0 0 0 0",
805 " x x x x x x x a8",
806 " a7 a6 a5 a4 a3 a2 a1 a0",
807 " o o o o o o o o";
808
809 read_hi = " 0 0 1 0 1 0 0 0",
810 " x x x x x x x a8",
811 " a7 a6 a5 a4 a3 a2 a1 a0",
812 " o o o o o o o o";
813
814 write_lo = " 0 1 0 0 0 0 0 0",
815 " x x x x x x x a8",
816 " a7 a6 a5 a4 a3 a2 a1 a0",
817 " i i i i i i i i";
818
819 write_hi = " 0 1 0 0 1 0 0 0",
820 " x x x x x x x a8",
821 " a7 a6 a5 a4 a3 a2 a1 a0",
822 " i i i i i i i i";
823
824 mode = 0x04;
825 delay = 5;
826 blocksize = 128;
827 readsize = 256;
828 ;
829
830 memory "signature"
831 size = 3;
832 read = "0 0 1 1 0 0 0 0 x x x x x x x x",
833 "0 0 0 0 0 0 a1 a0 o o o o o o o o";
834 ;
835
836 memory "lock"
837 size = 1;
838 read = "0 1 0 1 1 0 0 0 x x x x x x x x",
839 "x x x x x x x x x x x x x o o x";
840
841 write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
842 "x x x x x x x x x x x x x x x x";
843 ;
844
845 memory "calibration"
846 size = 1;
847 read = "0 0 1 1 1 0 0 0 x x x x x x x x",
848 "0 0 0 0 0 0 0 0 o o o o o o o o";
849 ;
850
851 memory "fuse"
852 size = 1;
853 read = "0 1 0 1 0 0 0 0 x x x x x x x x",
854 "x x x x x x x x o o o o x x o o";
855
856 write = "1 0 1 0 1 1 0 0 1 0 1 x x x x x",
857 "x x x x x x x x i i i i 1 1 i i";
858 ;
859 ;
860
861 #------------------------------------------------------------
862 # AT90s1200
863 #------------------------------------------------------------
864
865 part
866 id = "1200";
867 desc = "AT90S1200";
868 stk500_devcode = 0x33;
869 avr910_devcode = 0x13;
870 pagel = 0xd7;
871 bs2 = 0xa0;
872 chip_erase_delay = 20000;
873 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
874 "x x x x x x x x x x x x x x x x";
875
876 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
877 "x x x x x x x x x x x x x x x x";
878
879 timeout = 200;
880 stabdelay = 100;
881 cmdexedelay = 25;
882 synchloops = 1;
883 bytedelay = 0;
884 pollindex = 0;
885 pollvalue = 0xFF;
886 predelay = 1;
887 postdelay = 1;
888 pollmethod = 0;
889
890 memory "eeprom"
891 size = 64;
892 min_write_delay = 4000;
893 max_write_delay = 9000;
894 readback_p1 = 0x00;
895 readback_p2 = 0xff;
896 read = "1 0 1 0 0 0 0 0 x x x x x x x x",
897 "x x a5 a4 a3 a2 a1 a0 o o o o o o o o";
898
899 write = "1 1 0 0 0 0 0 0 x x x x x x x x",
900 "x x a5 a4 a3 a2 a1 a0 i i i i i i i i";
901
902 mode = 0x04;
903 delay = 20;
904 blocksize = 32;
905 readsize = 256;
906 ;
907 memory "flash"
908 size = 1024;
909 min_write_delay = 4000;
910 max_write_delay = 9000;
911 readback_p1 = 0xff;
912 readback_p2 = 0xff;
913 read_lo = " 0 0 1 0 0 0 0 0",
914 " x x x x x x x a8",
915 " a7 a6 a5 a4 a3 a2 a1 a0",
916 " o o o o o o o o";
917
918 read_hi = " 0 0 1 0 1 0 0 0",
919 " x x x x x x x a8",
920 " a7 a6 a5 a4 a3 a2 a1 a0",
921 " o o o o o o o o";
922
923 write_lo = " 0 1 0 0 0 0 0 0",
924 " x x x x x x x a8",
925 " a7 a6 a5 a4 a3 a2 a1 a0",
926 " i i i i i i i i";
927
928 write_hi = " 0 1 0 0 1 0 0 0",
929 " x x x x x x x a8",
930 " a7 a6 a5 a4 a3 a2 a1 a0",
931 " i i i i i i i i";
932
933 mode = 0x02;
934 delay = 15;
935 blocksize = 128;
936 readsize = 256;
937 ;
938 memory "signature"
939 size = 3;
940 read = "0 0 1 1 0 0 0 0 x x x x x x x x",
941 "x x x x x x a1 a0 o o o o o o o o";
942 ;
943 memory "fuse"
944 size = 1;
945 min_write_delay = 9000;
946 max_write_delay = 20000;
947 read = "0 1 0 1 0 0 0 0 x x x x x x x x",
948 "x x x x x x x x x x o o o o o o";
949
950 write = "1 0 1 0 1 1 0 0 1 0 1 i i i i i",
951 "x x x x x x x x x x x x x x x x";
952 ;
953 memory "lock"
954 size = 1;
955 min_write_delay = 9000;
956 max_write_delay = 20000;
957 read = "0 1 0 1 1 0 0 0 x x x x x x x x",
958 "x x x x x x x x x x x x x o o x";
959
960 write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
961 "x x x x x x x x x x x x x x x x";
962 ;
963 ;
964
965 #------------------------------------------------------------
966 # AT90s4414
967 #------------------------------------------------------------
968
969 part
970 id = "4414";
971 desc = "AT90S4414";
972 stk500_devcode = 0x50;
973 avr910_devcode = 0x28;
974 chip_erase_delay = 20000;
975 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
976 "x x x x x x x x x x x x x x x x";
977
978 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
979 "x x x x x x x x x x x x x x x x";
980
981 timeout = 200;
982 stabdelay = 100;
983 cmdexedelay = 25;
984 synchloops = 32;
985 bytedelay = 0;
986 pollindex = 3;
987 pollvalue = 0x53;
988 predelay = 1;
989 postdelay = 1;
990 pollmethod = 0;
991
992 memory "eeprom"
993 size = 256;
994 min_write_delay = 9000;
995 max_write_delay = 20000;
996 readback_p1 = 0x80;
997 readback_p2 = 0x7f;
998 read = " 1 0 1 0 0 0 0 0 x x x x x x x a8",
999 "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
1000
1001 write = " 1 1 0 0 0 0 0 0 x x x x x x x a8",
1002 "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
1003
1004 mode = 0x04;
1005 delay = 12;
1006 blocksize = 64;
1007 readsize = 256;
1008 ;
1009 memory "flash"
1010 size = 4096;
1011 min_write_delay = 9000;
1012 max_write_delay = 20000;
1013 readback_p1 = 0x7f;
1014 readback_p2 = 0x7f;
1015 read_lo = " 0 0 1 0 0 0 0 0",
1016 " x x x x a11 a10 a9 a8",
1017 " a7 a6 a5 a4 a3 a2 a1 a0",
1018 " o o o o o o o o";
1019
1020 read_hi = " 0 0 1 0 1 0 0 0",
1021 " x x x x a11 a10 a9 a8",
1022 " a7 a6 a5 a4 a3 a2 a1 a0",
1023 " o o o o o o o o";
1024
1025 write_lo = " 0 1 0 0 0 0 0 0",
1026 " x x x x a11 a10 a9 a8",
1027 " a7 a6 a5 a4 a3 a2 a1 a0",
1028 " i i i i i i i i";
1029
1030 write_hi = " 0 1 0 0 1 0 0 0",
1031 " x x x x a11 a10 a9 a8",
1032 " a7 a6 a5 a4 a3 a2 a1 a0",
1033 " i i i i i i i i";
1034
1035 mode = 0x04;
1036 delay = 12;
1037 blocksize = 64;
1038 readsize = 256;
1039 ;
1040 memory "signature"
1041 size = 3;
1042 read = "0 0 1 1 0 0 0 0 x x x x x x x x",
1043 "x x x x x x a1 a0 o o o o o o o o";
1044 ;
1045 ;
1046
1047 #------------------------------------------------------------
1048 # AT90s2313
1049 #------------------------------------------------------------
1050
1051 part
1052 id = "2313";
1053 desc = "AT90S2313";
1054 stk500_devcode = 0x40;
1055 avr910_devcode = 0x20;
1056 chip_erase_delay = 20000;
1057 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
1058 "x x x x x x x x x x x x x x x x";
1059
1060 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
1061 "x x x x x x x x x x x x x x x x";
1062
1063 timeout = 200;
1064 stabdelay = 100;
1065 cmdexedelay = 25;
1066 synchloops = 32;
1067 bytedelay = 0;
1068 pollindex = 3;
1069 pollvalue = 0x53;
1070 predelay = 1;
1071 postdelay = 1;
1072 pollmethod = 0;
1073
1074 memory "eeprom"
1075 size = 128;
1076 min_write_delay = 4000;
1077 max_write_delay = 9000;
1078 readback_p1 = 0x80;
1079 readback_p2 = 0x7f;
1080 read = "1 0 1 0 0 0 0 0 x x x x x x x x",
1081 "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
1082
1083 write = "1 1 0 0 0 0 0 0 x x x x x x x x",
1084 "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
1085
1086 mode = 0x04;
1087 delay = 12;
1088 blocksize = 64;
1089 readsize = 256;
1090 ;
1091 memory "flash"
1092 size = 2048;
1093 min_write_delay = 4000;
1094 max_write_delay = 9000;
1095 readback_p1 = 0x7f;
1096 readback_p2 = 0x7f;
1097 read_lo = " 0 0 1 0 0 0 0 0",
1098 " x x x x x x a9 a8",
1099 " a7 a6 a5 a4 a3 a2 a1 a0",
1100 " o o o o o o o o";
1101
1102 read_hi = " 0 0 1 0 1 0 0 0",
1103 " x x x x x x a9 a8",
1104 " a7 a6 a5 a4 a3 a2 a1 a0",
1105 " o o o o o o o o";
1106
1107 write_lo = " 0 1 0 0 0 0 0 0",
1108 " x x x x x x a9 a8",
1109 " a7 a6 a5 a4 a3 a2 a1 a0",
1110 " i i i i i i i i";
1111
1112 write_hi = " 0 1 0 0 1 0 0 0",
1113 " x x x x x x a9 a8",
1114 " a7 a6 a5 a4 a3 a2 a1 a0",
1115 " i i i i i i i i";
1116
1117 mode = 0x04;
1118 delay = 12;
1119 blocksize = 128;
1120 readsize = 256;
1121 ;
1122 memory "signature"
1123 size = 3;
1124 read = "0 0 1 1 0 0 0 0 x x x x x x x x",
1125 "x x x x x x a1 a0 o o o o o o o o";
1126 ;
1127 memory "lock"
1128 size = 1;
1129 write = "1 0 1 0 1 1 0 0 1 1 1 x x i i x",
1130 "x x x x x x x x x x x x x x x x";
1131 ;
1132 ;
1133
1134 #------------------------------------------------------------
1135 # AT90s2333
1136 #------------------------------------------------------------
1137
1138 part
1139 id = "2333";
1140 ##### WARNING: No XML file for device 'AT90S2333'! #####
1141 desc = "AT90S2333";
1142 stk500_devcode = 0x42;
1143 avr910_devcode = 0x34;
1144 chip_erase_delay = 20000;
1145 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
1146 "x x x x x x x x x x x x x x x x";
1147
1148 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
1149 "x x x x x x x x x x x x x x x x";
1150
1151 memory "eeprom"
1152 size = 128;
1153 min_write_delay = 9000;
1154 max_write_delay = 20000;
1155 readback_p1 = 0x00;
1156 readback_p2 = 0xff;
1157 read = "1 0 1 0 0 0 0 0 x x x x x x x x",
1158 "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
1159
1160 write = "1 1 0 0 0 0 0 0 x x x x x x x x",
1161 "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
1162 ;
1163 memory "flash"
1164 size = 2048;
1165 min_write_delay = 9000;
1166 max_write_delay = 20000;
1167 readback_p1 = 0xff;
1168 readback_p2 = 0xff;
1169 read_lo = " 0 0 1 0 0 0 0 0",
1170 " x x x x x x a9 a8",
1171 " a7 a6 a5 a4 a3 a2 a1 a0",
1172 " o o o o o o o o";
1173
1174 read_hi = " 0 0 1 0 1 0 0 0",
1175 " x x x x x x a9 a8",
1176 " a7 a6 a5 a4 a3 a2 a1 a0",
1177 " o o o o o o o o";
1178
1179 write_lo = " 0 1 0 0 0 0 0 0",
1180 " x x x x x x a9 a8",
1181 " a7 a6 a5 a4 a3 a2 a1 a0",
1182 " i i i i i i i i";
1183
1184 write_hi = " 0 1 0 0 1 0 0 0",
1185 " x x x x x x a9 a8",
1186 " a7 a6 a5 a4 a3 a2 a1 a0",
1187 " i i i i i i i i";
1188 ;
1189 memory "signature"
1190 size = 3;
1191 read = "0 0 1 1 0 0 0 0 x x x x x x x x",
1192 "x x x x x x a1 a0 o o o o o o o o";
1193 ;
1194 memory "fuse"
1195 size = 1;
1196 min_write_delay = 9000;
1197 max_write_delay = 20000;
1198 pwroff_after_write = yes;
1199 read = "0 1 0 1 0 0 0 0 x x x x x x x x",
1200 "x x x x x x x x x x o o o o o o";
1201
1202 write = "1 0 1 0 1 1 0 0 1 0 1 i i i i i",
1203 "x x x x x x x x x x x x x x x x";
1204 ;
1205 memory "lock"
1206 size = 1;
1207 min_write_delay = 9000;
1208 max_write_delay = 20000;
1209 read = "0 1 0 1 1 0 0 0 x x x x x x x x",
1210 "x x x x x x x x x x x x x o o x";
1211
1212 write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
1213 "x x x x x x x x x x x x x x x x";
1214 ;
1215 ;
1216
1217
1218 #------------------------------------------------------------
1219 # AT90s2343 (also AT90s2323 and ATtiny22)
1220 #------------------------------------------------------------
1221
1222 part
1223 id = "2343";
1224 desc = "AT90S2343";
1225 stk500_devcode = 0x43;
1226 avr910_devcode = 0x4c;
1227 chip_erase_delay = 18000;
1228 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
1229 "x x x x x x x x x x x x x x x x";
1230
1231 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
1232 "x x x x x x x x x x x x x x x x";
1233
1234 timeout = 200;
1235 stabdelay = 100;
1236 cmdexedelay = 25;
1237 synchloops = 32;
1238 bytedelay = 0;
1239 pollindex = 3;
1240 pollvalue = 0x53;
1241 predelay = 1;
1242 postdelay = 1;
1243 pollmethod = 0;
1244
1245 memory "eeprom"
1246 size = 128;
1247 min_write_delay = 9000;
1248 max_write_delay = 20000;
1249 readback_p1 = 0x00;
1250 readback_p2 = 0xff;
1251 read = "1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0",
1252 "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
1253
1254 write = "1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0",
1255 "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
1256
1257 mode = 0x04;
1258 delay = 12;
1259 blocksize = 64;
1260 readsize = 256;
1261 ;
1262 memory "flash"
1263 size = 2048;
1264 min_write_delay = 9000;
1265 max_write_delay = 20000;
1266 readback_p1 = 0xff;
1267 readback_p2 = 0xff;
1268 read_lo = " 0 0 1 0 0 0 0 0",
1269 " x x x x x x a9 a8",
1270 " a7 a6 a5 a4 a3 a2 a1 a0",
1271 " o o o o o o o o";
1272
1273 read_hi = " 0 0 1 0 1 0 0 0",
1274 " x x x x x x a9 a8",
1275 " a7 a6 a5 a4 a3 a2 a1 a0",
1276 " o o o o o o o o";
1277
1278 write_lo = " 0 1 0 0 0 0 0 0",
1279 " x x x x x x a9 a8",
1280 " a7 a6 a5 a4 a3 a2 a1 a0",
1281 " i i i i i i i i";
1282
1283 write_hi = " 0 1 0 0 1 0 0 0",
1284 " x x x x x x a9 a8",
1285 " a7 a6 a5 a4 a3 a2 a1 a0",
1286 " i i i i i i i i";
1287
1288 mode = 0x04;
1289 delay = 12;
1290 blocksize = 128;
1291 readsize = 128;
1292 ;
1293 memory "signature"
1294 size = 3;
1295 read = "0 0 1 1 0 0 0 0 x x x x x x x x",
1296 "x x x x x x a1 a0 o o o o o o o o";
1297 ;
1298 memory "fuse"
1299 size = 1;
1300 min_write_delay = 9000;
1301 max_write_delay = 20000;
1302 read = "0 1 0 1 1 0 0 0 x x x x x x x x",
1303 "x x x x x x x x o o o x x x x o";
1304
1305 write = "1 0 1 0 1 1 0 0 1 0 1 1 1 1 1 i",
1306 "x x x x x x x x x x x x x x x x";
1307 ;
1308 memory "lock"
1309 size = 1;
1310 min_write_delay = 9000;
1311 max_write_delay = 20000;
1312 read = "0 1 0 1 1 0 0 0 x x x x x x x x",
1313 "x x x x x x x x o o o x x x x o";
1314
1315 write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
1316 "x x x x x x x x x x x x x x x x";
1317 ;
1318 ;
1319
1320
1321 #------------------------------------------------------------
1322 # AT90s4433
1323 #------------------------------------------------------------
1324
1325 part
1326 id = "4433";
1327 desc = "AT90S4433";
1328 stk500_devcode = 0x51;
1329 avr910_devcode = 0x30;
1330 chip_erase_delay = 20000;
1331 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
1332 "x x x x x x x x x x x x x x x x";
1333
1334 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
1335 "x x x x x x x x x x x x x x x x";
1336
1337 timeout = 200;
1338 stabdelay = 100;
1339 cmdexedelay = 25;
1340 synchloops = 32;
1341 bytedelay = 0;
1342 pollindex = 3;
1343 pollvalue = 0x53;
1344 predelay = 1;
1345 postdelay = 1;
1346 pollmethod = 0;
1347
1348 memory "eeprom"
1349 size = 256;
1350 min_write_delay = 9000;
1351 max_write_delay = 20000;
1352 readback_p1 = 0x00;
1353 readback_p2 = 0xff;
1354 read = " 1 0 1 0 0 0 0 0 x x x x x x x x",
1355 "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
1356
1357 write = " 1 1 0 0 0 0 0 0 x x x x x x x x",
1358 "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
1359
1360 mode = 0x04;
1361 delay = 12;
1362 blocksize = 128;
1363 readsize = 256;
1364 ;
1365 memory "flash"
1366 size = 4096;
1367 min_write_delay = 9000;
1368 max_write_delay = 20000;
1369 readback_p1 = 0xff;
1370 readback_p2 = 0xff;
1371 read_lo = " 0 0 1 0 0 0 0 0",
1372 " x x x x x a10 a9 a8",
1373 " a7 a6 a5 a4 a3 a2 a1 a0",
1374 " o o o o o o o o";
1375
1376 read_hi = " 0 0 1 0 1 0 0 0",
1377 " x x x x x a10 a9 a8",
1378 " a7 a6 a5 a4 a3 a2 a1 a0",
1379 " o o o o o o o o";
1380
1381 write_lo = " 0 1 0 0 0 0 0 0",
1382 " x x x x x a10 a9 a8",
1383 " a7 a6 a5 a4 a3 a2 a1 a0",
1384 " i i i i i i i i";
1385
1386 write_hi = " 0 1 0 0 1 0 0 0",
1387 " x x x x x a10 a9 a8",
1388 " a7 a6 a5 a4 a3 a2 a1 a0",
1389 " i i i i i i i i";
1390
1391 mode = 0x04;
1392 delay = 12;
1393 blocksize = 128;
1394 readsize = 256;
1395 ;
1396 memory "signature"
1397 size = 3;
1398 read = "0 0 1 1 0 0 0 0 x x x x x x x x",
1399 "x x x x x x a1 a0 o o o o o o o o";
1400 ;
1401 memory "fuse"
1402 size = 1;
1403 min_write_delay = 9000;
1404 max_write_delay = 20000;
1405 pwroff_after_write = yes;
1406 read = "0 1 0 1 0 0 0 0 x x x x x x x x",
1407 "x x x x x x x x x x o o o o o o";
1408
1409 write = "1 0 1 0 1 1 0 0 1 0 1 i i i i i",
1410 "x x x x x x x x x x x x x x x x";
1411 ;
1412 memory "lock"
1413 size = 1;
1414 min_write_delay = 9000;
1415 max_write_delay = 20000;
1416 read = "0 1 0 1 1 0 0 0 x x x x x x x x",
1417 "x x x x x x x x x x x x x o o x";
1418
1419 write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
1420 "x x x x x x x x x x x x x x x x";
1421 ;
1422 ;
1423
1424 #------------------------------------------------------------
1425 # AT90s4434
1426 #------------------------------------------------------------
1427
1428 part
1429 id = "4434";
1430 ##### WARNING: No XML file for device 'AT90S4434'! #####
1431 desc = "AT90S4434";
1432 stk500_devcode = 0x52;
1433 avr910_devcode = 0x6c;
1434 chip_erase_delay = 20000;
1435 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
1436 "x x x x x x x x x x x x x x x x";
1437
1438 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
1439 "x x x x x x x x x x x x x x x x";
1440
1441 memory "eeprom"
1442 size = 256;
1443 min_write_delay = 9000;
1444 max_write_delay = 20000;
1445 readback_p1 = 0x00;
1446 readback_p2 = 0xff;
1447 read = " 1 0 1 0 0 0 0 0 x x x x x x x x",
1448 "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
1449
1450 write = " 1 1 0 0 0 0 0 0 x x x x x x x x",
1451 "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
1452 ;
1453 memory "flash"
1454 size = 4096;
1455 min_write_delay = 9000;
1456 max_write_delay = 20000;
1457 readback_p1 = 0xff;
1458 readback_p2 = 0xff;
1459 read_lo = " 0 0 1 0 0 0 0 0",
1460 " x x x x x a10 a9 a8",
1461 " a7 a6 a5 a4 a3 a2 a1 a0",
1462 " o o o o o o o o";
1463
1464 read_hi = " 0 0 1 0 1 0 0 0",
1465 " x x x x x a10 a9 a8",
1466 " a7 a6 a5 a4 a3 a2 a1 a0",
1467 " o o o o o o o o";
1468
1469 write_lo = " 0 1 0 0 0 0 0 0",
1470 " x x x x x a10 a9 a8",
1471 " a7 a6 a5 a4 a3 a2 a1 a0",
1472 " i i i i i i i i";
1473
1474 write_hi = " 0 1 0 0 1 0 0 0",
1475 " x x x x x a10 a9 a8",
1476 " a7 a6 a5 a4 a3 a2 a1 a0",
1477 " i i i i i i i i";
1478 ;
1479 memory "signature"
1480 size = 3;
1481 read = "0 0 1 1 0 0 0 0 x x x x x x x x",
1482 "x x x x x x a1 a0 o o o o o o o o";
1483 ;
1484 memory "fuse"
1485 size = 1;
1486 min_write_delay = 9000;
1487 max_write_delay = 20000;
1488 read = "0 1 0 1 0 0 0 0 x x x x x x x x",
1489 "x x x x x x x x x x o o o o o o";
1490
1491 write = "1 0 1 0 1 1 0 0 1 0 1 i i i i i",
1492 "x x x x x x x x x x x x x x x x";
1493 ;
1494 memory "lock"
1495 size = 1;
1496 min_write_delay = 9000;
1497 max_write_delay = 20000;
1498 read = "0 1 0 1 1 0 0 0 x x x x x x x x",
1499 "x x x x x x x x x x x x x o o x";
1500
1501 write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
1502 "x x x x x x x x x x x x x x x x";
1503 ;
1504 ;
1505
1506 #------------------------------------------------------------
1507 # AT90s8515
1508 #------------------------------------------------------------
1509
1510 part
1511 id = "8515";
1512 desc = "AT90S8515";
1513 stk500_devcode = 0x60;
1514 avr910_devcode = 0x38;
1515 chip_erase_delay = 20000;
1516 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
1517 "x x x x x x x x x x x x x x x x";
1518
1519 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
1520 "x x x x x x x x x x x x x x x x";
1521
1522 timeout = 200;
1523 stabdelay = 100;
1524 cmdexedelay = 25;
1525 synchloops = 32;
1526 bytedelay = 0;
1527 pollindex = 3;
1528 pollvalue = 0x53;
1529 predelay = 1;
1530 postdelay = 1;
1531 pollmethod = 0;
1532
1533 memory "eeprom"
1534 size = 512;
1535 min_write_delay = 4000;
1536 max_write_delay = 9000;
1537 readback_p1 = 0x80;
1538 readback_p2 = 0x7f;
1539 read = " 1 0 1 0 0 0 0 0 x x x x x x x a8",
1540 "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
1541
1542 write = " 1 1 0 0 0 0 0 0 x x x x x x x a8",
1543 "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
1544
1545 mode = 0x04;
1546 delay = 12;
1547 blocksize = 128;
1548 readsize = 256;
1549 ;
1550 memory "flash"
1551 size = 8192;
1552 min_write_delay = 4000;
1553 max_write_delay = 9000;
1554 readback_p1 = 0x7f;
1555 readback_p2 = 0x7f;
1556 read_lo = " 0 0 1 0 0 0 0 0",
1557 " x x x x a11 a10 a9 a8",
1558 " a7 a6 a5 a4 a3 a2 a1 a0",
1559 " o o o o o o o o";
1560
1561 read_hi = " 0 0 1 0 1 0 0 0",
1562 " x x x x a11 a10 a9 a8",
1563 " a7 a6 a5 a4 a3 a2 a1 a0",
1564 " o o o o o o o o";
1565
1566 write_lo = " 0 1 0 0 0 0 0 0",
1567 " x x x x a11 a10 a9 a8",
1568 " a7 a6 a5 a4 a3 a2 a1 a0",
1569 " i i i i i i i i";
1570
1571 write_hi = " 0 1 0 0 1 0 0 0",
1572 " x x x x a11 a10 a9 a8",
1573 " a7 a6 a5 a4 a3 a2 a1 a0",
1574 " i i i i i i i i";
1575
1576 mode = 0x04;
1577 delay = 12;
1578 blocksize = 128;
1579 readsize = 256;
1580 ;
1581 memory "signature"
1582 size = 3;
1583 read = "0 0 1 1 0 0 0 0 x x x x x x x x",
1584 "x x x x x x a1 a0 o o o o o o o o";
1585 ;
1586 memory "fuse"
1587 size = 1;
1588 read = "0 1 0 1 1 0 0 0 x x x x x x x x",
1589 "x x x x x x x x x x x x x x x o";
1590 write = "1 0 1 0 1 1 0 0 1 0 1 1 1 1 1 i",
1591 "x x x x x x x x x x x x x x x x";
1592 ;
1593 memory "lock"
1594 size = 1;
1595 read = "0 1 0 1 1 0 0 0 x x x x x x x x",
1596 "x x x x x x x x o o x x x x x x";
1597 write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
1598 "x x x x x x x x x x x x x x x x";
1599 ;
1600 ;
1601
1602 #------------------------------------------------------------
1603 # AT90s8535
1604 #------------------------------------------------------------
1605
1606 part
1607 id = "8535";
1608 desc = "AT90S8535";
1609 stk500_devcode = 0x61;
1610 avr910_devcode = 0x68;
1611 chip_erase_delay = 20000;
1612 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
1613 "x x x x x x x x x x x x x x x x";
1614
1615 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
1616 "x x x x x x x x x x x x x x x x";
1617
1618 timeout = 200;
1619 stabdelay = 100;
1620 cmdexedelay = 25;
1621 synchloops = 32;
1622 bytedelay = 0;
1623 pollindex = 3;
1624 pollvalue = 0x53;
1625 predelay = 1;
1626 postdelay = 1;
1627 pollmethod = 0;
1628
1629 memory "eeprom"
1630 size = 512;
1631 min_write_delay = 9000;
1632 max_write_delay = 20000;
1633 readback_p1 = 0x00;
1634 readback_p2 = 0xff;
1635 read = " 1 0 1 0 0 0 0 0 x x x x x x x a8",
1636 "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
1637
1638 write = " 1 1 0 0 0 0 0 0 x x x x x x x a8",
1639 "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
1640
1641 mode = 0x04;
1642 delay = 12;
1643 blocksize = 128;
1644 readsize = 256;
1645 ;
1646 memory "flash"
1647 size = 8192;
1648 min_write_delay = 9000;
1649 max_write_delay = 20000;
1650 readback_p1 = 0xff;
1651 readback_p2 = 0xff;
1652 read_lo = " 0 0 1 0 0 0 0 0",
1653 " x x x x a11 a10 a9 a8",
1654 " a7 a6 a5 a4 a3 a2 a1 a0",
1655 " o o o o o o o o";
1656
1657 read_hi = " 0 0 1 0 1 0 0 0",
1658 " x x x x a11 a10 a9 a8",
1659 " a7 a6 a5 a4 a3 a2 a1 a0",
1660 " o o o o o o o o";
1661
1662 write_lo = " 0 1 0 0 0 0 0 0",
1663 " x x x x a11 a10 a9 a8",
1664 " a7 a6 a5 a4 a3 a2 a1 a0",
1665 " i i i i i i i i";
1666
1667 write_hi = " 0 1 0 0 1 0 0 0",
1668 " x x x x a11 a10 a9 a8",
1669 " a7 a6 a5 a4 a3 a2 a1 a0",
1670 " i i i i i i i i";
1671
1672 mode = 0x04;
1673 delay = 12;
1674 blocksize = 128;
1675 readsize = 256;
1676 ;
1677 memory "signature"
1678 size = 3;
1679 read = "0 0 1 1 0 0 0 0 x x x x x x x x",
1680 "x x x x x x a1 a0 o o o o o o o o";
1681 ;
1682 memory "fuse"
1683 size = 1;
1684 read = "0 1 0 1 1 0 0 0 x x x x x x x x",
1685 "x x x x x x x x x x x x x x x o";
1686 write = "1 0 1 0 1 1 0 0 1 0 1 1 1 1 1 i",
1687 "x x x x x x x x x x x x x x x x";
1688 ;
1689 memory "lock"
1690 size = 1;
1691 read = "0 1 0 1 1 0 0 0 x x x x x x x x",
1692 "x x x x x x x x o o x x x x x x";
1693 write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
1694 "x x x x x x x x x x x x x x x x";
1695 ;
1696 ;
1697
1698 #------------------------------------------------------------
1699 # ATmega103
1700 #------------------------------------------------------------
1701
1702 part
1703 id = "m103";
1704 desc = "ATMEGA103";
1705 stk500_devcode = 0xB1;
1706 avr910_devcode = 0x41;
1707 chip_erase_delay = 112000;
1708 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
1709 "x x x x x x x x x x x x x x x x";
1710
1711 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
1712 "x x x x x x x x x x x x x x x x";
1713
1714 timeout = 200;
1715 stabdelay = 100;
1716 cmdexedelay = 25;
1717 synchloops = 32;
1718 bytedelay = 0;
1719 pollindex = 3;
1720 pollvalue = 0x53;
1721 predelay = 1;
1722 postdelay = 1;
1723 pollmethod = 0;
1724
1725 memory "eeprom"
1726 size = 4096;
1727 min_write_delay = 4000;
1728 max_write_delay = 9000;
1729 readback_p1 = 0x80;
1730 readback_p2 = 0x7f;
1731 read = " 1 0 1 0 0 0 0 0",
1732 " x x x x a11 a10 a9 a8",
1733 " a7 a6 a5 a4 a3 a2 a1 a0",
1734 " o o o o o o o o";
1735
1736 write = " 1 1 0 0 0 0 0 0",
1737 " x x x x a11 a10 a9 a8",
1738 " a7 a6 a5 a4 a3 a2 a1 a0",
1739 " i i i i i i i i";
1740
1741 mode = 0x04;
1742 delay = 12;
1743 blocksize = 64;
1744 readsize = 256;
1745 ;
1746
1747 memory "flash"
1748 paged = yes;
1749 size = 131072;
1750 page_size = 256;
1751 num_pages = 512;
1752 min_write_delay = 22000;
1753 max_write_delay = 56000;
1754 readback_p1 = 0xff;
1755 readback_p2 = 0xff;
1756 read_lo = " 0 0 1 0 0 0 0 0",
1757 "a15 a14 a13 a12 a11 a10 a9 a8",
1758 " a7 a6 a5 a4 a3 a2 a1 a0",
1759 " o o o o o o o o";
1760
1761 read_hi = " 0 0 1 0 1 0 0 0",
1762 "a15 a14 a13 a12 a11 a10 a9 a8",
1763 " a7 a6 a5 a4 a3 a2 a1 a0",
1764 " o o o o o o o o";
1765
1766 loadpage_lo = " 0 1 0 0 0 0 0 0",
1767 " x x x x x x x x",
1768 " x a6 a5 a4 a3 a2 a1 a0",
1769 " i i i i i i i i";
1770
1771 loadpage_hi = " 0 1 0 0 1 0 0 0",
1772 " x x x x x x x x",
1773 " x a6 a5 a4 a3 a2 a1 a0",
1774 " i i i i i i i i";
1775
1776 writepage = " 0 1 0 0 1 1 0 0",
1777 "a15 a14 a13 a12 a11 a10 a9 a8",
1778 " a7 x x x x x x x",
1779 " x x x x x x x x";
1780
1781 mode = 0x11;
1782 delay = 70;
1783 blocksize = 256;
1784 readsize = 256;
1785 ;
1786
1787 memory "fuse"
1788 size = 1;
1789 read = "0 1 0 1 0 0 0 0 x x x x x x x x",
1790 "x x x x x x x x x x o x o 1 o o";
1791
1792 write = "1 0 1 0 1 1 0 0 1 0 1 1 i 1 i i",
1793 "x x x x x x x x x x x x x x x x";
1794 ;
1795
1796 memory "lock"
1797 size = 1;
1798 read = "0 1 0 1 1 0 0 0 x x x x x x x x",
1799 "x x x x x x x x x x x x x o o x";
1800
1801 write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
1802 "x x x x x x x x x x x x x x x x";
1803 ;
1804
1805 memory "signature"
1806 size = 3;
1807 read = "0 0 1 1 0 0 0 0 x x x x x x x x",
1808 "x x x x x x a1 a0 o o o o o o o o";
1809 ;
1810 ;
1811
1812
1813 #------------------------------------------------------------
1814 # ATmega64
1815 #------------------------------------------------------------
1816
1817 part
1818 id = "m64";
1819 desc = "ATMEGA64";
1820 has_jtag = yes;
1821 stk500_devcode = 0xA0;
1822 chip_erase_delay = 9000;
1823 pagel = 0xD7;
1824 bs2 = 0xA0;
1825 reset = dedicated;
1826 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
1827 "x x x x x x x x x x x x x x x x";
1828
1829 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
1830 "x x x x x x x x x x x x x x x x";
1831
1832 timeout = 200;
1833 stabdelay = 100;
1834 cmdexedelay = 25;
1835 synchloops = 32;
1836 bytedelay = 0;
1837 pollindex = 3;
1838 pollvalue = 0x53;
1839 predelay = 1;
1840 postdelay = 1;
1841 pollmethod = 0;
1842
1843 idr = 0x22;
1844 spmcr = 0x68;
1845 allowfullpagebitstream = yes;
1846
1847 memory "eeprom"
1848 paged = no; /* leave this "no" */
1849 page_size = 8; /* for parallel programming */
1850 size = 2048;
1851 min_write_delay = 9000;
1852 max_write_delay = 9000;
1853 readback_p1 = 0xff;
1854 readback_p2 = 0xff;
1855 read = " 1 0 1 0 0 0 0 0",
1856 " x x x x a11 a10 a9 a8",
1857 " a7 a6 a5 a4 a3 a2 a1 a0",
1858 " o o o o o o o o";
1859
1860 write = " 1 1 0 0 0 0 0 0",
1861 " x x x x a11 a10 a9 a8",
1862 " a7 a6 a5 a4 a3 a2 a1 a0",
1863 " i i i i i i i i";
1864
1865 mode = 0x04;
1866 delay = 20;
1867 blocksize = 64;
1868 readsize = 256;
1869 ;
1870
1871 memory "flash"
1872 paged = yes;
1873 size = 65536;
1874 page_size = 256;
1875 num_pages = 256;
1876 min_write_delay = 4500;
1877 max_write_delay = 4500;
1878 readback_p1 = 0xff;
1879 readback_p2 = 0xff;
1880 read_lo = " 0 0 1 0 0 0 0 0",
1881 " x a14 a13 a12 a11 a10 a9 a8",
1882 " a7 a6 a5 a4 a3 a2 a1 a0",
1883 " o o o o o o o o";
1884
1885 read_hi = " 0 0 1 0 1 0 0 0",
1886 " x a14 a13 a12 a11 a10 a9 a8",
1887 " a7 a6 a5 a4 a3 a2 a1 a0",
1888 " o o o o o o o o";
1889
1890
1891 loadpage_lo = " 0 1 0 0 0 0 0 0",
1892 " x x x x x x x x",
1893 " x a6 a5 a4 a3 a2 a1 a0",
1894 " i i i i i i i i";
1895
1896 loadpage_hi = " 0 1 0 0 1 0 0 0",
1897 " x x x x x x x x",
1898 " x a6 a5 a4 a3 a2 a1 a0",
1899 " i i i i i i i i";
1900
1901 writepage = " 0 1 0 0 1 1 0 0",
1902 " x a14 a13 a12 a11 a10 a9 a8",
1903 " a7 x x x x x x x",
1904 " x x x x x x x x";
1905
1906 mode = 0x21;
1907 delay = 6;
1908 blocksize = 128;
1909 readsize = 256;
1910 ;
1911
1912 memory "lfuse"
1913 size = 1;
1914 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
1915 "x x x x x x x x i i i i i i i i";
1916
1917 read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
1918 "x x x x x x x x o o o o o o o o";
1919 ;
1920
1921 memory "hfuse"
1922 size = 1;
1923 write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
1924 "x x x x x x x x i i i i i i i i";
1925
1926 read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
1927 "x x x x x x x x o o o o o o o o";
1928 ;
1929
1930 memory "efuse"
1931 size = 1;
1932 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
1933 "x x x x x x x x x x x x x x i i";
1934
1935 read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
1936 "x x x x x x x x o o o o o o o o";
1937 ;
1938
1939 memory "lock"
1940 size = 1;
1941 read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
1942 "x x x x x x x x x x o o o o o o";
1943
1944 write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
1945 "x x x x x x x x 1 1 i i i i i i";
1946 ;
1947
1948 memory "calibration"
1949 size = 1;
1950 read = "0 0 1 1 1 0 0 0 x x x x x x x x",
1951 "0 0 0 0 0 0 0 0 o o o o o o o o";
1952 ;
1953
1954 memory "signature"
1955 size = 3;
1956 read = "0 0 1 1 0 0 0 0 x x x x x x x x",
1957 "x x x x x x a1 a0 o o o o o o o o";
1958 ;
1959 ;
1960
1961
1962
1963
1964 #------------------------------------------------------------
1965 # ATmega128
1966 #------------------------------------------------------------
1967
1968 part
1969 id = "m128";
1970 desc = "ATMEGA128";
1971 has_jtag = yes;
1972 stk500_devcode = 0xB2;
1973 avr910_devcode = 0x43;
1974 chip_erase_delay = 9000;
1975 pagel = 0xD7;
1976 bs2 = 0xA0;
1977 reset = dedicated;
1978 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
1979 "x x x x x x x x x x x x x x x x";
1980
1981 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
1982 "x x x x x x x x x x x x x x x x";
1983
1984 timeout = 200;
1985 stabdelay = 100;
1986 cmdexedelay = 25;
1987 synchloops = 32;
1988 bytedelay = 0;
1989 pollindex = 3;
1990 pollvalue = 0x53;
1991 predelay = 1;
1992 postdelay = 1;
1993 pollmethod = 0;
1994
1995 idr = 0x22;
1996 spmcr = 0x68;
1997 rampz = 0x3b;
1998 allowfullpagebitstream = yes;
1999
2000 memory "eeprom"
2001 paged = no; /* leave this "no" */
2002 page_size = 8; /* for parallel programming */
2003 size = 4096;
2004 min_write_delay = 9000;
2005 max_write_delay = 9000;
2006 readback_p1 = 0xff;
2007 readback_p2 = 0xff;
2008 read = " 1 0 1 0 0 0 0 0",
2009 " x x x x a11 a10 a9 a8",
2010 " a7 a6 a5 a4 a3 a2 a1 a0",
2011 " o o o o o o o o";
2012
2013 write = " 1 1 0 0 0 0 0 0",
2014 " x x x x a11 a10 a9 a8",
2015 " a7 a6 a5 a4 a3 a2 a1 a0",
2016 " i i i i i i i i";
2017
2018 mode = 0x04;
2019 delay = 12;
2020 blocksize = 64;
2021 readsize = 256;
2022 ;
2023
2024 memory "flash"
2025 paged = yes;
2026 size = 131072;
2027 page_size = 256;
2028 num_pages = 512;
2029 min_write_delay = 4500;
2030 max_write_delay = 4500;
2031 readback_p1 = 0xff;
2032 readback_p2 = 0xff;
2033 read_lo = " 0 0 1 0 0 0 0 0",
2034 "a15 a14 a13 a12 a11 a10 a9 a8",
2035 " a7 a6 a5 a4 a3 a2 a1 a0",
2036 " o o o o o o o o";
2037
2038 read_hi = " 0 0 1 0 1 0 0 0",
2039 "a15 a14 a13 a12 a11 a10 a9 a8",
2040 " a7 a6 a5 a4 a3 a2 a1 a0",
2041 " o o o o o o o o";
2042
2043 loadpage_lo = " 0 1 0 0 0 0 0 0",
2044 " x x x x x x x x",
2045 " x a6 a5 a4 a3 a2 a1 a0",
2046 " i i i i i i i i";
2047
2048 loadpage_hi = " 0 1 0 0 1 0 0 0",
2049 " x x x x x x x x",
2050 " x a6 a5 a4 a3 a2 a1 a0",
2051 " i i i i i i i i";
2052
2053 writepage = " 0 1 0 0 1 1 0 0",
2054 "a15 a14 a13 a12 a11 a10 a9 a8",
2055 " a7 x x x x x x x",
2056 " x x x x x x x x";
2057
2058 mode = 0x21;
2059 delay = 6;
2060 blocksize = 128;
2061 readsize = 256;
2062 ;
2063
2064 memory "lfuse"
2065 size = 1;
2066 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
2067 "x x x x x x x x i i i i i i i i";
2068
2069 read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
2070 "x x x x x x x x o o o o o o o o";
2071 ;
2072
2073 memory "hfuse"
2074 size = 1;
2075 write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
2076 "x x x x x x x x i i i i i i i i";
2077
2078 read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
2079 "x x x x x x x x o o o o o o o o";
2080 ;
2081
2082 memory "efuse"
2083 size = 1;
2084 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
2085 "x x x x x x x x x x x x x x i i";
2086
2087 read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
2088 "x x x x x x x x o o o o o o o o";
2089 ;
2090
2091 memory "lock"
2092 size = 1;
2093 read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
2094 "x x x x x x x x x x o o o o o o";
2095
2096 write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
2097 "x x x x x x x x 1 1 i i i i i i";
2098 ;
2099
2100 memory "calibration"
2101 size = 4;
2102 read = "0 0 1 1 1 0 0 0 x x x x x x x x",
2103 "0 0 0 0 0 0 a1 a0 o o o o o o o o";
2104 ;
2105
2106 memory "signature"
2107 size = 3;
2108 read = "0 0 1 1 0 0 0 0 x x x x x x x x",
2109 "x x x x x x a1 a0 o o o o o o o o";
2110 ;
2111 ;
2112
2113 #------------------------------------------------------------
2114 # AT90CAN128
2115 #------------------------------------------------------------
2116
2117 part
2118 id = "c128";
2119 desc = "AT90CAN128";
2120 has_jtag = yes;
2121 stk500_devcode = 0xB3;
2122 # avr910_devcode = 0x43;
2123 chip_erase_delay = 9000;
2124 pagel = 0xD7;
2125 bs2 = 0xA0;
2126 reset = dedicated;
2127 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
2128 "x x x x x x x x x x x x x x x x";
2129
2130 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
2131 "x x x x x x x x x x x x x x x x";
2132
2133 timeout = 200;
2134 stabdelay = 100;
2135 cmdexedelay = 25;
2136 synchloops = 32;
2137 bytedelay = 0;
2138 pollindex = 3;
2139 pollvalue = 0x53;
2140 predelay = 1;
2141 postdelay = 1;
2142 pollmethod = 1;
2143
2144 idr = 0x31;
2145 spmcr = 0x57;
2146 rampz = 0x3b;
2147 eecr = 0x3f;
2148 allowfullpagebitstream = no;
2149
2150 memory "eeprom"
2151 paged = no; /* leave this "no" */
2152 page_size = 8; /* for parallel programming */
2153 size = 4096;
2154 min_write_delay = 9000;
2155 max_write_delay = 9000;
2156 readback_p1 = 0xff;
2157 readback_p2 = 0xff;
2158 read = " 1 0 1 0 0 0 0 0",
2159 " 0 0 0 x a11 a10 a9 a8",
2160 " a7 a6 a5 a4 a3 a2 a1 a0",
2161 " o o o o o o o o";
2162
2163 write = " 1 1 0 0 0 0 0 0",
2164 " 0 0 0 x a11 a10 a9 a8",
2165 " a7 a6 a5 a4 a3 a2 a1 a0",
2166 " i i i i i i i i";
2167
2168 mode = 0x41;
2169 delay = 20;
2170 blocksize = 8;
2171 readsize = 256;
2172 ;
2173
2174 memory "flash"
2175 paged = yes;
2176 size = 131072;
2177 page_size = 256;
2178 num_pages = 512;
2179 min_write_delay = 4500;
2180 max_write_delay = 4500;
2181 readback_p1 = 0xff;
2182 readback_p2 = 0xff;
2183 read_lo = " 0 0 1 0 0 0 0 0",
2184 "a15 a14 a13 a12 a11 a10 a9 a8",
2185 " a7 a6 a5 a4 a3 a2 a1 a0",
2186 " o o o o o o o o";
2187
2188 read_hi = " 0 0 1 0 1 0 0 0",
2189 "a15 a14 a13 a12 a11 a10 a9 a8",
2190 " a7 a6 a5 a4 a3 a2 a1 a0",
2191 " o o o o o o o o";
2192
2193 loadpage_lo = " 0 1 0 0 0 0 0 0",
2194 " 0 0 0 x x x x x",
2195 " x a6 a5 a4 a3 a2 a1 a0",
2196 " i i i i i i i i";
2197
2198 loadpage_hi = " 0 1 0 0 1 0 0 0",
2199 " 0 0 0 x x x x x",
2200 " x a6 a5 a4 a3 a2 a1 a0",
2201 " i i i i i i i i";
2202
2203 writepage = " 0 1 0 0 1 1 0 0",
2204 "a15 a14 a13 a12 a11 a10 a9 a8",
2205 " a7 x x x x x x x",
2206 " x x x x x x x x";
2207
2208 mode = 0x41;
2209 delay = 6;
2210 blocksize = 256;
2211 readsize = 256;
2212 ;
2213
2214 memory "lfuse"
2215 size = 1;
2216 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
2217 "x x x x x x x x i i i i i i i i";
2218
2219 read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
2220 "x x x x x x x x o o o o o o o o";
2221 ;
2222
2223 memory "hfuse"
2224 size = 1;
2225 write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
2226 "x x x x x x x x i i i i i i i i";
2227
2228 read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
2229 "x x x x x x x x o o o o o o o o";
2230 ;
2231
2232 memory "efuse"
2233 size = 1;
2234 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
2235 "x x x x x x x x x x x x i i i i";
2236
2237 read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
2238 "x x x x x x x x o o o o o o o o";
2239 ;
2240
2241 memory "lock"
2242 size = 1;
2243 read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
2244 "x x x x x x x x x x o o o o o o";
2245
2246 write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
2247 "x x x x x x x x 1 1 i i i i i i";
2248 ;
2249
2250 memory "calibration"
2251 size = 1;
2252 read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
2253 "0 0 0 0 0 0 0 0 o o o o o o o o";
2254 ;
2255
2256 memory "signature"
2257 size = 3;
2258 read = "0 0 1 1 0 0 0 0 x x x x x x x x",
2259 "x x x x x x a1 a0 o o o o o o o o";
2260 ;
2261 ;
2262
2263
2264 #------------------------------------------------------------
2265 # ATmega16
2266 #------------------------------------------------------------
2267
2268 part
2269 id = "m16";
2270 desc = "ATMEGA16";
2271 has_jtag = yes;
2272 stk500_devcode = 0x82;
2273 avr910_devcode = 0x74;
2274 pagel = 0xd7;
2275 bs2 = 0xa0;
2276 chip_erase_delay = 9000;
2277 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
2278 "x x x x x x x x x x x x x x x x";
2279
2280 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
2281 "x x x x x x x x x x x x x x x x";
2282
2283 timeout = 200;
2284 stabdelay = 100;
2285 cmdexedelay = 25;
2286 synchloops = 32;
2287 bytedelay = 0;
2288 pollindex = 3;
2289 pollvalue = 0x53;
2290 predelay = 1;
2291 postdelay = 1;
2292 pollmethod = 0;
2293
2294 idr = 0x31;
2295 spmcr = 0x57;
2296 allowfullpagebitstream = yes;
2297
2298 memory "eeprom"
2299 paged = no; /* leave this "no" */
2300 page_size = 4; /* for parallel programming */
2301 size = 512;
2302 min_write_delay = 9000;
2303 max_write_delay = 9000;
2304 readback_p1 = 0xff;
2305 readback_p2 = 0xff;
2306 read = " 1 0 1 0 0 0 0 0",
2307 " 0 0 x x x x a9 a8",
2308 " a7 a6 a5 a4 a3 a2 a1 a0",
2309 " o o o o o o o o";
2310
2311 write = " 1 1 0 0 0 0 0 0",
2312 " 0 0 x x x x a9 a8",
2313 " a7 a6 a5 a4 a3 a2 a1 a0",
2314 " i i i i i i i i";
2315
2316 mode = 0x04;
2317 delay = 10;
2318 blocksize = 128;
2319 readsize = 256;
2320 ;
2321
2322 memory "flash"
2323 paged = yes;
2324 size = 16384;
2325 page_size = 128;
2326 num_pages = 128;
2327 min_write_delay = 4500;
2328 max_write_delay = 4500;
2329 readback_p1 = 0xff;
2330 readback_p2 = 0xff;
2331 read_lo = " 0 0 1 0 0 0 0 0",
2332 " 0 0 a13 a12 a11 a10 a9 a8",
2333 " a7 a6 a5 a4 a3 a2 a1 a0",
2334 " o o o o o o o o";
2335
2336 read_hi = " 0 0 1 0 1 0 0 0",
2337 " 0 0 a13 a12 a11 a10 a9 a8",
2338 " a7 a6 a5 a4 a3 a2 a1 a0",
2339 " o o o o o o o o";
2340
2341 loadpage_lo = " 0 1 0 0 0 0 0 0",
2342 " 0 0 x x x x x x",
2343 " x x a5 a4 a3 a2 a1 a0",
2344 " i i i i i i i i";
2345
2346 loadpage_hi = " 0 1 0 0 1 0 0 0",
2347 " 0 0 x x x x x x",
2348 " x x a5 a4 a3 a2 a1 a0",
2349 " i i i i i i i i";
2350
2351 writepage = " 0 1 0 0 1 1 0 0",
2352 " 0 0 a13 a12 a11 a10 a9 a8",
2353 " a7 a6 x x x x x x",
2354 " x x x x x x x x";
2355
2356 mode = 0x21;
2357 delay = 6;
2358 blocksize = 128;
2359 readsize = 256;
2360 ;
2361
2362 memory "lock"
2363 size = 1;
2364 read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
2365 "x x x x x x x x x x o o o o o o";
2366
2367 write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
2368 "x x x x x x x x 1 1 i i i i i i";
2369 ;
2370
2371 memory "lfuse"
2372 size = 1;
2373 read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
2374 "x x x x x x x x o o o o o o o o";
2375
2376 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
2377 "x x x x x x x x i i i i i i i i";
2378 ;
2379
2380 memory "hfuse"
2381 size = 1;
2382 read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
2383 "x x x x x x x x o o o o o o o o";
2384
2385 write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
2386 "x x x x x x x x i i i i i i i i";
2387 ;
2388 memory "signature"
2389 size = 3;
2390 read = "0 0 1 1 0 0 0 0 x x x x x x x x",
2391 "x x x x x x a1 a0 o o o o o o o o";
2392 ;
2393 ;
2394
2395
2396 #------------------------------------------------------------
2397 # ATmega164
2398 #------------------------------------------------------------
2399
2400 # close to ATmega16
2401
2402 part
2403 id = "m164";
2404 desc = "ATMEGA164";
2405 has_jtag = yes;
2406 # stk500_devcode = 0x82; # no STK500v1 support
2407 # avr910_devcode = 0x?; # try the ATmega16 one:^
2408 avr910_devcode = 0x74;
2409 pagel = 0xd7;
2410 bs2 = 0xa0;
2411 chip_erase_delay = 9000;
2412 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
2413 "x x x x x x x x x x x x x x x x";
2414
2415 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
2416 "x x x x x x x x x x x x x x x x";
2417
2418 timeout = 200;
2419 stabdelay = 100;
2420 cmdexedelay = 25;
2421 synchloops = 32;
2422 bytedelay = 0;
2423 pollindex = 3;
2424 pollvalue = 0x53;
2425 predelay = 1;
2426 postdelay = 1;
2427 pollmethod = 0;
2428
2429 idr = 0x31;
2430 spmcr = 0x57;
2431 allowfullpagebitstream = no;
2432
2433 memory "eeprom"
2434 paged = no; /* leave this "no" */
2435 page_size = 4; /* for parallel programming */
2436 size = 512;
2437 min_write_delay = 9000;
2438 max_write_delay = 9000;
2439 readback_p1 = 0xff;
2440 readback_p2 = 0xff;
2441 read = " 1 0 1 0 0 0 0 0",
2442 " 0 0 x x x x a9 a8",
2443 " a7 a6 a5 a4 a3 a2 a1 a0",
2444 " o o o o o o o o";
2445
2446 write = " 1 1 0 0 0 0 0 0",
2447 " 0 0 x x x x a9 a8",
2448 " a7 a6 a5 a4 a3 a2 a1 a0",
2449 " i i i i i i i i";
2450
2451 mode = 0x04;
2452 delay = 10;
2453 blocksize = 128;
2454 readsize = 256;
2455 ;
2456
2457 memory "flash"
2458 paged = yes;
2459 size = 16384;
2460 page_size = 128;
2461 num_pages = 128;
2462 min_write_delay = 4500;
2463 max_write_delay = 4500;
2464 readback_p1 = 0xff;
2465 readback_p2 = 0xff;
2466 read_lo = " 0 0 1 0 0 0 0 0",
2467 " 0 0 a13 a12 a11 a10 a9 a8",
2468 " a7 a6 a5 a4 a3 a2 a1 a0",
2469 " o o o o o o o o";
2470
2471 read_hi = " 0 0 1 0 1 0 0 0",
2472 " 0 0 a13 a12 a11 a10 a9 a8",
2473 " a7 a6 a5 a4 a3 a2 a1 a0",
2474 " o o o o o o o o";
2475
2476 loadpage_lo = " 0 1 0 0 0 0 0 0",
2477 " 0 0 x x x x x x",
2478 " x x a5 a4 a3 a2 a1 a0",
2479 " i i i i i i i i";
2480
2481 loadpage_hi = " 0 1 0 0 1 0 0 0",
2482 " 0 0 x x x x x x",
2483 " x x a5 a4 a3 a2 a1 a0",
2484 " i i i i i i i i";
2485
2486 writepage = " 0 1 0 0 1 1 0 0",
2487 " 0 0 a13 a12 a11 a10 a9 a8",
2488 " a7 a6 x x x x x x",
2489 " x x x x x x x x";
2490
2491 mode = 0x21;
2492 delay = 6;
2493 blocksize = 128;
2494 readsize = 256;
2495 ;
2496
2497 memory "lock"
2498 size = 1;
2499 read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
2500 "x x x x x x x x x x o o o o o o";
2501
2502 write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
2503 "x x x x x x x x 1 1 i i i i i i";
2504 ;
2505
2506 memory "lfuse"
2507 size = 1;
2508 read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
2509 "x x x x x x x x o o o o o o o o";
2510
2511 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
2512 "x x x x x x x x i i i i i i i i";
2513 ;
2514
2515 memory "hfuse"
2516 size = 1;
2517 read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
2518 "x x x x x x x x o o o o o o o o";
2519
2520 write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
2521 "x x x x x x x x i i i i i i i i";
2522 ;
2523
2524 memory "efuse"
2525 size = 1;
2526
2527 read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
2528 "x x x x x x x x o o o o o o o o";
2529
2530 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
2531 "x x x x x x x x 1 1 1 1 1 i i i";
2532 ;
2533
2534 memory "signature"
2535 size = 3;
2536 read = "0 0 1 1 0 0 0 0 x x x x x x x x",
2537 "x x x x x x a1 a0 o o o o o o o o";
2538 ;
2539
2540 memory "calibration"
2541 size = 1;
2542
2543 read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
2544 "0 0 0 0 0 0 0 0 o o o o o o o o";
2545 ;
2546 ;
2547
2548
2549 #------------------------------------------------------------
2550 # ATmega324
2551 #------------------------------------------------------------
2552
2553 # similar to ATmega164
2554
2555 part
2556 id = "m324";
2557 desc = "ATMEGA324";
2558 has_jtag = yes;
2559 # stk500_devcode = 0x82; # no STK500v1 support
2560 # avr910_devcode = 0x?; # try the ATmega16 one:^
2561 avr910_devcode = 0x74;
2562 pagel = 0xd7;
2563 bs2 = 0xa0;
2564 chip_erase_delay = 9000;
2565 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
2566 "x x x x x x x x x x x x x x x x";
2567
2568 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
2569 "x x x x x x x x x x x x x x x x";
2570
2571 timeout = 200;
2572 stabdelay = 100;
2573 cmdexedelay = 25;
2574 synchloops = 32;
2575 bytedelay = 0;
2576 pollindex = 3;
2577 pollvalue = 0x53;
2578 predelay = 1;
2579 postdelay = 1;
2580 pollmethod = 0;
2581
2582 idr = 0x31;
2583 spmcr = 0x57;
2584 allowfullpagebitstream = no;
2585
2586 memory "eeprom"
2587 paged = no; /* leave this "no" */
2588 page_size = 4; /* for parallel programming */
2589 size = 1024;
2590 min_write_delay = 9000;
2591 max_write_delay = 9000;
2592 readback_p1 = 0xff;
2593 readback_p2 = 0xff;
2594 read = " 1 0 1 0 0 0 0 0",
2595 " 0 0 x x x a10 a9 a8",
2596 " a7 a6 a5 a4 a3 a2 a1 a0",
2597 " o o o o o o o o";
2598
2599 write = " 1 1 0 0 0 0 0 0",
2600 " 0 0 x x x a10 a9 a8",
2601 " a7 a6 a5 a4 a3 a2 a1 a0",
2602 " i i i i i i i i";
2603
2604 mode = 0x04;
2605 delay = 10;
2606 blocksize = 128;
2607 readsize = 256;
2608 ;
2609
2610 memory "flash"
2611 paged = yes;
2612 size = 32768;
2613 page_size = 256;
2614 num_pages = 128;
2615 min_write_delay = 4500;
2616 max_write_delay = 4500;
2617 readback_p1 = 0xff;
2618 readback_p2 = 0xff;
2619 read_lo = " 0 0 1 0 0 0 0 0",
2620 " 0 a14 a13 a12 a11 a10 a9 a8",
2621 " a7 a6 a5 a4 a3 a2 a1 a0",
2622 " o o o o o o o o";
2623
2624 read_hi = " 0 0 1 0 1 0 0 0",
2625 " 0 a14 a13 a12 a11 a10 a9 a8",
2626 " a7 a6 a5 a4 a3 a2 a1 a0",
2627 " o o o o o o o o";
2628
2629 loadpage_lo = " 0 1 0 0 0 0 0 0",
2630 " 0 0 x x x x x x",
2631 " x a6 a5 a4 a3 a2 a1 a0",
2632 " i i i i i i i i";
2633
2634 loadpage_hi = " 0 1 0 0 1 0 0 0",
2635 " 0 0 x x x x x x",
2636 " x a6 a5 a4 a3 a2 a1 a0",
2637 " i i i i i i i i";
2638
2639 writepage = " 0 1 0 0 1 1 0 0",
2640 " 0 a14 a13 a12 a11 a10 a9 a8",
2641 " a7 x x x x x x x",
2642 " x x x x x x x x";
2643
2644 mode = 0x21;
2645 delay = 6;
2646 blocksize = 256;
2647 readsize = 256;
2648 ;
2649
2650 memory "lock"
2651 size = 1;
2652 read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
2653 "x x x x x x x x x x o o o o o o";
2654
2655 write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
2656 "x x x x x x x x 1 1 i i i i i i";
2657 ;
2658
2659 memory "lfuse"
2660 size = 1;
2661 read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
2662 "x x x x x x x x o o o o o o o o";
2663
2664 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
2665 "x x x x x x x x i i i i i i i i";
2666 ;
2667
2668 memory "hfuse"
2669 size = 1;
2670 read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
2671 "x x x x x x x x o o o o o o o o";
2672
2673 write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
2674 "x x x x x x x x i i i i i i i i";
2675 ;
2676
2677 memory "efuse"
2678 size = 1;
2679
2680 read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
2681 "x x x x x x x x o o o o o o o o";
2682
2683 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
2684 "x x x x x x x x 1 1 1 1 1 i i i";
2685 ;
2686
2687 memory "signature"
2688 size = 3;
2689 read = "0 0 1 1 0 0 0 0 x x x x x x x x",
2690 "x x x x x x a1 a0 o o o o o o o o";
2691 ;
2692
2693 memory "calibration"
2694 size = 1;
2695
2696 read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
2697 "0 0 0 0 0 0 0 0 o o o o o o o o";
2698 ;
2699 ;
2700
2701
2702 #------------------------------------------------------------
2703 # ATmega644
2704 #------------------------------------------------------------
2705
2706 # similar to ATmega164
2707
2708 part
2709 id = "m644";
2710 desc = "ATMEGA644";
2711 has_jtag = yes;
2712 # stk500_devcode = 0x82; # no STK500v1 support
2713 # avr910_devcode = 0x?; # try the ATmega16 one:^
2714 avr910_devcode = 0x74;
2715 pagel = 0xd7;
2716 bs2 = 0xa0;
2717 chip_erase_delay = 9000;
2718 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
2719 "x x x x x x x x x x x x x x x x";
2720
2721 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
2722 "x x x x x x x x x x x x x x x x";
2723
2724 timeout = 200;
2725 stabdelay = 100;
2726 cmdexedelay = 25;
2727 synchloops = 32;
2728 bytedelay = 0;
2729 pollindex = 3;
2730 pollvalue = 0x53;
2731 predelay = 1;
2732 postdelay = 1;
2733 pollmethod = 0;
2734
2735 idr = 0x31;
2736 spmcr = 0x57;
2737 allowfullpagebitstream = no;
2738
2739 memory "eeprom"
2740 paged = no; /* leave this "no" */
2741 page_size = 8; /* for parallel programming */
2742 size = 2048;
2743 min_write_delay = 9000;
2744 max_write_delay = 9000;
2745 readback_p1 = 0xff;
2746 readback_p2 = 0xff;
2747 read = " 1 0 1 0 0 0 0 0",
2748 " 0 0 x x a11 a10 a9 a8",
2749 " a7 a6 a5 a4 a3 a2 a1 a0",
2750 " o o o o o o o o";
2751
2752 write = " 1 1 0 0 0 0 0 0",
2753 " 0 0 x x a11 a10 a9 a8",
2754 " a7 a6 a5 a4 a3 a2 a1 a0",
2755 " i i i i i i i i";
2756
2757 mode = 0x04;
2758 delay = 10;
2759 blocksize = 128;
2760 readsize = 256;
2761 ;
2762
2763 memory "flash"
2764 paged = yes;
2765 size = 65536;
2766 page_size = 256;
2767 num_pages = 256;
2768 min_write_delay = 4500;
2769 max_write_delay = 4500;
2770 readback_p1 = 0xff;
2771 readback_p2 = 0xff;
2772 read_lo = " 0 0 1 0 0 0 0 0",
2773 "a15 a14 a13 a12 a11 a10 a9 a8",
2774 " a7 a6 a5 a4 a3 a2 a1 a0",
2775 " o o o o o o o o";
2776
2777 read_hi = " 0 0 1 0 1 0 0 0",
2778 "a15 a14 a13 a12 a11 a10 a9 a8",
2779 " a7 a6 a5 a4 a3 a2 a1 a0",
2780 " o o o o o o o o";
2781
2782 loadpage_lo = " 0 1 0 0 0 0 0 0",
2783 " 0 0 x x x x x x",
2784 " x a6 a5 a4 a3 a2 a1 a0",
2785 " i i i i i i i i";
2786
2787 loadpage_hi = " 0 1 0 0 1 0 0 0",
2788 " 0 0 x x x x x x",
2789 " x a6 a5 a4 a3 a2 a1 a0",
2790 " i i i i i i i i";
2791
2792 writepage = " 0 1 0 0 1 1 0 0",
2793 "a15 a14 a13 a12 a11 a10 a9 a8",
2794 " a7 x x x x x x x",
2795 " x x x x x x x x";
2796
2797 mode = 0x21;
2798 delay = 6;
2799 blocksize = 256;
2800 readsize = 256;
2801 ;
2802
2803 memory "lock"
2804 size = 1;
2805 read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
2806 "x x x x x x x x x x o o o o o o";
2807
2808 write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
2809 "x x x x x x x x 1 1 i i i i i i";
2810 ;
2811
2812 memory "lfuse"
2813 size = 1;
2814 read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
2815 "x x x x x x x x o o o o o o o o";
2816
2817 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
2818 "x x x x x x x x i i i i i i i i";
2819 ;
2820
2821 memory "hfuse"
2822 size = 1;
2823 read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
2824 "x x x x x x x x o o o o o o o o";
2825
2826 write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
2827 "x x x x x x x x i i i i i i i i";
2828 ;
2829
2830 memory "efuse"
2831 size = 1;
2832
2833 read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
2834 "x x x x x x x x o o o o o o o o";
2835
2836 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
2837 "x x x x x x x x 1 1 1 1 1 i i i";
2838 ;
2839
2840 memory "signature"
2841 size = 3;
2842 read = "0 0 1 1 0 0 0 0 x x x x x x x x",
2843 "x x x x x x a1 a0 o o o o o o o o";
2844 ;
2845
2846 memory "calibration"
2847 size = 1;
2848
2849 read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
2850 "0 0 0 0 0 0 0 0 o o o o o o o o";
2851 ;
2852 ;
2853
2854
2855 #------------------------------------------------------------
2856 # ATmega162
2857 #------------------------------------------------------------
2858
2859 part
2860 id = "m162";
2861 desc = "ATMEGA162";
2862 has_jtag = yes;
2863 stk500_devcode = 0x83;
2864 chip_erase_delay = 9000;
2865
2866 idr = 0x04;
2867 spmcr = 0x57;
2868 allowfullpagebitstream = yes;
2869
2870 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
2871 "x x x x x x x x x x x x x x x x";
2872
2873 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
2874 "x x x x x x x x x x x x x x x x";
2875
2876 memory "flash"
2877 paged = yes;
2878 size = 16384;
2879 page_size = 128;
2880 num_pages = 128;
2881 min_write_delay = 4500;
2882 max_write_delay = 4500;
2883 readback_p1 = 0xff;
2884 readback_p2 = 0xff;
2885
2886 read_lo = " 0 0 1 0 0 0 0 0",
2887 " 0 0 a13 a12 a11 a10 a9 a8",
2888 " a7 a6 a5 a4 a3 a2 a1 a0",
2889 " o o o o o o o o";
2890
2891 read_hi = " 0 0 1 0 1 0 0 0",
2892 " 0 0 a13 a12 a11 a10 a9 a8",
2893 " a7 a6 a5 a4 a3 a2 a1 a0",
2894 " o o o o o o o o";
2895
2896 loadpage_lo = " 0 1 0 0 0 0 0 0",
2897 " 0 0 x x x x x x",
2898 " x x a5 a4 a3 a2 a1 a0",
2899 " i i i i i i i i";
2900
2901 loadpage_hi = " 0 1 0 0 1 0 0 0",
2902 " 0 0 x x x x x x",
2903 " x x a5 a4 a3 a2 a1 a0",
2904 " i i i i i i i i";
2905
2906 writepage = " 0 1 0 0 1 1 0 0",
2907 " 0 0 a13 a12 a11 a10 a9 a8",
2908 " a7 a6 x x x x x x",
2909 " x x x x x x x x";
2910 ;
2911
2912 timeout = 200;
2913 stabdelay = 100;
2914 cmdexedelay = 25;
2915 synchloops = 32;
2916 bytedelay = 0;
2917 pollindex = 3;
2918 pollvalue = 0x53;
2919 predelay = 1;
2920 postdelay = 1;
2921 pollmethod = 0;
2922
2923 memory "eeprom"
2924 paged = no; /* leave this "no" */
2925 page_size = 4; /* for parallel programming */
2926 size = 512;
2927 min_write_delay = 9000;
2928 max_write_delay = 9000;
2929 readback_p1 = 0xff;
2930 readback_p2 = 0xff;
2931
2932 read = " 1 0 1 0 0 0 0 0",
2933 " 0 0 x x x x a9 a8",
2934 " a7 a6 a5 a4 a3 a2 a1 a0",
2935 " o o o o o o o o";
2936
2937 write = " 1 1 0 0 0 0 0 0",
2938 " 0 0 x x x x a9 a8",
2939 " a7 a6 a5 a4 a3 a2 a1 a0",
2940 " i i i i i i i i";
2941
2942 mode = 0x41;
2943 delay = 20;
2944 blocksize = 4;
2945 readsize = 256;
2946 ;
2947
2948 memory "lfuse"
2949 size = 1;
2950 min_write_delay = 16000;
2951 max_write_delay = 16000;
2952 read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
2953 "x x x x x x x x o o o o o o o o";
2954
2955 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
2956 "x x x x x x x x i i i i i i i i";
2957 ;
2958
2959 memory "hfuse"
2960 size = 1;
2961 min_write_delay = 16000;
2962 max_write_delay = 16000;
2963
2964 read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
2965 "x x x x x x x x o o o o o o o o";
2966
2967 write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
2968 "x x x x x x x x i i i i i i i i";
2969 ;
2970
2971 memory "efuse"
2972 size = 1;
2973 min_write_delay = 16000;
2974 max_write_delay = 16000;
2975
2976 read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
2977 "x x x x x x x x o o o o o o o o";
2978
2979 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
2980 "x x x x x x x x 1 1 1 1 1 i i i";
2981 ;
2982
2983 memory "lock"
2984 size = 1;
2985 min_write_delay = 16000;
2986 max_write_delay = 16000;
2987
2988 read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
2989 "x x x x x x x x x x o o o o o o";
2990
2991 write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
2992 "x x x x x x x x 1 1 i i i i i i";
2993 ;
2994
2995 memory "signature"
2996 size = 3;
2997
2998 read = "0 0 1 1 0 0 0 0 0 0 x x x x x x",
2999 "x x x x x x a1 a0 o o o o o o o o";
3000 ;
3001
3002 memory "calibration"
3003 size = 1;
3004
3005 read = "0 0 1 1 1 0 0 0 0 0 x x x x x x",
3006 "0 0 0 0 0 0 0 0 o o o o o o o o";
3007 ;
3008 ;
3009
3010
3011
3012 #------------------------------------------------------------
3013 # ATmega163
3014 #------------------------------------------------------------
3015
3016 part
3017 id = "m163";
3018 desc = "ATMEGA163";
3019 stk500_devcode = 0x81;
3020 avr910_devcode = 0x64;
3021 chip_erase_delay = 32000;
3022 pagel = 0xd7;
3023 bs2 = 0xa0;
3024 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
3025 "x x x x x x x x x x x x x x x x";
3026
3027 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
3028 "x x x x x x x x x x x x x x x x";
3029 memory "eeprom"
3030 size = 512;
3031 min_write_delay = 4000;
3032 max_write_delay = 4000;
3033 readback_p1 = 0xff;
3034 readback_p2 = 0xff;
3035 read = " 1 0 1 0 0 0 0 0",
3036 " x x x x x x x a8",
3037 " a7 a6 a5 a4 a3 a2 a1 a0",
3038 " o o o o o o o o";
3039
3040 write = " 1 1 0 0 0 0 0 0",
3041 " x x x x x x x a8",
3042 " a7 a6 a5 a4 a3 a2 a1 a0",
3043 " i i i i i i i i";
3044 ;
3045
3046 memory "flash"
3047 paged = yes;
3048 size = 16384;
3049 page_size = 128;
3050 num_pages = 128;
3051 min_write_delay = 16000;
3052 max_write_delay = 16000;
3053 readback_p1 = 0xff;
3054 readback_p2 = 0xff;
3055 read_lo = " 0 0 1 0 0 0 0 0",
3056 " x x x a12 a11 a10 a9 a8",
3057 " a7 a6 a5 a4 a3 a2 a1 a0",
3058 " o o o o o o o o";
3059
3060 read_hi = " 0 0 1 0 1 0 0 0",
3061 " x x x a12 a11 a10 a9 a8",
3062 " a7 a6 a5 a4 a3 a2 a1 a0",
3063 " o o o o o o o o";
3064
3065 loadpage_lo = " 0 1 0 0 0 0 0 0",
3066 " x x x x x x x x",
3067 " x x a5 a4 a3 a2 a1 a0",
3068 " i i i i i i i i";
3069
3070 loadpage_hi = " 0 1 0 0 1 0 0 0",
3071 " x x x x x x x x",
3072 " x x a5 a4 a3 a2 a1 a0",
3073 " i i i i i i i i";
3074
3075 writepage = " 0 1 0 0 1 1 0 0",
3076 " x x x a12 a11 a10 a9 a8",
3077 " a7 a6 x x x x x x",
3078 " x x x x x x x x";
3079
3080 mode = 0x41;
3081 delay = 6;
3082 blocksize = 128;
3083 readsize = 256;
3084 ;
3085
3086 memory "lfuse"
3087 size = 1;
3088 min_write_delay = 2000;
3089 max_write_delay = 2000;
3090 read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
3091 "x x x x x x x x o o x x o o o o";
3092
3093 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
3094 "x x x x x x x x i i 1 1 i i i i";
3095 ;
3096
3097 memory "hfuse"
3098 size = 1;
3099 min_write_delay = 2000;
3100 max_write_delay = 2000;
3101 read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
3102 "x x x x x x x x x x x x 1 o o o";
3103
3104 write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
3105 "x x x x x x x x 1 1 1 1 1 i i i";
3106 ;
3107
3108 memory "lock"
3109 size = 1;
3110 min_write_delay = 2000;
3111 max_write_delay = 2000;
3112 read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
3113 "x x x x 0 x x x x x o o o o o o";
3114
3115 write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
3116 "x x x x x x x x 1 1 i i i i i i";
3117 ;
3118
3119 memory "signature"
3120 size = 3;
3121 read = "0 0 1 1 0 0 0 0 x x x x x x x x",
3122 "x x x x x x a1 a0 o o o o o o o o";
3123 ;
3124
3125 memory "calibration"
3126 size = 1;
3127 read = "0 0 1 1 1 0 0 0 x x x x x x x x",
3128 "0 0 0 0 0 0 0 0 o o o o o o o o";
3129 ;
3130 ;
3131
3132 #------------------------------------------------------------
3133 # ATmega169
3134 #------------------------------------------------------------
3135
3136 part
3137 id = "m169";
3138 desc = "ATMEGA169";
3139 has_jtag = yes;
3140 stk500_devcode = 0x85;
3141 avr910_devcode = 0x75;
3142 chip_erase_delay = 9000;
3143 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
3144 "x x x x x x x x x x x x x x x x";
3145
3146 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
3147 "x x x x x x x x x x x x x x x x";
3148 timeout = 200;
3149 stabdelay = 100;
3150 cmdexedelay = 25;
3151 synchloops = 32;
3152 bytedelay = 0;
3153 pollindex = 3;
3154 pollvalue = 0x53;
3155 predelay = 1;
3156 postdelay = 1;
3157 pollmethod = 1;
3158
3159 idr = 0x31;
3160 spmcr = 0x57;
3161
3162 memory "eeprom"
3163 paged = no; /* leave this "no" */
3164 page_size = 4; /* for parallel programming */
3165 size = 512;
3166 min_write_delay = 9000;
3167 max_write_delay = 9000;
3168 readback_p1 = 0xff;
3169 readback_p2 = 0xff;
3170 read = " 1 0 1 0 0 0 0 0",
3171 " x x x x x x x a8",
3172 " a7 a6 a5 a4 a3 a2 a1 a0",
3173 " o o o o o o o o";
3174
3175 write = " 1 1 0 0 0 0 0 0",
3176 " x x x x x x x a8",
3177 " a7 a6 a5 a4 a3 a2 a1 a0",
3178 " i i i i i i i i";
3179
3180 mode = 0x41;
3181 delay = 20;
3182 blocksize = 4;
3183 readsize = 256;
3184 ;
3185
3186 memory "flash"
3187 paged = yes;
3188 size = 16384;
3189 page_size = 128;
3190 num_pages = 128;
3191 min_write_delay = 4500;
3192 max_write_delay = 4500;
3193 readback_p1 = 0xff;
3194 readback_p2 = 0xff;
3195 read_lo = " 0 0 1 0 0 0 0 0",
3196 " x x x a12 a11 a10 a9 a8",
3197 " a7 a6 a5 a4 a3 a2 a1 a0",
3198 " o o o o o o o o";
3199
3200 read_hi = " 0 0 1 0 1 0 0 0",
3201 " x x x a12 a11 a10 a9 a8",
3202 " a7 a6 a5 a4 a3 a2 a1 a0",
3203 " o o o o o o o o";
3204
3205 loadpage_lo = " 0 1 0 0 0 0 0 0",
3206 " x x x x x x x x",
3207 " x x a5 a4 a3 a2 a1 a0",
3208 " i i i i i i i i";
3209
3210 loadpage_hi = " 0 1 0 0 1 0 0 0",
3211 " x x x x x x x x",
3212 " x x a5 a4 a3 a2 a1 a0",
3213 " i i i i i i i i";
3214
3215 writepage = " 0 1 0 0 1 1 0 0",
3216 " x x x a12 a11 a10 a9 a8",
3217 " a7 a6 x x x x x x",
3218 " x x x x x x x x";
3219
3220 mode = 0x41;
3221 delay = 6;
3222 blocksize = 128;
3223 readsize = 256;
3224 ;
3225
3226 memory "lfuse"
3227 size = 1;
3228 min_write_delay = 2000;
3229 max_write_delay = 2000;
3230 read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
3231 "x x x x x x x x o o o o o o o o";
3232
3233 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
3234 "x x x x x x x x i i i i i i i i";
3235 ;
3236
3237 memory "hfuse"
3238 size = 1;
3239 min_write_delay = 2000;
3240 max_write_delay = 2000;
3241 read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
3242 "x x x x x x x x o o o o o o o o";
3243
3244 write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
3245 "x x x x x x x x i i i i i i i i";
3246 ;
3247
3248 memory "efuse"
3249 size = 1;
3250 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
3251 "x x x x x x x x x x x x i i i i";
3252
3253 read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
3254 "x x x x x x x x o o o o o o o o";
3255 ;
3256
3257 memory "lock"
3258 size = 1;
3259 min_write_delay = 2000;
3260 max_write_delay = 2000;
3261 read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
3262 "x x x x x x x x x x o o o o o o";
3263
3264 write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
3265 "x x x x x x x x 1 1 i i i i i i";
3266 ;
3267
3268 memory "signature"
3269 size = 3;
3270 read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
3271 "x x x x x x a1 a0 o o o o o o o o";
3272 ;
3273
3274 memory "calibration"
3275 size = 1;
3276 read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
3277 "0 0 0 0 0 0 0 0 o o o o o o o o";
3278 ;
3279 ;
3280
3281 #------------------------------------------------------------
3282 # ATmega329
3283 #------------------------------------------------------------
3284
3285 part
3286 id = "m329";
3287 desc = "ATMEGA329";
3288 has_jtag = yes;
3289 # stk500_devcode = 0x85; # no STK500 support, only STK500v2
3290 # avr910_devcode = 0x?; # try the ATmega169 one:
3291 avr910_devcode = 0x75;
3292 chip_erase_delay = 9000;
3293 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
3294 "x x x x x x x x x x x x x x x x";
3295
3296 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
3297 "x x x x x x x x x x x x x x x x";
3298 timeout = 200;
3299 stabdelay = 100;
3300 cmdexedelay = 25;
3301 synchloops = 32;
3302 bytedelay = 0;
3303 pollindex = 3;
3304 pollvalue = 0x53;
3305 predelay = 1;
3306 postdelay = 1;
3307 pollmethod = 1;
3308
3309 idr = 0x31;
3310 spmcr = 0x57;
3311
3312 memory "eeprom"
3313 paged = no; /* leave this "no" */
3314 page_size = 4; /* for parallel programming */
3315 size = 1024;
3316 min_write_delay = 9000;
3317 max_write_delay = 9000;
3318 readback_p1 = 0xff;
3319 readback_p2 = 0xff;
3320 read = " 1 0 1 0 0 0 0 0",
3321 " x x x x x x a9 a8",
3322 " a7 a6 a5 a4 a3 a2 a1 a0",
3323 " o o o o o o o o";
3324
3325 write = " 1 1 0 0 0 0 0 0",
3326 " x x x x x x a9 a8",
3327 " a7 a6 a5 a4 a3 a2 a1 a0",
3328 " i i i i i i i i";
3329
3330 mode = 0x41;
3331 delay = 20;
3332 blocksize = 8;
3333 readsize = 256;
3334 ;
3335
3336 memory "flash"
3337 paged = yes;
3338 size = 32768;
3339 page_size = 128;
3340 num_pages = 256;
3341 min_write_delay = 4500;
3342 max_write_delay = 4500;
3343 readback_p1 = 0xff;
3344 readback_p2 = 0xff;
3345 read_lo = " 0 0 1 0 0 0 0 0",
3346 " x a14 a13 a12 a11 a10 a9 a8",
3347 " a7 a6 a5 a4 a3 a2 a1 a0",
3348 " o o o o o o o o";
3349
3350 read_hi = " 0 0 1 0 1 0 0 0",
3351 " x a14 a13 a12 a11 a10 a9 a8",
3352 " a7 a6 a5 a4 a3 a2 a1 a0",
3353 " o o o o o o o o";
3354
3355 loadpage_lo = " 0 1 0 0 0 0 0 0",
3356 " x x x x x x x x",
3357 " x x a5 a4 a3 a2 a1 a0",
3358 " i i i i i i i i";
3359
3360 loadpage_hi = " 0 1 0 0 1 0 0 0",
3361 " x x x x x x x x",
3362 " x x a5 a4 a3 a2 a1 a0",
3363 " i i i i i i i i";
3364
3365 writepage = " 0 1 0 0 1 1 0 0",
3366 " x x x a12 a11 a10 a9 a8",
3367 " a7 a6 x x x x x x",
3368 " x x x x x x x x";
3369
3370 mode = 0x41;
3371 delay = 6;
3372 blocksize = 256;
3373 readsize = 256;
3374 ;
3375
3376 memory "lfuse"
3377 size = 1;
3378 min_write_delay = 4500;
3379 max_write_delay = 4500;
3380 read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
3381 "x x x x x x x x o o o o o o o o";
3382
3383 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
3384 "x x x x x x x x i i i i i i i i";
3385 ;
3386
3387 memory "hfuse"
3388 size = 1;
3389 min_write_delay = 4500;
3390 max_write_delay = 4500;
3391 read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
3392 "x x x x x x x x o o o o o o o o";
3393
3394 write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
3395 "x x x x x x x x i i i i i i i i";
3396 ;
3397
3398 memory "efuse"
3399 size = 1;
3400 read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
3401 "x x x x x x x x o o o o o o o o";
3402
3403 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
3404 "x x x x x x x x x x x x i i i x";
3405 ;
3406
3407 memory "lock"
3408 size = 1;
3409 min_write_delay = 4500;
3410 max_write_delay = 4500;
3411 read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
3412 "x x x x x x x x x x o o o o o o";
3413
3414 write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
3415 "x x x x x x x x 1 1 i i i i i i";
3416 ;
3417
3418 memory "signature"
3419 size = 3;
3420 read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
3421 "x x x x x x a1 a0 o o o o o o o o";
3422 ;
3423
3424 memory "calibration"
3425 size = 1;
3426 read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
3427 "0 0 0 0 0 0 0 0 o o o o o o o o";
3428 ;
3429 ;
3430
3431 #------------------------------------------------------------
3432 # ATmega3290
3433 #------------------------------------------------------------
3434
3435 # identical to ATmega329
3436
3437 part
3438 id = "m3290";
3439 desc = "ATMEGA3290";
3440 has_jtag = yes;
3441 # stk500_devcode = 0x85; # no STK500 support, only STK500v2
3442 # avr910_devcode = 0x?; # try the ATmega169 one:
3443 avr910_devcode = 0x75;
3444 chip_erase_delay = 9000;
3445 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
3446 "x x x x x x x x x x x x x x x x";
3447
3448 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
3449 "x x x x x x x x x x x x x x x x";
3450 timeout = 200;
3451 stabdelay = 100;
3452 cmdexedelay = 25;
3453 synchloops = 32;
3454 bytedelay = 0;
3455 pollindex = 3;
3456 pollvalue = 0x53;
3457 predelay = 1;
3458 postdelay = 1;
3459 pollmethod = 1;
3460
3461 idr = 0x31;
3462 spmcr = 0x57;
3463
3464 memory "eeprom"
3465 paged = no; /* leave this "no" */
3466 page_size = 4; /* for parallel programming */
3467 size = 1024;
3468 min_write_delay = 9000;
3469 max_write_delay = 9000;
3470 readback_p1 = 0xff;
3471 readback_p2 = 0xff;
3472 read = " 1 0 1 0 0 0 0 0",
3473 " x x x x x x a9 a8",
3474 " a7 a6 a5 a4 a3 a2 a1 a0",
3475 " o o o o o o o o";
3476
3477 write = " 1 1 0 0 0 0 0 0",
3478 " x x x x x x a9 a8",
3479 " a7 a6 a5 a4 a3 a2 a1 a0",
3480 " i i i i i i i i";
3481
3482 mode = 0x41;
3483 delay = 20;
3484 blocksize = 8;
3485 readsize = 256;
3486 ;
3487
3488 memory "flash"
3489 paged = yes;
3490 size = 32768;
3491 page_size = 128;
3492 num_pages = 256;
3493 min_write_delay = 4500;
3494 max_write_delay = 4500;
3495 readback_p1 = 0xff;
3496 readback_p2 = 0xff;
3497 read_lo = " 0 0 1 0 0 0 0 0",
3498 " x a14 a13 a12 a11 a10 a9 a8",
3499 " a7 a6 a5 a4 a3 a2 a1 a0",
3500 " o o o o o o o o";
3501
3502 read_hi = " 0 0 1 0 1 0 0 0",
3503 " x a14 a13 a12 a11 a10 a9 a8",
3504 " a7 a6 a5 a4 a3 a2 a1 a0",
3505 " o o o o o o o o";
3506
3507 loadpage_lo = " 0 1 0 0 0 0 0 0",
3508 " x x x x x x x x",
3509 " x x a5 a4 a3 a2 a1 a0",
3510 " i i i i i i i i";
3511
3512 loadpage_hi = " 0 1 0 0 1 0 0 0",
3513 " x x x x x x x x",
3514 " x x a5 a4 a3 a2 a1 a0",
3515 " i i i i i i i i";
3516
3517 writepage = " 0 1 0 0 1 1 0 0",
3518 " x x x a12 a11 a10 a9 a8",
3519 " a7 a6 x x x x x x",
3520 " x x x x x x x x";
3521
3522 mode = 0x41;
3523 delay = 6;
3524 blocksize = 256;
3525 readsize = 256;
3526 ;
3527
3528 memory "lfuse"
3529 size = 1;
3530 min_write_delay = 4500;
3531 max_write_delay = 4500;
3532 read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
3533 "x x x x x x x x o o o o o o o o";
3534
3535 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
3536 "x x x x x x x x i i i i i i i i";
3537 ;
3538
3539 memory "hfuse"
3540 size = 1;
3541 min_write_delay = 4500;
3542 max_write_delay = 4500;
3543 read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
3544 "x x x x x x x x o o o o o o o o";
3545
3546 write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
3547 "x x x x x x x x i i i i i i i i";
3548 ;
3549
3550 memory "efuse"
3551 size = 1;
3552 read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
3553 "x x x x x x x x o o o o o o o o";
3554
3555 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
3556 "x x x x x x x x x x x x i i i x";
3557 ;
3558
3559 memory "lock"
3560 size = 1;
3561 min_write_delay = 4500;
3562 max_write_delay = 4500;
3563 read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
3564 "x x x x x x x x x x o o o o o o";
3565
3566 write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
3567 "x x x x x x x x 1 1 i i i i i i";
3568 ;
3569
3570 memory "signature"
3571 size = 3;
3572 read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
3573 "x x x x x x a1 a0 o o o o o o o o";
3574 ;
3575
3576 memory "calibration"
3577 size = 1;
3578 read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
3579 "0 0 0 0 0 0 0 0 o o o o o o o o";
3580 ;
3581 ;
3582
3583 #------------------------------------------------------------
3584 # ATmega649
3585 #------------------------------------------------------------
3586
3587 part
3588 id = "m649";
3589 desc = "ATMEGA649";
3590 has_jtag = yes;
3591 # stk500_devcode = 0x85; # no STK500 support, only STK500v2
3592 # avr910_devcode = 0x?; # try the ATmega169 one:
3593 avr910_devcode = 0x75;
3594 chip_erase_delay = 9000;
3595 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
3596 "x x x x x x x x x x x x x x x x";
3597
3598 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
3599 "x x x x x x x x x x x x x x x x";
3600 timeout = 200;
3601 stabdelay = 100;
3602 cmdexedelay = 25;
3603 synchloops = 32;
3604 bytedelay = 0;
3605 pollindex = 3;
3606 pollvalue = 0x53;
3607 predelay = 1;
3608 postdelay = 1;
3609 pollmethod = 1;
3610
3611 idr = 0x31;
3612 spmcr = 0x57;
3613
3614 memory "eeprom"
3615 paged = no; /* leave this "no" */
3616 page_size = 8; /* for parallel programming */
3617 size = 2048;
3618 min_write_delay = 9000;
3619 max_write_delay = 9000;
3620 readback_p1 = 0xff;
3621 readback_p2 = 0xff;
3622 read = " 1 0 1 0 0 0 0 0",
3623 " x x x x x a10 a9 a8",
3624 " a7 a6 a5 a4 a3 a2 a1 a0",
3625 " o o o o o o o o";
3626
3627 write = " 1 1 0 0 0 0 0 0",
3628 " x x x x x a10 a9 a8",
3629 " a7 a6 a5 a4 a3 a2 a1 a0",
3630 " i i i i i i i i";
3631
3632 mode = 0x41;
3633 delay = 20;
3634 blocksize = 8;
3635 readsize = 256;
3636 ;
3637
3638 memory "flash"
3639 paged = yes;
3640 size = 65536;
3641 page_size = 256;
3642 num_pages = 256;
3643 min_write_delay = 4500;
3644 max_write_delay = 4500;
3645 readback_p1 = 0xff;
3646 readback_p2 = 0xff;
3647 read_lo = " 0 0 1 0 0 0 0 0",
3648 "a15 a14 a13 a12 a11 a10 a9 a8",
3649 " a7 a6 a5 a4 a3 a2 a1 a0",
3650 " o o o o o o o o";
3651
3652 read_hi = " 0 0 1 0 1 0 0 0",
3653 "a15 a14 a13 a12 a11 a10 a9 a8",
3654 " a7 a6 a5 a4 a3 a2 a1 a0",
3655 " o o o o o o o o";
3656
3657 loadpage_lo = " 0 1 0 0 0 0 0 0",
3658 " x x x x x x x x",
3659 " x a6 a5 a4 a3 a2 a1 a0",
3660 " i i i i i i i i";
3661
3662 loadpage_hi = " 0 1 0 0 1 0 0 0",
3663 " x x x x x x x x",
3664 " x a6 a5 a4 a3 a2 a1 a0",
3665 " i i i i i i i i";
3666
3667 writepage = " 0 1 0 0 1 1 0 0",
3668 " x x x a12 a11 a10 a9 a8",
3669 " a7 x x x x x x x",
3670 " x x x x x x x x";
3671
3672 mode = 0x41;
3673 delay = 6;
3674 blocksize = 256;
3675 readsize = 256;
3676 ;
3677
3678 memory "lfuse"
3679 size = 1;
3680 min_write_delay = 4500;
3681 max_write_delay = 4500;
3682 read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
3683 "x x x x x x x x o o o o o o o o";
3684
3685 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
3686 "x x x x x x x x i i i i i i i i";
3687 ;
3688
3689 memory "hfuse"
3690 size = 1;
3691 min_write_delay = 4500;
3692 max_write_delay = 4500;
3693 read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
3694 "x x x x x x x x o o o o o o o o";
3695
3696 write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
3697 "x x x x x x x x i i i i i i i i";
3698 ;
3699
3700 memory "efuse"
3701 size = 1;
3702 read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
3703 "x x x x x x x x o o o o o o o o";
3704
3705 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
3706 "x x x x x x x x x x x x i i i x";
3707 ;
3708
3709 memory "lock"
3710 size = 1;
3711 min_write_delay = 4500;
3712 max_write_delay = 4500;
3713 read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
3714 "x x x x x x x x x x o o o o o o";
3715
3716 write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
3717 "x x x x x x x x 1 1 i i i i i i";
3718 ;
3719
3720 memory "signature"
3721 size = 3;
3722 read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
3723 "x x x x x x a1 a0 o o o o o o o o";
3724 ;
3725
3726 memory "calibration"
3727 size = 1;
3728 read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
3729 "0 0 0 0 0 0 0 0 o o o o o o o o";
3730 ;
3731 ;
3732
3733 #------------------------------------------------------------
3734 # ATmega6490
3735 #------------------------------------------------------------
3736
3737 # identical to ATmega649
3738
3739 part
3740 id = "m6490";
3741 desc = "ATMEGA6490";
3742 has_jtag = yes;
3743 # stk500_devcode = 0x85; # no STK500 support, only STK500v2
3744 # avr910_devcode = 0x?; # try the ATmega169 one:
3745 avr910_devcode = 0x75;
3746 chip_erase_delay = 9000;
3747 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
3748 "x x x x x x x x x x x x x x x x";
3749
3750 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
3751 "x x x x x x x x x x x x x x x x";
3752 timeout = 200;
3753 stabdelay = 100;
3754 cmdexedelay = 25;
3755 synchloops = 32;
3756 bytedelay = 0;
3757 pollindex = 3;
3758 pollvalue = 0x53;
3759 predelay = 1;
3760 postdelay = 1;
3761 pollmethod = 1;
3762
3763 idr = 0x31;
3764 spmcr = 0x57;
3765
3766 memory "eeprom"
3767 paged = no; /* leave this "no" */
3768 page_size = 8; /* for parallel programming */
3769 size = 2048;
3770 min_write_delay = 9000;
3771 max_write_delay = 9000;
3772 readback_p1 = 0xff;
3773 readback_p2 = 0xff;
3774 read = " 1 0 1 0 0 0 0 0",
3775 " x x x x x a10 a9 a8",
3776 " a7 a6 a5 a4 a3 a2 a1 a0",
3777 " o o o o o o o o";
3778
3779 write = " 1 1 0 0 0 0 0 0",
3780 " x x x x x a10 a9 a8",
3781 " a7 a6 a5 a4 a3 a2 a1 a0",
3782 " i i i i i i i i";
3783
3784 mode = 0x41;
3785 delay = 20;
3786 blocksize = 8;
3787 readsize = 256;
3788 ;
3789
3790 memory "flash"
3791 paged = yes;
3792 size = 65536;
3793 page_size = 256;
3794 num_pages = 256;
3795 min_write_delay = 4500;
3796 max_write_delay = 4500;
3797 readback_p1 = 0xff;
3798 readback_p2 = 0xff;
3799 read_lo = " 0 0 1 0 0 0 0 0",
3800 "a15 a14 a13 a12 a11 a10 a9 a8",
3801 " a7 a6 a5 a4 a3 a2 a1 a0",
3802 " o o o o o o o o";
3803
3804 read_hi = " 0 0 1 0 1 0 0 0",
3805 "a15 a14 a13 a12 a11 a10 a9 a8",
3806 " a7 a6 a5 a4 a3 a2 a1 a0",
3807 " o o o o o o o o";
3808
3809 loadpage_lo = " 0 1 0 0 0 0 0 0",
3810 " x x x x x x x x",
3811 " x a6 a5 a4 a3 a2 a1 a0",
3812 " i i i i i i i i";
3813
3814 loadpage_hi = " 0 1 0 0 1 0 0 0",
3815 " x x x x x x x x",
3816 " x a6 a5 a4 a3 a2 a1 a0",
3817 " i i i i i i i i";
3818
3819 writepage = " 0 1 0 0 1 1 0 0",
3820 " x x x a12 a11 a10 a9 a8",
3821 " a7 x x x x x x x",
3822 " x x x x x x x x";
3823
3824 mode = 0x41;
3825 delay = 6;
3826 blocksize = 256;
3827 readsize = 256;
3828 ;
3829
3830 memory "lfuse"
3831 size = 1;
3832 min_write_delay = 4500;
3833 max_write_delay = 4500;
3834 read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
3835 "x x x x x x x x o o o o o o o o";
3836
3837 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
3838 "x x x x x x x x i i i i i i i i";
3839 ;
3840
3841 memory "hfuse"
3842 size = 1;
3843 min_write_delay = 4500;
3844 max_write_delay = 4500;
3845 read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
3846 "x x x x x x x x o o o o o o o o";
3847
3848 write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
3849 "x x x x x x x x i i i i i i i i";
3850 ;
3851
3852 memory "efuse"
3853 size = 1;
3854 read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
3855 "x x x x x x x x o o o o o o o o";
3856
3857 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
3858 "x x x x x x x x x x x x i i i x";
3859 ;
3860
3861 memory "lock"
3862 size = 1;
3863 min_write_delay = 4500;
3864 max_write_delay = 4500;
3865 read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
3866 "x x x x x x x x x x o o o o o o";
3867
3868 write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
3869 "x x x x x x x x 1 1 i i i i i i";
3870 ;
3871
3872 memory "signature"
3873 size = 3;
3874 read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
3875 "x x x x x x a1 a0 o o o o o o o o";
3876 ;
3877
3878 memory "calibration"
3879 size = 1;
3880 read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
3881 "0 0 0 0 0 0 0 0 o o o o o o o o";
3882 ;
3883 ;
3884
3885 #------------------------------------------------------------
3886 # ATmega32
3887 #------------------------------------------------------------
3888
3889 part
3890 id = "m32";
3891 desc = "ATMEGA32";
3892 has_jtag = yes;
3893 stk500_devcode = 0x91;
3894 avr910_devcode = 0x72;
3895 chip_erase_delay = 9000;
3896 pagel = 0xd7;
3897 bs2 = 0xa0;
3898 reset = dedicated;
3899 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
3900 "x x x x x x x x x x x x x x x x";
3901
3902 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
3903 "x x x x x x x x x x x x x x x x";
3904 timeout = 200;
3905 stabdelay = 100;
3906 cmdexedelay = 25;
3907 synchloops = 32;
3908 bytedelay = 0;
3909 pollindex = 3;
3910 pollvalue = 0x53;
3911 predelay = 1;
3912 postdelay = 1;
3913 pollmethod = 0;
3914
3915 idr = 0x31;
3916 spmcr = 0x57;
3917 allowfullpagebitstream = yes;
3918
3919 memory "eeprom"
3920 paged = no; /* leave this "no" */
3921 page_size = 4; /* for parallel programming */
3922 size = 1024;
3923 min_write_delay = 9000;
3924 max_write_delay = 9000;
3925 readback_p1 = 0xff;
3926 readback_p2 = 0xff;
3927 read = " 1 0 1 0 0 0 0 0",
3928 " 0 0 x x x x a9 a8",
3929 " a7 a6 a5 a4 a3 a2 a1 a0",
3930 " o o o o o o o o";
3931
3932 write = " 1 1 0 0 0 0 0 0",
3933 " 0 0 x x x x a9 a8",
3934 " a7 a6 a5 a4 a3 a2 a1 a0",
3935 " i i i i i i i i";
3936
3937 mode = 0x04;
3938 delay = 10;
3939 blocksize = 64;
3940 readsize = 256;
3941 ;
3942
3943 memory "flash"
3944 paged = yes;
3945 size = 32768;
3946 page_size = 128;
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 " 0 0 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 " 0 0 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 x 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 x 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 " 0 0 a13 a12 a11 a10 a9 a8",
3974 " a7 a6 x x x x x x",
3975 " x x x x x x x x";
3976
3977 mode = 0x21;
3978 delay = 6;
3979 blocksize = 64;
3980 readsize = 256;
3981 ;
3982
3983 memory "lfuse"
3984 size = 1;
3985 min_write_delay = 2000;
3986 max_write_delay = 2000;
3987 read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
3988 "x x x x x x x x o o o o o o o o";
3989
3990 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
3991 "x x x x x x x x i i i i i i i i";
3992 ;
3993
3994 memory "hfuse"
3995 size = 1;
3996 min_write_delay = 2000;
3997 max_write_delay = 2000;
3998 read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
3999 "x x x x x x x x o o o o o o o o";
4000
4001 write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
4002 "x x x x x x x x i i i i i i i i";
4003 ;
4004
4005 memory "lock"
4006 size = 1;
4007 min_write_delay = 2000;
4008 max_write_delay = 2000;
4009 read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
4010 "x x x x x x x x x x o o o o o o";
4011
4012 write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
4013 "x x x x x x x x 1 1 i i i i i i";
4014 ;
4015
4016 memory "signature"
4017 size = 3;
4018 read = "0 0 1 1 0 0 0 0 x x x x x x x x",
4019 "x x x x x x a1 a0 o o o o o o o o";
4020 ;
4021
4022 memory "calibration"
4023 size = 1;
4024 read = "0 0 1 1 1 0 0 0 0 0 x x x x x x",
4025 "0 0 0 0 0 0 0 0 o o o o o o o o";
4026 ;
4027 ;
4028
4029 #------------------------------------------------------------
4030 # ATmega161
4031 #------------------------------------------------------------
4032
4033 part
4034 id = "m161";
4035 desc = "ATMEGA161";
4036 stk500_devcode = 0x80;
4037 avr910_devcode = 0x60;
4038 chip_erase_delay = 28000;
4039 pagel = 0xd7;
4040 bs2 = 0xa0;
4041 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
4042 "x x x x x x x x x x x x x x x x";
4043
4044 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
4045 "x x x x x x x x x x x x x x x x";
4046 timeout = 200;
4047 stabdelay = 100;
4048 cmdexedelay = 25;
4049 synchloops = 32;
4050 bytedelay = 0;
4051 pollindex = 3;
4052 pollvalue = 0x53;
4053 predelay = 1;
4054 postdelay = 1;
4055 pollmethod = 0;
4056
4057 memory "eeprom"
4058 size = 512;
4059 min_write_delay = 3400;
4060 max_write_delay = 3400;
4061 readback_p1 = 0xff;
4062 readback_p2 = 0xff;
4063 read = " 1 0 1 0 0 0 0 0",
4064 " x x x x x x x a8",
4065 " a7 a6 a5 a4 a3 a2 a1 a0",
4066 " o o o o o o o o";
4067
4068 write = " 1 1 0 0 0 0 0 0",
4069 " x x x x x x x a8",
4070 " a7 a6 a5 a4 a3 a2 a1 a0",
4071 " i i i i i i i i";
4072
4073 mode = 0x04;
4074 delay = 5;
4075 blocksize = 128;
4076 readsize = 256;
4077 ;
4078
4079 memory "flash"
4080 paged = yes;
4081 size = 16384;
4082 page_size = 128;
4083 num_pages = 128;
4084 min_write_delay = 14000;
4085 max_write_delay = 14000;
4086 readback_p1 = 0xff;
4087 readback_p2 = 0xff;
4088 read_lo = " 0 0 1 0 0 0 0 0",
4089 " x x x a12 a11 a10 a9 a8",
4090 " a7 a6 a5 a4 a3 a2 a1 a0",
4091 " o o o o o o o o";
4092
4093 read_hi = " 0 0 1 0 1 0 0 0",
4094 " x x x a12 a11 a10 a9 a8",
4095 " a7 a6 a5 a4 a3 a2 a1 a0",
4096 " o o o o o o o o";
4097
4098 loadpage_lo = " 0 1 0 0 0 0 0 0",
4099 " x x x x x x x x",
4100 " x x a5 a4 a3 a2 a1 a0",
4101 " i i i i i i i i";
4102
4103 loadpage_hi = " 0 1 0 0 1 0 0 0",
4104 " x x x x x x x x",
4105 " x x a5 a4 a3 a2 a1 a0",
4106 " i i i i i i i i";
4107
4108 writepage = " 0 1 0 0 1 1 0 0",
4109 " x x x a12 a11 a10 a9 a8",
4110 " a7 a6 x x x x x x",
4111 " x x x x x x x x";
4112
4113 mode = 0x21;
4114 delay = 16;
4115 blocksize = 128;
4116 readsize = 256;
4117 ;
4118
4119 memory "fuse"
4120 size = 1;
4121 min_write_delay = 2000;
4122 max_write_delay = 2000;
4123 read = "0 1 0 1 0 0 0 0 x x x x x x x x",
4124 "x x x x x x x x x o x o o o o o";
4125
4126 write = "1 0 1 0 1 1 0 0 1 0 1 x x x x x",
4127 "x x x x x x x x 1 i 1 i i i i i";
4128 ;
4129
4130 memory "lock"
4131 size = 1;
4132 min_write_delay = 2000;
4133 max_write_delay = 2000;
4134 read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
4135 "x x x x x x x x x x o o o o o o";
4136
4137 write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
4138 "x x x x x x x x 1 1 i i i i i i";
4139 ;
4140 memory "signature"
4141 size = 3;
4142 read = "0 0 1 1 0 0 0 0 x x x x x x x x",
4143 "x x x x x x a1 a0 o o o o o o o o";
4144 ;
4145 ;
4146
4147
4148 #------------------------------------------------------------
4149 # ATmega8
4150 #------------------------------------------------------------
4151
4152 part
4153 id = "m8";
4154 desc = "ATMEGA8";
4155 stk500_devcode = 0x70;
4156 avr910_devcode = 0x76;
4157 pagel = 0xd7;
4158 bs2 = 0xc2;
4159 chip_erase_delay = 10000;
4160 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
4161 "x x x x x x x x x x x x x x x x";
4162
4163 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
4164 "x x x x x x x x x x x x x x x x";
4165
4166 timeout = 200;
4167 stabdelay = 100;
4168 cmdexedelay = 25;
4169 synchloops = 32;
4170 bytedelay = 0;
4171 pollindex = 3;
4172 pollvalue = 0x53;
4173 predelay = 1;
4174 postdelay = 1;
4175 pollmethod = 0;
4176
4177 memory "eeprom"
4178 size = 512;
4179 min_write_delay = 9000;
4180 max_write_delay = 9000;
4181 readback_p1 = 0xff;
4182 readback_p2 = 0xff;
4183 read = " 1 0 1 0 0 0 0 0",
4184 " 0 0 x x x x x a8",
4185 " a7 a6 a5 a4 a3 a2 a1 a0",
4186 " o o o o o o o o";
4187
4188 write = " 1 1 0 0 0 0 0 0",
4189 " 0 0 x x x x x a8",
4190 " a7 a6 a5 a4 a3 a2 a1 a0",
4191 " i i i i i i i i";
4192
4193 mode = 0x04;
4194 delay = 10;
4195 blocksize = 128;
4196 readsize = 256;
4197 ;
4198 memory "flash"
4199 paged = yes;
4200 size = 8192;
4201 page_size = 64;
4202 num_pages = 128;
4203 min_write_delay = 4500;
4204 max_write_delay = 4500;
4205 readback_p1 = 0xff;
4206 readback_p2 = 0x00;
4207 read_lo = " 0 0 1 0 0 0 0 0",
4208 " 0 0 0 0 a11 a10 a9 a8",
4209 " a7 a6 a5 a4 a3 a2 a1 a0",
4210 " o o o o o o o o";
4211
4212 read_hi = " 0 0 1 0 1 0 0 0",
4213 " 0 0 0 0 a11 a10 a9 a8",
4214 " a7 a6 a5 a4 a3 a2 a1 a0",
4215 " o o o o o o o o";
4216
4217 loadpage_lo = " 0 1 0 0 0 0 0 0",
4218 " 0 0 0 0 x x x x",
4219 " x x x a4 a3 a2 a1 a0",
4220 " i i i i i i i i";
4221
4222 loadpage_hi = " 0 1 0 0 1 0 0 0",
4223 " 0 0 0 0 x x x x",
4224 " x x x a4 a3 a2 a1 a0",
4225 " i i i i i i i i";
4226
4227 writepage = " 0 1 0 0 1 1 0 0",
4228 " 0 0 0 0 a11 a10 a9 a8",
4229 " a7 a6 a5 x x x x x",
4230 " x x x x x x x x";
4231
4232 mode = 0x21;
4233 delay = 6;
4234 blocksize = 64;
4235 readsize = 256;
4236 ;
4237
4238 memory "lfuse"
4239 size = 1;
4240 min_write_delay = 2000;
4241 max_write_delay = 2000;
4242 read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
4243 "x x x x x x x x o o o o o o o o";
4244
4245 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
4246 "x x x x x x x x i i i i i i i i";
4247 ;
4248
4249 memory "hfuse"
4250 size = 1;
4251 min_write_delay = 2000;
4252 max_write_delay = 2000;
4253 read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
4254 "x x x x x x x x o o o o o o o o";
4255
4256 write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
4257 "x x x x x x x x i i i i i i i i";
4258 ;
4259
4260 memory "lock"
4261 size = 1;
4262 min_write_delay = 2000;
4263 max_write_delay = 2000;
4264 read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
4265 "x x x x x x x x x x o o o o o o";
4266
4267 write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
4268 "x x x x x x x x 1 1 i i i i i i";
4269 ;
4270
4271 memory "calibration"
4272 size = 4;
4273 read = "0 0 1 1 1 0 0 0 0 0 x x x x x x",
4274 "0 0 0 0 0 0 a1 a0 o o o o o o o o";
4275 ;
4276
4277 memory "signature"
4278 size = 3;
4279 read = "0 0 1 1 0 0 0 0 x x x x x x x x",
4280 "x x x x x x a1 a0 o o o o o o o o";
4281 ;
4282 ;
4283
4284
4285
4286 #------------------------------------------------------------
4287 # ATmega8515
4288 #------------------------------------------------------------
4289
4290 part
4291 id = "m8515";
4292 desc = "ATMEGA8515";
4293 stk500_devcode = 0x63;
4294 avr910_devcode = 0x3A;
4295 chip_erase_delay = 9000;
4296 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
4297 "x x x x x x x x x x x x x x x x";
4298
4299 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
4300 "x x x x x x x x x x x x x x x x";
4301
4302 timeout = 200;
4303 stabdelay = 100;
4304 cmdexedelay = 25;
4305 synchloops = 32;
4306 bytedelay = 0;
4307 pollindex = 3;
4308 pollvalue = 0x53;
4309 predelay = 1;
4310 postdelay = 1;
4311 pollmethod = 0;
4312
4313 memory "eeprom"
4314 size = 512;
4315 min_write_delay = 9000;
4316 max_write_delay = 9000;
4317 readback_p1 = 0xff;
4318 readback_p2 = 0xff;
4319 read = " 1 0 1 0 0 0 0 0",
4320 " 0 0 x x x x x a8",
4321 " a7 a6 a5 a4 a3 a2 a1 a0",
4322 " o o o o o o o o";
4323
4324 write = " 1 1 0 0 0 0 0 0",
4325 " 0 0 x x x x x a8",
4326 " a7 a6 a5 a4 a3 a2 a1 a0",
4327 " i i i i i i i i";
4328
4329 mode = 0x04;
4330 delay = 10;
4331 blocksize = 128;
4332 readsize = 256;
4333 ;
4334 memory "flash"
4335 paged = yes;
4336 size = 8192;
4337 page_size = 64;
4338 num_pages = 128;
4339 min_write_delay = 4500;
4340 max_write_delay = 4500;
4341 readback_p1 = 0xff;
4342 readback_p2 = 0xff;
4343 read_lo = " 0 0 1 0 0 0 0 0",
4344 " 0 0 0 0 a11 a10 a9 a8",
4345 " a7 a6 a5 a4 a3 a2 a1 a0",
4346 " o o o o o o o o";
4347
4348 read_hi = " 0 0 1 0 1 0 0 0",
4349 " 0 0 0 0 a11 a10 a9 a8",
4350 " a7 a6 a5 a4 a3 a2 a1 a0",
4351 " o o o o o o o o";
4352
4353 loadpage_lo = " 0 1 0 0 0 0 0 0",
4354 " 0 0 0 0 x x x x",
4355 " x x x a4 a3 a2 a1 a0",
4356 " i i i i i i i i";
4357
4358 loadpage_hi = " 0 1 0 0 1 0 0 0",
4359 " 0 0 0 0 x x x x",
4360 " x x x a4 a3 a2 a1 a0",
4361 " i i i i i i i i";
4362
4363 writepage = " 0 1 0 0 1 1 0 0",
4364 " 0 0 0 0 a11 a10 a9 a8",
4365 " a7 a6 a5 x x x x x",
4366 " x x x x x x x x";
4367
4368 mode = 0x21;
4369 delay = 6;
4370 blocksize = 64;
4371 readsize = 256;
4372 ;
4373
4374 memory "lfuse"
4375 size = 1;
4376 min_write_delay = 4500;
4377 max_write_delay = 4500;
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 ;
4384
4385 memory "hfuse"
4386 size = 1;
4387 min_write_delay = 4500;
4388 max_write_delay = 4500;
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 ;
4395
4396 memory "lock"
4397 size = 1;
4398 min_write_delay = 4500;
4399 max_write_delay = 4500;
4400 read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
4401 "x x x x x x x x x x o o o o o o";
4402
4403 write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
4404 "x x x x x x x x 1 1 i i i i i i";
4405 ;
4406
4407 memory "calibration"
4408 size = 1;
4409 read = "0 0 1 1 1 0 0 0 0 0 x x x x x x",
4410 "0 0 0 0 0 0 0 0 o o o o o o o o";
4411 ;
4412
4413 memory "signature"
4414 size = 3;
4415 read = "0 0 1 1 0 0 0 0 x x x x x x x x",
4416 "x x x x x x a1 a0 o o o o o o o o";
4417 ;
4418 ;
4419
4420
4421
4422
4423 #------------------------------------------------------------
4424 # ATmega8535
4425 #------------------------------------------------------------
4426
4427 part
4428 id = "m8535";
4429 desc = "ATMEGA8535";
4430 stk500_devcode = 0x64;
4431 pagel = 0xd7;
4432 bs2 = 0xa0;
4433 chip_erase_delay = 9000;
4434 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
4435 "x x x x x x x x x x x x x x x x";
4436
4437 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
4438 "x x x x x x x x x x x x x x x x";
4439
4440 timeout = 200;
4441 stabdelay = 100;
4442 cmdexedelay = 25;
4443 synchloops = 32;
4444 bytedelay = 0;
4445 pollindex = 3;
4446 pollvalue = 0x53;
4447 predelay = 1;
4448 postdelay = 1;
4449 pollmethod = 0;
4450
4451 memory "eeprom"
4452 size = 512;
4453 min_write_delay = 9000;
4454 max_write_delay = 9000;
4455 readback_p1 = 0xff;
4456 readback_p2 = 0xff;
4457 read = " 1 0 1 0 0 0 0 0",
4458 " 0 0 x x x x x a8",
4459 " a7 a6 a5 a4 a3 a2 a1 a0",
4460 " o o o o o o o o";
4461
4462 write = " 1 1 0 0 0 0 0 0",
4463 " 0 0 x x x x x a8",
4464 " a7 a6 a5 a4 a3 a2 a1 a0",
4465 " i i i i i i i i";
4466
4467 mode = 0x04;
4468 delay = 10;
4469 blocksize = 128;
4470 readsize = 256;
4471 ;
4472 memory "flash"
4473 paged = yes;
4474 size = 8192;
4475 page_size = 64;
4476 num_pages = 128;
4477 min_write_delay = 4500;
4478 max_write_delay = 4500;
4479 readback_p1 = 0xff;
4480 readback_p2 = 0xff;
4481 read_lo = " 0 0 1 0 0 0 0 0",
4482 " 0 0 0 0 a11 a10 a9 a8",
4483 " a7 a6 a5 a4 a3 a2 a1 a0",
4484 " o o o o o o o o";
4485
4486 read_hi = " 0 0 1 0 1 0 0 0",
4487 " 0 0 0 0 a11 a10 a9 a8",
4488 " a7 a6 a5 a4 a3 a2 a1 a0",
4489 " o o o o o o o o";
4490
4491 loadpage_lo = " 0 1 0 0 0 0 0 0",
4492 " 0 0 0 0 x x x x",
4493 " x x x a4 a3 a2 a1 a0",
4494 " i i i i i i i i";
4495
4496 loadpage_hi = " 0 1 0 0 1 0 0 0",
4497 " 0 0 0 0 x x x x",
4498 " x x x a4 a3 a2 a1 a0",
4499 " i i i i i i i i";
4500
4501 writepage = " 0 1 0 0 1 1 0 0",
4502 " 0 0 0 0 a11 a10 a9 a8",
4503 " a7 a6 a5 x x x x x",
4504 " x x x x x x x x";
4505
4506 mode = 0x21;
4507 delay = 6;
4508 blocksize = 64;
4509 readsize = 256;
4510 ;
4511
4512 memory "lfuse"
4513 size = 1;
4514 min_write_delay = 2000;
4515 max_write_delay = 2000;
4516 read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
4517 "x x x x x x x x o o o o o o o o";
4518
4519 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
4520 "x x x x x x x x i i i i i i i i";
4521 ;
4522
4523 memory "hfuse"
4524 size = 1;
4525 min_write_delay = 2000;
4526 max_write_delay = 2000;
4527 read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
4528 "x x x x x x x x o o o o o o o o";
4529
4530 write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
4531 "x x x x x x x x i i i i i i i i";
4532 ;
4533
4534 memory "lock"
4535 size = 1;
4536 min_write_delay = 2000;
4537 max_write_delay = 2000;
4538 read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
4539 "x x x x x x x x x x o o o o o o";
4540
4541 write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
4542 "x x x x x x x x 1 1 i i i i i i";
4543 ;
4544
4545 memory "calibration"
4546 size = 1;
4547 read = "0 0 1 1 1 0 0 0 0 0 x x x x x x",
4548 "0 0 0 0 0 0 0 0 o o o o o o o o";
4549 ;
4550
4551 memory "signature"
4552 size = 3;
4553 read = "0 0 1 1 0 0 0 0 x x x x x x x x",
4554 "x x x x x x a1 a0 o o o o o o o o";
4555 ;
4556 ;
4557
4558
4559 #------------------------------------------------------------
4560 # ATtiny26
4561 #------------------------------------------------------------
4562
4563 part
4564 id = "t26";
4565 desc = "ATTINY26";
4566 stk500_devcode = 0x21;
4567 avr910_devcode = 0x5e;
4568 pagel = 0xb3;
4569 bs2 = 0xb2;
4570 chip_erase_delay = 9000;
4571 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
4572 "x x x x x x x x x x x x x x x x";
4573
4574 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
4575 "x x x x x x x x x x x x x x x x";
4576
4577 timeout = 200;
4578 stabdelay = 100;
4579 cmdexedelay = 25;
4580 synchloops = 32;
4581 bytedelay = 0;
4582 pollindex = 3;
4583 pollvalue = 0x53;
4584 predelay = 1;
4585 postdelay = 1;
4586 pollmethod = 0;
4587
4588 memory "eeprom"
4589 size = 128;
4590 min_write_delay = 9000;
4591 max_write_delay = 9000;
4592 readback_p1 = 0xff;
4593 readback_p2 = 0xff;
4594 read = "1 0 1 0 0 0 0 0 x x x x x x x x",
4595 "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
4596
4597 write = "1 1 0 0 0 0 0 0 x x x x x x x x",
4598 "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
4599
4600 mode = 0x04;
4601 delay = 10;
4602 blocksize = 64;
4603 readsize = 256;
4604 ;
4605
4606 memory "flash"
4607 paged = yes;
4608 size = 2048;
4609 page_size = 32;
4610 num_pages = 64;
4611 min_write_delay = 4500;
4612 max_write_delay = 4500;
4613 readback_p1 = 0xff;
4614 readback_p2 = 0xff;
4615 read_lo = " 0 0 1 0 0 0 0 0",
4616 " x x x x x x a9 a8",
4617 " a7 a6 a5 a4 a3 a2 a1 a0",
4618 " o o o o o o o o";
4619
4620 read_hi = " 0 0 1 0 1 0 0 0",
4621 " x x x x x x a9 a8",
4622 " a7 a6 a5 a4 a3 a2 a1 a0",
4623 " o o o o o o o o";
4624
4625 loadpage_lo = " 0 1 0 0 0 0 0 0",
4626 " x x x x x x x x",
4627 " x x x x a3 a2 a1 a0",
4628 " i i i i i i i i";
4629
4630 loadpage_hi = " 0 1 0 0 1 0 0 0",
4631 " x x x x x x x x",
4632 " x x x x a3 a2 a1 a0",
4633 " i i i i i i i i";
4634
4635 writepage = " 0 1 0 0 1 1 0 0",
4636 " x x x x x x a9 a8",
4637 " a7 a6 a5 a4 x x x x",
4638 " x x x x x x x x";
4639
4640 mode = 0x21;
4641 delay = 6;
4642 blocksize = 16;
4643 readsize = 256;
4644 ;
4645
4646 memory "signature"
4647 size = 3;
4648 read = "0 0 1 1 0 0 0 0 x x x x x x x x",
4649 "0 0 0 0 0 0 a1 a0 o o o o o o o o";
4650 ;
4651
4652 memory "lock"
4653 size = 1;
4654 read = "0 1 0 1 1 0 0 0 x x x x x x x x",
4655 "x x x x x x x x x x x x x x o o";
4656
4657 write = "1 0 1 0 1 1 0 0 1 1 1 1 1 1 i i",
4658 "x x x x x x x x x x x x x x x x";
4659 ;
4660
4661 memory "lfuse"
4662 size = 1;
4663 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
4664 "x x x x x x x x i i i i i i i i";
4665
4666 read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
4667 "x x x x x x x x o o o o o o o o";
4668 ;
4669
4670 memory "hfuse"
4671 size = 1;
4672 write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
4673 "x x x x x x x x x x x i i i i i";
4674
4675 read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
4676 "x x x x x x x x x x x o o o o o";
4677 ;
4678
4679 memory "calibration"
4680 size = 4;
4681 read = "0 0 1 1 1 0 0 0 x x x x x x x x",
4682 "0 0 0 0 0 0 a1 a0 o o o o o o o o";
4683 ;
4684
4685 ;
4686
4687
4688 #------------------------------------------------------------
4689 # ATmega48
4690 #------------------------------------------------------------
4691
4692 part
4693 id = "m48";
4694 desc = "ATMEGA48";
4695 stk500_devcode = 0x59;
4696 # avr910_devcode = 0x;
4697 pagel = 0xd7;
4698 bs2 = 0xc2;
4699 chip_erase_delay = 45000;
4700 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
4701 "x x x x x x x x x x x x x x x x";
4702
4703 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
4704 "x x x x x x x x x x x x x x x x";
4705
4706 timeout = 200;
4707 stabdelay = 100;
4708 cmdexedelay = 25;
4709 synchloops = 32;
4710 bytedelay = 0;
4711 pollindex = 3;
4712 pollvalue = 0x53;
4713 predelay = 1;
4714 postdelay = 1;
4715 pollmethod = 1;
4716
4717 memory "eeprom"
4718 size = 256;
4719 min_write_delay = 3600;
4720 max_write_delay = 3600;
4721 readback_p1 = 0xff;
4722 readback_p2 = 0xff;
4723 read = " 1 0 1 0 0 0 0 0",
4724 " 0 0 0 x x x x x",
4725 " a7 a6 a5 a4 a3 a2 a1 a0",
4726 " o o o o o o o o";
4727
4728 write = " 1 1 0 0 0 0 0 0",
4729 " 0 0 0 x x x x x",
4730 " a7 a6 a5 a4 a3 a2 a1 a0",
4731 " i i i i i i i i";
4732
4733 mode = 0x41;
4734 delay = 5;
4735 blocksize = 4;
4736 readsize = 256;
4737 ;
4738 memory "flash"
4739 paged = yes;
4740 size = 4096;
4741 page_size = 64;
4742 num_pages = 64;
4743 min_write_delay = 4500;
4744 max_write_delay = 4500;
4745 readback_p1 = 0x00;
4746 readback_p2 = 0x00;
4747 read_lo = " 0 0 1 0 0 0 0 0",
4748 " 0 0 0 0 0 a10 a9 a8",
4749 " a7 a6 a5 a4 a3 a2 a1 a0",
4750 " o o o o o o o o";
4751
4752 read_hi = " 0 0 1 0 1 0 0 0",
4753 " 0 0 0 0 0 a10 a9 a8",
4754 " a7 a6 a5 a4 a3 a2 a1 a0",
4755 " o o o o o o o o";
4756
4757 loadpage_lo = " 0 1 0 0 0 0 0 0",
4758 " 0 0 0 x x x x x",
4759 " x x x a4 a3 a2 a1 a0",
4760 " i i i i i i i i";
4761
4762 loadpage_hi = " 0 1 0 0 1 0 0 0",
4763 " 0 0 0 x x x x x",
4764 " x x x a4 a3 a2 a1 a0",
4765 " i i i i i i i i";
4766
4767 writepage = " 0 1 0 0 1 1 0 0",
4768 " 0 0 0 0 0 a10 a9 a8",
4769 " a7 a6 a5 x x x x x",
4770 " x x x x x x x x";
4771
4772 mode = 0x41;
4773 delay = 6;
4774 blocksize = 64;
4775 readsize = 256;
4776 ;
4777
4778 memory "lfuse"
4779 size = 1;
4780 min_write_delay = 4500;
4781 max_write_delay = 4500;
4782 read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
4783 "x x x x x x x x o o o o o o o o";
4784
4785 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
4786 "x x x x x x x x i i i i i i i i";
4787 ;
4788
4789 memory "hfuse"
4790 size = 1;
4791 min_write_delay = 4500;
4792 max_write_delay = 4500;
4793 read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
4794 "x x x x x x x x o o o o o o o o";
4795
4796 write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
4797 "x x x x x x x x i i i i i i i i";
4798 ;
4799
4800 memory "efuse"
4801 size = 1;
4802 min_write_delay = 4500;
4803 max_write_delay = 4500;
4804 read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
4805 "x x x x x x x x o o o o o o o o";
4806
4807 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
4808 "x x x x x x x x i i i i i i i i";
4809 ;
4810
4811 memory "calibration"
4812 size = 1;
4813 read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
4814 "0 0 0 0 0 0 0 0 o o o o o o o o";
4815 ;
4816
4817 memory "signature"
4818 size = 3;
4819 read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
4820 "x x x x x x a1 a0 o o o o o o o o";
4821 ;
4822 ;
4823
4824
4825 #------------------------------------------------------------
4826 # ATmega88
4827 #------------------------------------------------------------
4828
4829 part
4830 id = "m88";
4831 desc = "ATMEGA88";
4832 stk500_devcode = 0x73;
4833 # avr910_devcode = 0x;
4834 pagel = 0xd7;
4835 bs2 = 0xc2;
4836 chip_erase_delay = 9000;
4837 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
4838 "x x x x x x x x x x x x x x x x";
4839
4840 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
4841 "x x x x x x x x x x x x x x x x";
4842
4843 timeout = 200;
4844 stabdelay = 100;
4845 cmdexedelay = 25;
4846 synchloops = 32;
4847 bytedelay = 0;
4848 pollindex = 3;
4849 pollvalue = 0x53;
4850 predelay = 1;
4851 postdelay = 1;
4852 pollmethod = 1;
4853
4854 memory "eeprom"
4855 size = 512;
4856 min_write_delay = 3600;
4857 max_write_delay = 3600;
4858 readback_p1 = 0xff;
4859 readback_p2 = 0xff;
4860 read = " 1 0 1 0 0 0 0 0",
4861 " 0 0 0 x x x x a8",
4862 " a7 a6 a5 a4 a3 a2 a1 a0",
4863 " o o o o o o o o";
4864
4865 write = " 1 1 0 0 0 0 0 0",
4866 " 0 0 0 x x x x a8",
4867 " a7 a6 a5 a4 a3 a2 a1 a0",
4868 " i i i i i i i i";
4869
4870 mode = 0x41;
4871 delay = 5;
4872 blocksize = 4;
4873 readsize = 256;
4874 ;
4875 memory "flash"
4876 paged = yes;
4877 size = 8192;
4878 page_size = 64;
4879 num_pages = 128;
4880 min_write_delay = 4500;
4881 max_write_delay = 4500;
4882 readback_p1 = 0xff;
4883 readback_p2 = 0xff;
4884 read_lo = " 0 0 1 0 0 0 0 0",
4885 " 0 0 0 0 a11 a10 a9 a8",
4886 " a7 a6 a5 a4 a3 a2 a1 a0",
4887 " o o o o o o o o";
4888
4889 read_hi = " 0 0 1 0 1 0 0 0",
4890 " 0 0 0 0 a11 a10 a9 a8",
4891 " a7 a6 a5 a4 a3 a2 a1 a0",
4892 " o o o o o o o o";
4893
4894 loadpage_lo = " 0 1 0 0 0 0 0 0",
4895 " 0 0 0 x x x x x",
4896 " x x x a4 a3 a2 a1 a0",
4897 " i i i i i i i i";
4898
4899 loadpage_hi = " 0 1 0 0 1 0 0 0",
4900 " 0 0 0 x x x x x",
4901 " x x x a4 a3 a2 a1 a0",
4902 " i i i i i i i i";
4903
4904 writepage = " 0 1 0 0 1 1 0 0",
4905 " 0 0 0 0 a11 a10 a9 a8",
4906 " a7 a6 a5 x x x x x",
4907 " x x x x x x x x";
4908
4909 mode = 0x41;
4910 delay = 6;
4911 blocksize = 64;
4912 readsize = 256;
4913 ;
4914
4915 memory "lfuse"
4916 size = 1;
4917 min_write_delay = 4500;
4918 max_write_delay = 4500;
4919 read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
4920 "x x x x x x x x o o o o o o o o";
4921
4922 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
4923 "x x x x x x x x i i i i i i i i";
4924 ;
4925
4926 memory "hfuse"
4927 size = 1;
4928 min_write_delay = 4500;
4929 max_write_delay = 4500;
4930 read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
4931 "x x x x x x x x o o o o o o o o";
4932
4933 write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
4934 "x x x x x x x x i i i i i i i i";
4935 ;
4936
4937 memory "efuse"
4938 size = 1;
4939 min_write_delay = 4500;
4940 max_write_delay = 4500;
4941 read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
4942 "x x x x x x x x o o o o o o o o";
4943
4944 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
4945 "x x x x x x x x i i i i i i i i";
4946 ;
4947
4948 memory "lock"
4949 size = 1;
4950 min_write_delay = 4500;
4951 max_write_delay = 4500;
4952 read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
4953 "x x x x x x x x x x o o o o o o";
4954
4955 write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
4956 "x x x x x x x x 1 1 i i i i i i";
4957 ;
4958
4959 memory "calibration"
4960 size = 1;
4961 read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
4962 "0 0 0 0 0 0 0 0 o o o o o o o o";
4963 ;
4964
4965 memory "signature"
4966 size = 3;
4967 read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
4968 "x x x x x x a1 a0 o o o o o o o o";
4969 ;
4970 ;
4971
4972
4973 #------------------------------------------------------------
4974 # ATtiny2313
4975 #------------------------------------------------------------
4976
4977 part
4978 id = "t2313";
4979 desc = "ATtiny2313";
4980 stk500_devcode = 0x23;
4981 ## avr910_devcode = ?;
4982 ## Try the AT90S2313 devcode:
4983 avr910_devcode = 0x20;
4984 pagel = 0xD4;
4985 bs2 = 0xD6;
4986 reset = io;
4987 chip_erase_delay = 9000;
4988
4989 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
4990 "x x x x x x x x x x x x x x x x";
4991
4992 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
4993 "x x x x x x x x x x x x x x x x";
4994
4995 timeout = 200;
4996 stabdelay = 100;
4997 cmdexedelay = 25;
4998 synchloops = 32;
4999 bytedelay = 0;
5000 pollindex = 3;
5001 pollvalue = 0x53;
5002 predelay = 1;
5003 postdelay = 1;
5004 pollmethod = 1;
5005
5006 memory "eeprom"
5007 size = 128;
5008 min_write_delay = 4000;
5009 max_write_delay = 4500;
5010 readback_p1 = 0xff;
5011 readback_p2 = 0xff;
5012 read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x",
5013 "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
5014
5015 write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x",
5016 "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
5017
5018 mode = 0x41;
5019 delay = 6;
5020 blocksize = 4;
5021 readsize = 256;
5022 ;
5023 memory "flash"
5024 paged = yes;
5025 size = 2048;
5026 page_size = 32;
5027 num_pages = 64;
5028 min_write_delay = 4500;
5029 max_write_delay = 4500;
5030 readback_p1 = 0xff;
5031 readback_p2 = 0xff;
5032 read_lo = " 0 0 1 0 0 0 0 0",
5033 " 0 0 0 0 0 0 a9 a8",
5034 " a7 a6 a5 a4 a3 a2 a1 a0",
5035 " o o o o o o o o";
5036
5037 read_hi = " 0 0 1 0 1 0 0 0",
5038 " 0 0 0 0 0 0 a9 a8",
5039 " a7 a6 a5 a4 a3 a2 a1 a0",
5040 " o o o o o o o o";
5041
5042 # The information in the data sheet of April/2004 is wrong, this works:
5043 loadpage_lo = " 0 1 0 0 0 0 0 0",
5044 " 0 0 0 x x x x x",
5045 " x x x x a3 a2 a1 a0",
5046 " i i i i i i i i";
5047
5048 # The information in the data sheet of April/2004 is wrong, this works:
5049 loadpage_hi = " 0 1 0 0 1 0 0 0",
5050 " 0 0 0 x x x x x",
5051 " x x x x a3 a2 a1 a0",
5052 " i i i i i i i i";
5053
5054 # The information in the data sheet of April/2004 is wrong, this works:
5055 writepage = " 0 1 0 0 1 1 0 0",
5056 " 0 0 0 0 0 0 a9 a8",
5057 " a7 a6 a5 a4 x x x x",
5058 " x x x x x x x x";
5059
5060 mode = 0x41;
5061 delay = 6;
5062 blocksize = 32;
5063 readsize = 256;
5064 ;
5065 # ATtiny2313 has Signature Bytes: 0x1E 0x91 0x0A.
5066 memory "signature"
5067 size = 3;
5068 read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
5069 "x x x x x x a1 a0 o o o o o o o o";
5070 ;
5071 memory "lock"
5072 size = 1;
5073 write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
5074 "x x x x x x x x 1 1 i i i i i i";
5075 ;
5076
5077 memory "lfuse"
5078 size = 1;
5079 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
5080 "x x x x x x x x i i i i i i i i";
5081
5082 read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
5083 "x x x x x x x x o o o o o o o o";
5084 ;
5085
5086 memory "hfuse"
5087 size = 1;
5088 write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
5089 "x x x x x x x x i i i i i i i i";
5090
5091 read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
5092 "x x x x x x x x o o o o o o o o";
5093 ;
5094
5095 memory "efuse"
5096 size = 1;
5097 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
5098 "x x x x x x x x x x x x x x x i";
5099
5100 read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
5101 "x x x x x x x x o o o o o o o o";
5102 ;
5103 # The Tiny2313 has calibration data for both 4 MHz and 8 MHz.
5104 # The information in the data sheet of April/2004 is wrong, this works:
5105
5106 memory "calibration"
5107 size = 2;
5108 read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
5109 "0 0 0 0 0 0 0 a0 o o o o o o o o";
5110 ;
5111 ;
5112
5113 #------------------------------------------------------------
5114 # AT90PWM2
5115 #------------------------------------------------------------
5116
5117 part
5118 id = "pwm2";
5119 desc = "AT90PWM2";
5120 stk500_devcode = 0x65;
5121 ## avr910_devcode = ?;
5122 pagel = 0xD8;
5123 bs2 = 0xE2;
5124 reset = io;
5125 chip_erase_delay = 9000;
5126
5127 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
5128 "x x x x x x x x x x x x x x x x";
5129
5130 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
5131 "x x x x x x x x x x x x x x x x";
5132
5133 timeout = 200;
5134 stabdelay = 100;
5135 cmdexedelay = 25;
5136 synchloops = 32;
5137 bytedelay = 0;
5138 pollindex = 3;
5139 pollvalue = 0x53;
5140 predelay = 1;
5141 postdelay = 1;
5142 pollmethod = 1;
5143
5144 memory "eeprom"
5145 size = 512;
5146 min_write_delay = 4000;
5147 max_write_delay = 4500;
5148 readback_p1 = 0xff;
5149 readback_p2 = 0xff;
5150 read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8",
5151 "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
5152
5153 write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8",
5154 "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
5155
5156 mode = 0x41;
5157 delay = 6;
5158 blocksize = 4;
5159 readsize = 256;
5160 ;
5161 memory "flash"
5162 paged = yes;
5163 size = 8192;
5164 page_size = 64;
5165 num_pages = 128;
5166 min_write_delay = 4500;
5167 max_write_delay = 4500;
5168 readback_p1 = 0xff;
5169 readback_p2 = 0xff;
5170 read_lo = " 0 0 1 0 0 0 0 0",
5171 " 0 0 0 0 a11 a10 a9 a8",
5172 " a7 a6 a5 a4 a3 a2 a1 a0",
5173 " o o o o o o o o";
5174
5175 read_hi = " 0 0 1 0 1 0 0 0",
5176 " 0 0 0 0 a11 a10 a9 a8",
5177 " a7 a6 a5 a4 a3 a2 a1 a0",
5178 " o o o o o o o o";
5179
5180 loadpage_lo = " 0 1 0 0 0 0 0 0",
5181 " 0 0 0 x x x x x",
5182 " x x a5 a4 a3 a2 a1 a0",
5183 " i i i i i i i i";
5184
5185 loadpage_hi = " 0 1 0 0 1 0 0 0",
5186 " 0 0 0 x x x x x",
5187 " x x a5 a4 a3 a2 a1 a0",
5188 " i i i i i i i i";
5189
5190 writepage = " 0 1 0 0 1 1 0 0",
5191 " 0 0 0 0 a11 a10 a9 a8",
5192 " a7 a6 x x x x x x",
5193 " x x x x x x x x";
5194
5195 mode = 0x41;
5196 delay = 6;
5197 blocksize = 64;
5198 readsize = 256;
5199 ;
5200 # AT90PWM2 has Signature Bytes: 0x1E 0x93 0x81.
5201 memory "signature"
5202 size = 3;
5203 read = "0 0 1 1 0 0 0 0 0 0 x x x x x x",
5204 "x x x x x x a1 a0 o o o o o o o o";
5205 ;
5206 memory "lock"
5207 size = 1;
5208 write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
5209 "x x x x x x x x 1 1 i i i i i i";
5210
5211 read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
5212 "x x x x x x x x x x o o o o o o";
5213 ;
5214
5215 memory "lfuse"
5216 size = 1;
5217 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
5218 "x x x x x x x x i i i i i i i i";
5219
5220 read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
5221 "x x x x x x x x o o o o o o o o";
5222 ;
5223
5224 memory "hfuse"
5225 size = 1;
5226 write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
5227 "x x x x x x x x i i i i i i i i";
5228
5229 read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
5230 "x x x x x x x x o o o o o o o o";
5231 ;
5232
5233 memory "efuse"
5234 size = 1;
5235 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
5236 "x x x x x x x x x x x x x x x i";
5237
5238 read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
5239 "x x x x x x x x o o o o o o o o";
5240 ;
5241
5242 memory "calibration"
5243 size = 1;
5244 read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
5245 "0 0 0 0 0 0 0 0 o o o o o o o o";
5246 ;
5247 ;
5248
5249 #------------------------------------------------------------
5250 # AT90PWM3
5251 #------------------------------------------------------------
5252
5253 # Completely identical to AT90PWM2 (including the signature!)
5254
5255 part
5256 id = "pwm3";
5257 desc = "AT90PWM3";
5258 stk500_devcode = 0x65;
5259 ## avr910_devcode = ?;
5260 pagel = 0xD8;
5261 bs2 = 0xE2;
5262 reset = io;
5263 chip_erase_delay = 9000;
5264
5265 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
5266 "x x x x x x x x x x x x x x x x";
5267
5268 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
5269 "x x x x x x x x x x x x x x x x";
5270
5271 timeout = 200;
5272 stabdelay = 100;
5273 cmdexedelay = 25;
5274 synchloops = 32;
5275 bytedelay = 0;
5276 pollindex = 3;
5277 pollvalue = 0x53;
5278 predelay = 1;
5279 postdelay = 1;
5280 pollmethod = 1;
5281
5282 memory "eeprom"
5283 size = 512;
5284 min_write_delay = 4000;
5285 max_write_delay = 4500;
5286 readback_p1 = 0xff;
5287 readback_p2 = 0xff;
5288 read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8",
5289 "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
5290
5291 write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8",
5292 "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
5293
5294 mode = 0x41;
5295 delay = 6;
5296 blocksize = 4;
5297 readsize = 256;
5298 ;
5299 memory "flash"
5300 paged = yes;
5301 size = 8192;
5302 page_size = 64;
5303 num_pages = 128;
5304 min_write_delay = 4500;
5305 max_write_delay = 4500;
5306 readback_p1 = 0xff;
5307 readback_p2 = 0xff;
5308 read_lo = " 0 0 1 0 0 0 0 0",
5309 " 0 0 0 0 a11 a10 a9 a8",
5310 " a7 a6 a5 a4 a3 a2 a1 a0",
5311 " o o o o o o o o";
5312
5313 read_hi = " 0 0 1 0 1 0 0 0",
5314 " 0 0 0 0 a11 a10 a9 a8",
5315 " a7 a6 a5 a4 a3 a2 a1 a0",
5316 " o o o o o o o o";
5317
5318 loadpage_lo = " 0 1 0 0 0 0 0 0",
5319 " 0 0 0 x x x x x",
5320 " x x a5 a4 a3 a2 a1 a0",
5321 " i i i i i i i i";
5322
5323 loadpage_hi = " 0 1 0 0 1 0 0 0",
5324 " 0 0 0 x x x x x",
5325 " x x a5 a4 a3 a2 a1 a0",
5326 " i i i i i i i i";
5327
5328 writepage = " 0 1 0 0 1 1 0 0",
5329 " 0 0 0 0 a11 a10 a9 a8",
5330 " a7 a6 x x x x x x",
5331 " x x x x x x x x";
5332
5333 mode = 0x41;
5334 delay = 6;
5335 blocksize = 64;
5336 readsize = 256;
5337 ;
5338 # AT90PWM2 has Signature Bytes: 0x1E 0x93 0x81.
5339 memory "signature"
5340 size = 3;
5341 read = "0 0 1 1 0 0 0 0 0 0 x x x x x x",
5342 "x x x x x x a1 a0 o o o o o o o o";
5343 ;
5344 memory "lock"
5345 size = 1;
5346 write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
5347 "x x x x x x x x 1 1 i i i i i i";
5348
5349 read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
5350 "x x x x x x x x x x o o o o o o";
5351 ;
5352
5353 memory "lfuse"
5354 size = 1;
5355 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
5356 "x x x x x x x x i i i i i i i i";
5357
5358 read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
5359 "x x x x x x x x o o o o o o o o";
5360 ;
5361
5362 memory "hfuse"
5363 size = 1;
5364 write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
5365 "x x x x x x x x i i i i i i i i";
5366
5367 read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
5368 "x x x x x x x x o o o o o o o o";
5369 ;
5370
5371 memory "efuse"
5372 size = 1;
5373 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
5374 "x x x x x x x x x x x x x x x i";
5375
5376 read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
5377 "x x x x x x x x o o o o o o o o";
5378 ;
5379
5380 memory "calibration"
5381 size = 1;
5382 read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
5383 "0 0 0 0 0 0 0 0 o o o o o o o o";
5384 ;
5385 ;
5386
5387 #------------------------------------------------------------
5388 # ATtiny25
5389 #------------------------------------------------------------
5390
5391 part
5392 id = "t25";
5393 desc = "ATtiny25";
5394 ## no STK500 devcode in XML file, use the ATtiny45 one
5395 stk500_devcode = 0x14;
5396 ## avr910_devcode = ?;
5397 ## Try the AT90S2313 devcode:
5398 avr910_devcode = 0x20;
5399 reset = io;
5400 chip_erase_delay = 4500;
5401
5402 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
5403 "x x x x x x x x x x x x x x x x";
5404
5405 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
5406 "x x x x x x x x x x x x x x x x";
5407
5408 timeout = 200;
5409 stabdelay = 100;
5410 cmdexedelay = 25;
5411 synchloops = 32;
5412 bytedelay = 0;
5413 pollindex = 3;
5414 pollvalue = 0x53;
5415 predelay = 1;
5416 postdelay = 1;
5417 pollmethod = 1;
5418
5419 memory "eeprom"
5420 size = 128;
5421 min_write_delay = 4000;
5422 max_write_delay = 4500;
5423 readback_p1 = 0xff;
5424 readback_p2 = 0xff;
5425 read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x",
5426 "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
5427
5428 write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x",
5429 "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
5430
5431 mode = 0x41;
5432 delay = 6;
5433 blocksize = 4;
5434 readsize = 256;
5435 ;
5436 memory "flash"
5437 paged = yes;
5438 size = 2048;
5439 page_size = 32;
5440 num_pages = 64;
5441 min_write_delay = 4500;
5442 max_write_delay = 4500;
5443 readback_p1 = 0xff;
5444 readback_p2 = 0xff;
5445 read_lo = " 0 0 1 0 0 0 0 0",
5446 " 0 0 0 0 0 0 a9 a8",
5447 " a7 a6 a5 a4 a3 a2 a1 a0",
5448 " o o o o o o o o";
5449
5450 read_hi = " 0 0 1 0 1 0 0 0",
5451 " 0 0 0 0 0 0 a9 a8",
5452 " a7 a6 a5 a4 a3 a2 a1 a0",
5453 " o o o o o o o o";
5454
5455 loadpage_lo = " 0 1 0 0 0 0 0 0",
5456 " 0 0 0 x x x x x",
5457 " x x x x a3 a2 a1 a0",
5458 " i i i i i i i i";
5459
5460 loadpage_hi = " 0 1 0 0 1 0 0 0",
5461 " 0 0 0 x x x x x",
5462 " x x x x a3 a2 a1 a0",
5463 " i i i i i i i i";
5464
5465 writepage = " 0 1 0 0 1 1 0 0",
5466 " 0 0 0 0 0 0 a9 a8",
5467 " a7 a6 a5 a4 x x x x",
5468 " x x x x x x x x";
5469
5470 mode = 0x41;
5471 delay = 6;
5472 blocksize = 32;
5473 readsize = 256;
5474 ;
5475 # ATtiny25 has Signature Bytes: 0x1E 0x91 0x08.
5476 memory "signature"
5477 size = 3;
5478 read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
5479 "x x x x x x a1 a0 o o o o o o o o";
5480 ;
5481 memory "lock"
5482 size = 1;
5483 write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
5484 "x x x x x x x x 1 1 i i i i i i";
5485 ;
5486
5487 memory "lfuse"
5488 size = 1;
5489 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
5490 "x x x x x x x x i i i i i i i i";
5491
5492 read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
5493 "x x x x x x x x o o o o o o o o";
5494 ;
5495
5496 memory "hfuse"
5497 size = 1;
5498 write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
5499 "x x x x x x x x i i i i i i i i";
5500
5501 read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
5502 "x x x x x x x x o o o o o o o o";
5503 ;
5504
5505 memory "efuse"
5506 size = 1;
5507 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
5508 "x x x x x x x x x x x x x x x i";
5509
5510 read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
5511 "x x x x x x x x o o o o o o o o";
5512 ;
5513
5514 memory "calibration"
5515 size = 1;
5516 read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
5517 "0 0 0 0 0 0 0 a0 o o o o o o o o";
5518 ;
5519 ;
5520
5521 #------------------------------------------------------------
5522 # ATtiny45
5523 #------------------------------------------------------------
5524
5525 part
5526 id = "t45";
5527 desc = "ATtiny45";
5528 stk500_devcode = 0x14;
5529 ## avr910_devcode = ?;
5530 ## Try the AT90S2313 devcode:
5531 avr910_devcode = 0x20;
5532 reset = io;
5533 chip_erase_delay = 4500;
5534
5535 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
5536 "x x x x x x x x x x x x x x x x";
5537
5538 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
5539 "x x x x x x x x x x x x x x x x";
5540
5541 timeout = 200;
5542 stabdelay = 100;
5543 cmdexedelay = 25;
5544 synchloops = 32;
5545 bytedelay = 0;
5546 pollindex = 3;
5547 pollvalue = 0x53;
5548 predelay = 1;
5549 postdelay = 1;
5550 pollmethod = 1;
5551
5552 memory "eeprom"
5553 size = 256;
5554 min_write_delay = 4000;
5555 max_write_delay = 4500;
5556 readback_p1 = 0xff;
5557 readback_p2 = 0xff;
5558 read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x",
5559 "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
5560
5561 write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x",
5562 "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
5563
5564 mode = 0x41;
5565 delay = 6;
5566 blocksize = 4;
5567 readsize = 256;
5568 ;
5569 memory "flash"
5570 paged = yes;
5571 size = 4096;
5572 page_size = 64;
5573 num_pages = 64;
5574 min_write_delay = 4500;
5575 max_write_delay = 4500;
5576 readback_p1 = 0xff;
5577 readback_p2 = 0xff;
5578 read_lo = " 0 0 1 0 0 0 0 0",
5579 " 0 0 0 0 0 a10 a9 a8",
5580 " a7 a6 a5 a4 a3 a2 a1 a0",
5581 " o o o o o o o o";
5582
5583 read_hi = " 0 0 1 0 1 0 0 0",
5584 " 0 0 0 0 0 a10 a9 a8",
5585 " a7 a6 a5 a4 a3 a2 a1 a0",
5586 " o o o o o o o o";
5587
5588 loadpage_lo = " 0 1 0 0 0 0 0 0",
5589 " 0 0 0 x x x x x",
5590 " x x x a4 a3 a2 a1 a0",
5591 " i i i i i i i i";
5592
5593 loadpage_hi = " 0 1 0 0 1 0 0 0",
5594 " 0 0 0 x x x x x",
5595 " x x x a4 a3 a2 a1 a0",
5596 " i i i i i i i i";
5597
5598 writepage = " 0 1 0 0 1 1 0 0",
5599 " 0 0 0 0 0 a10 a9 a8",
5600 " a7 a6 a5 x x x x x",
5601 " x x x x x x x x";
5602
5603 mode = 0x41;
5604 delay = 6;
5605 blocksize = 32;
5606 readsize = 256;
5607 ;
5608 # ATtiny45 has Signature Bytes: 0x1E 0x92 0x08.
5609 memory "signature"
5610 size = 3;
5611 read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
5612 "x x x x x x a1 a0 o o o o o o o o";
5613 ;
5614 memory "lock"
5615 size = 1;
5616 write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
5617 "x x x x x x x x 1 1 i i i i i i";
5618 ;
5619
5620 memory "lfuse"
5621 size = 1;
5622 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
5623 "x x x x x x x x i i i i i i i i";
5624
5625 read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
5626 "x x x x x x x x o o o o o o o o";
5627 ;
5628
5629 memory "hfuse"
5630 size = 1;
5631 write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
5632 "x x x x x x x x i i i i i i i i";
5633
5634 read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
5635 "x x x x x x x x o o o o o o o o";
5636 ;
5637
5638 memory "efuse"
5639 size = 1;
5640 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
5641 "x x x x x x x x x x x x x x x i";
5642
5643 read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
5644 "x x x x x x x x o o o o o o o o";
5645 ;
5646
5647 memory "calibration"
5648 size = 1;
5649 read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
5650 "0 0 0 0 0 0 0 a0 o o o o o o o o";
5651 ;
5652 ;
5653
5654 #------------------------------------------------------------
5655 # ATtiny85
5656 #------------------------------------------------------------
5657
5658 part
5659 id = "t85";
5660 desc = "ATtiny85";
5661 ## no STK500 devcode in XML file, use the ATtiny45 one
5662 stk500_devcode = 0x14;
5663 ## avr910_devcode = ?;
5664 ## Try the AT90S2313 devcode:
5665 avr910_devcode = 0x20;
5666 reset = io;
5667 chip_erase_delay = 4500;
5668
5669 pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
5670 "x x x x x x x x x x x x x x x x";
5671
5672 chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
5673 "x x x x x x x x x x x x x x x x";
5674
5675 timeout = 200;
5676 stabdelay = 100;
5677 cmdexedelay = 25;
5678 synchloops = 32;
5679 bytedelay = 0;
5680 pollindex = 3;
5681 pollvalue = 0x53;
5682 predelay = 1;
5683 postdelay = 1;
5684 pollmethod = 1;
5685
5686 memory "eeprom"
5687 size = 512;
5688 min_write_delay = 4000;
5689 max_write_delay = 4500;
5690 readback_p1 = 0xff;
5691 readback_p2 = 0xff;
5692 read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8",
5693 "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
5694
5695 write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8",
5696 "a8 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
5697
5698 mode = 0x41;
5699 delay = 6;
5700 blocksize = 4;
5701 readsize = 256;
5702 ;
5703 memory "flash"
5704 paged = yes;
5705 size = 8192;
5706 page_size = 64;
5707 num_pages = 128;
5708 min_write_delay = 4500;
5709 max_write_delay = 4500;
5710 readback_p1 = 0xff;
5711 readback_p2 = 0xff;
5712 read_lo = " 0 0 1 0 0 0 0 0",
5713 " 0 0 0 0 a11 a10 a9 a8",
5714 " a7 a6 a5 a4 a3 a2 a1 a0",
5715 " o o o o o o o o";
5716
5717 read_hi = " 0 0 1 0 1 0 0 0",
5718 " 0 0 0 0 a11 a10 a9 a8",
5719 " a7 a6 a5 a4 a3 a2 a1 a0",
5720 " o o o o o o o o";
5721
5722 loadpage_lo = " 0 1 0 0 0 0 0 0",
5723 " 0 0 0 x x x x x",
5724 " x x x a4 a3 a2 a1 a0",
5725 " i i i i i i i i";
5726
5727 loadpage_hi = " 0 1 0 0 1 0 0 0",
5728 " 0 0 0 x x x x x",
5729 " x x x a4 a3 a2 a1 a0",
5730 " i i i i i i i i";
5731
5732 writepage = " 0 1 0 0 1 1 0 0",
5733 " 0 0 0 0 a11 a10 a9 a8",
5734 " a7 a6 a5 x x x x x",
5735 " x x x x x x x x";
5736
5737 mode = 0x41;
5738 delay = 6;
5739 blocksize = 32;
5740 readsize = 256;
5741 ;
5742 # ATtiny85 has Signature Bytes: 0x1E 0x93 0x08.
5743 memory "signature"
5744 size = 3;
5745 read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
5746 "x x x x x x a1 a0 o o o o o o o o";
5747 ;
5748 memory "lock"
5749 size = 1;
5750 write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
5751 "x x x x x x x x 1 1 i i i i i i";
5752 ;
5753
5754 memory "lfuse"
5755 size = 1;
5756 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
5757 "x x x x x x x x i i i i i i i i";
5758
5759 read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
5760 "x x x x x x x x o o o o o o o o";
5761 ;
5762
5763 memory "hfuse"
5764 size = 1;
5765 write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
5766 "x x x x x x x x i i i i i i i i";
5767
5768 read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
5769 "x x x x x x x x o o o o o o o o";
5770 ;
5771
5772 memory "efuse"
5773 size = 1;
5774 write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
5775 "x x x x x x x x x x x x x x x i";
5776
5777 read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
5778 "x x x x x x x x o o o o o o o o";
5779 ;
5780
5781 memory "calibration"
5782 size = 1;
5783 read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
5784 "0 0 0 0 0 0 0 a0 o o o o o o o o";
5785 ;
5786 ;