| 1 | #------------------------------------------------------------
 | 
| 2 | # ATtiny167
 | 
| 3 | #------------------------------------------------------------
 | 
| 4 | 
 | 
| 5 | part
 | 
| 6 |      id            = "t167";
 | 
| 7 |      desc          = "ATtiny167";
 | 
| 8 |      has_debugwire = yes;
 | 
| 9 |      flash_instr   = 0xB6, 0x01, 0x11;
 | 
| 10 |      eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4,
 | 
| 11 |                0x00, 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB,
 | 
| 12 |                0xBF, 0x99, 0xF9, 0xBB, 0xAF;
 | 
| 13 | ## no STK500 devcode in XML file, use the ATtiny45 one
 | 
| 14 |      stk500_devcode   = 0x14;
 | 
| 15 | ##  avr910_devcode   = ?;
 | 
| 16 | ##  Try the AT90S2313 devcode:
 | 
| 17 |      avr910_devcode   = 0x20;
 | 
| 18 |      signature        = 0x1e 0x94 0x87;
 | 
| 19 |      reset            = io;
 | 
| 20 |      chip_erase_delay = 1000;
 | 
| 21 | 
 | 
| 22 |      pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
 | 
| 23 |                         "x x x x  x x x x    x x x x  x x x x";
 | 
| 24 | 
 | 
| 25 |      chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
 | 
| 26 |                         "x x x x  x x x x    x x x x  x x x x";
 | 
| 27 | 
 | 
| 28 |     timeout      = 200;
 | 
| 29 |     stabdelay    = 100;
 | 
| 30 |     cmdexedelay  = 25;
 | 
| 31 |     synchloops   = 32;
 | 
| 32 |     bytedelay    = 0;
 | 
| 33 |     pollindex    = 3;
 | 
| 34 |     pollvalue    = 0x53;
 | 
| 35 |     predelay     = 1;
 | 
| 36 |     postdelay    = 1;
 | 
| 37 |     pollmethod   = 0;
 | 
| 38 | 
 | 
| 39 |     pp_controlstack     =
 | 
| 40 |         0x0E, 0x1E, 0x0E, 0x1E, 0x2E, 0x3E, 0x2E, 0x3E,
 | 
| 41 |         0x4E, 0x5E, 0x4E, 0x5E, 0x6E, 0x7E, 0x6E, 0x7E,
 | 
| 42 |         0x06, 0x16, 0x46, 0x56, 0x0A, 0x1A, 0x4A, 0x5A,
 | 
| 43 |         0x1E, 0x7C, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
 | 
| 44 |     hventerstabdelay    = 100;
 | 
| 45 |     progmodedelay       = 0;
 | 
| 46 |     latchcycles         = 5;
 | 
| 47 |     togglevtg           = 1;
 | 
| 48 |     poweroffdelay       = 20;
 | 
| 49 |     resetdelayms        = 1;
 | 
| 50 |     resetdelayus        = 0;
 | 
| 51 |     hvleavestabdelay    = 15;
 | 
| 52 |     chiperasepulsewidth = 0;
 | 
| 53 |     chiperasepolltimeout = 10;
 | 
| 54 |     programfusepulsewidth = 0;
 | 
| 55 |     programfusepolltimeout = 5;
 | 
| 56 |     programlockpulsewidth = 0;
 | 
| 57 |     programlockpolltimeout = 5;
 | 
| 58 | 
 | 
| 59 |     idr                 = 0x00;
 | 
| 60 |     spmcr               = 0x57;
 | 
| 61 |     allowfullpagebitstream = no;
 | 
| 62 | 
 | 
| 63 |      memory "eeprom"
 | 
| 64 |          size            = 512;
 | 
| 65 |          paged           = no;
 | 
| 66 |          page_size       = 4;
 | 
| 67 |          min_write_delay = 4000;
 | 
| 68 |          max_write_delay = 4500;
 | 
| 69 |          readback_p1     = 0xff;
 | 
| 70 |          readback_p2     = 0xff;
 | 
| 71 |          read            = "1  0  1  0   0  0  0  0    0 0 x x  x x x a8",
 | 
| 72 |                            "a7 a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
 | 
| 73 | 
 | 
| 74 |          write           = "1  1  0  0   0  0  0  0    0 0 x x  x x x a8",
 | 
| 75 |                            "a8 a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
 | 
| 76 | 
 | 
| 77 |   loadpage_lo  = "  1   1   0   0      0   0   0   1",
 | 
| 78 |                  "  0   0   0   0      0   0   0   0",
 | 
| 79 |                  "  0   0   0   0      0   0  a1  a0",
 | 
| 80 |                  "  i   i   i   i      i   i   i   i";
 | 
| 81 | 
 | 
| 82 |   writepage  = "  1   1   0   0      0   0   1   0",
 | 
| 83 |                "  0   0   x   x      x   x   x   x",
 | 
| 84 |                "  0   0  a5  a4     a3  a2   0   0",
 | 
| 85 |                "  x   x   x   x      x   x   x   x";
 | 
| 86 | 
 | 
| 87 |   mode       = 0x41;
 | 
| 88 |   delay      = 10;
 | 
| 89 |   blocksize  = 4;
 | 
| 90 |   readsize   = 256;
 | 
| 91 |        ;
 | 
| 92 |      memory "flash"
 | 
| 93 |          paged           = yes;
 | 
| 94 |          size            = 16384;
 | 
| 95 |          page_size       = 128;
 | 
| 96 |          num_pages       = 128;
 | 
| 97 |          min_write_delay = 4500;
 | 
| 98 |          max_write_delay = 4500;
 | 
| 99 |          readback_p1     = 0xff;
 | 
| 100 |          readback_p2     = 0xff;
 | 
| 101 |          read_lo         = "  0   0   1   0    0   0   0   0",
 | 
| 102 |                            "  0   0   0  a12  a11 a10  a9  a8",
 | 
| 103 |                            " a7  a6  a5  a4   a3  a2   a1  a0",
 | 
| 104 |                            "  o   o   o   o    o   o   o   o";
 | 
| 105 | 
 | 
| 106 |          read_hi         = "  0   0   1   0    1   0   0   0",
 | 
| 107 |                            "  0   0   0  a12  a11 a10  a9  a8",
 | 
| 108 |                            " a7  a6  a5  a4   a3  a2   a1  a0",
 | 
| 109 |                            "  o   o   o   o    o   o   o   o";
 | 
| 110 | 
 | 
| 111 |          loadpage_lo     = "  0   1   0   0    0   0   0   0",
 | 
| 112 |                            "  0   0   0   x    x   x   x   x",
 | 
| 113 |                            "  x   x  a5  a4   a3  a2  a1  a0",
 | 
| 114 |                            "  i   i   i   i    i   i   i   i";
 | 
| 115 | 
 | 
| 116 |          loadpage_hi     = "  0   1   0   0    1   0   0   0",
 | 
| 117 |                            "  0   0   0   x    x   x   x   x",
 | 
| 118 |                            "  x   x  a5  a4   a3  a2  a1  a0",
 | 
| 119 |                            "  i   i   i   i    i   i   i   i";
 | 
| 120 | 
 | 
| 121 |          writepage       = "  0  1  0  0   1   1   0  0",
 | 
| 122 |                            "  0  0  0  0  a11 a10 a9 a8",
 | 
| 123 |                            " a7 a6 a5  x   x  x  x  x",
 | 
| 124 |                            "  x  x  x  x   x  x  x  x";
 | 
| 125 | 
 | 
| 126 |   mode       = 0x41;
 | 
| 127 |   delay      = 10;
 | 
| 128 |   blocksize  = 64;
 | 
| 129 |   readsize   = 256;
 | 
| 130 |        ;
 | 
| 131 | #   ATtiny167 has Signature Bytes: 0x1E 0x94 0x87.
 | 
| 132 |      memory "signature"
 | 
| 133 |          size            = 3;
 | 
| 134 |          read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
 | 
| 135 |                            "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
 | 
| 136 |        ;
 | 
| 137 | 
 | 
| 138 |      memory "lock"
 | 
| 139 |          size            = 1;
 | 
| 140 |          write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
 | 
| 141 |                            "x x x x  x x x x  x x x x  x x i i";
 | 
| 142 |          read            = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
 | 
| 143 |                            "0 0 0 0  0 0 0 0  o o o o  o o o o";
 | 
| 144 |         min_write_delay = 9000;
 | 
| 145 |         max_write_delay = 9000;
 | 
| 146 |        ;
 | 
| 147 | 
 | 
| 148 |      memory "lfuse"
 | 
| 149 |          size            = 1;
 | 
| 150 |          write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 0 0 0",
 | 
| 151 |                            "x x x x  x x x x  i i i i  i i i i";
 | 
| 152 | 
 | 
| 153 |          read            = "0 1 0 1  0 0 0 0  0 0 0 0  0 0 0 0",
 | 
| 154 |                            "x x x x  x x x x  o o o o  o o o o";
 | 
| 155 |         min_write_delay = 9000;
 | 
| 156 |         max_write_delay = 9000;
 | 
| 157 |        ;
 | 
| 158 | 
 | 
| 159 |      memory "hfuse"
 | 
| 160 |          size            = 1;
 | 
| 161 |          write           = "1 0 1 0  1 1 0 0  1 0 1 0  1 0 0 0",
 | 
| 162 |                            "x x x x  x x x x  i i i i  i i i i";
 | 
| 163 | 
 | 
| 164 |          read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
 | 
| 165 |                            "x x x x  x x x x  o o o o  o o o o";
 | 
| 166 |         min_write_delay = 9000;
 | 
| 167 |         max_write_delay = 9000;
 | 
| 168 |        ;
 | 
| 169 | 
 | 
| 170 |      memory "efuse"
 | 
| 171 |          size            = 1;
 | 
| 172 |          write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
 | 
| 173 |                            "x x x x  x x x x  x x x x  x x x i";
 | 
| 174 | 
 | 
| 175 |          read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
 | 
| 176 |                            "x x x x  x x x x  o o o o  o o o o";
 | 
| 177 |         min_write_delay = 9000;
 | 
| 178 |         max_write_delay = 9000;
 | 
| 179 |      ;
 | 
| 180 | 
 | 
| 181 |      memory "calibration"
 | 
| 182 |          size            = 1;
 | 
| 183 |          read            = "0  0  1  1   1  0  0  0    0 0 0 x  x x x x",
 | 
| 184 |                            "0  0  0  0   0  0  0  a0   o o o o  o o o o";
 | 
| 185 |      ;
 | 
| 186 |   ;
 |