diff --git a/binaries/source.webloc b/binaries/source.webloc
new file mode 100644
index 0000000..77a6106
--- /dev/null
+++ b/binaries/source.webloc
@@ -0,0 +1,8 @@
+
+
+
+
+ URL
+ http://www.instructables.com/id/Attiny85-Sd-Wav-Player/
+
+
diff --git a/binaries/tiny.hex b/binaries/tiny.hex
new file mode 100755
index 0000000..c3f990a
--- /dev/null
+++ b/binaries/tiny.hex
@@ -0,0 +1,425 @@
+:1000000011C02BC02AC029C028C027C026C025C0C7
+:1000100024C023C0C5C021C0B8C11FC01EC02573E5
+:100020002F25730011241FBECFE5D2E0DEBFCDBF68
+:1000300010E0A0E6B0E0E2E5FAE102C005900D9222
+:10004000A237B107D9F711E0A2E7B0E001C01D92D5
+:10005000AC3CB107E1F79AD1FACCD2CFA895019781
+:1000600028F0E0EAFFE03197F1F7F8CF089572E069
+:100070007A95F1F70197D9F7A895089588E08DB999
+:10008000C19AC39A0895C3980895C39A089584E0C5
+:1000900086BB86BB86BB86BB86BB86BB86BB86BB58
+:1000A00086BB86BB86BB86BB86BB86BB86BB86BB48
+:1000B00000008FB1089594E068B378E087FB61F9A0
+:1000C00068BB880F96BB96BB7A95C1F7C19A089515
+:1000D000DC01FB0122E032E02E1B3F0B241B350B21
+:1000E00084E0319788F086BB86BB86BB86BB86BB27
+:1000F00086BB86BB86BB86BB86BB86BB86BB86BBF8
+:1001000086BB86BB86BBEDCF109731F0C0DF8D93E9
+:1001100041505040D9F72FC08C9956958C994795EE
+:10012000899956958999479560917600A0E9B0E044
+:10013000A60FB11D8091A0018C3FE0F78C99A7DF3D
+:10014000A6DF8C998058E82F899B07C08C999FDF88
+:100150009EDF8C998058E80FE795ED93F894809195
+:10016000A00183958093A0017894639541505040FD
+:10017000E9F66093760084E086BB86BB86BB86BBCF
+:1001800086BB86BB86BB86BB86BB86BB86BB86BB67
+:1001900086BB86BB86BB86BB2150304069F708957D
+:1001A0008F938FB78F93EF93FF93E0917700FF27A3
+:1001B000E057FF4F8091A001815038F08093A0015B
+:1001C00081918BBDE059E0937700FF91EF918F9182
+:1001D0008FBF8F9118958A3019F48DE001D08AE095
+:1001E000FF93EF93E0917200F0917300309709F064
+:1001F0000995EF91FF910895FC018591803011F0F0
+:10020000EADFFBCF0895FF27E0E230E247FF0CC0B2
+:10021000419597FF09C0EDE26095709580959095A6
+:10022000611D711D811D911D27FF02C0219530E3C5
+:1002300050E2AA27660F771F881F991FAA1FA417CD
+:1002400010F0A41B63955A95A9F7AA3008F0A95F8E
+:10025000A05DAF93F395611571058105910541F797
+:10026000ED3211F4EF93F395F21718F43F93F395F1
+:10027000FBCF8F91B0DFFA95E1F70895E991F991FD
+:100280008591803021F0853219F0A5DFF9CF0895EE
+:1002900020E0E89455915532C1F3503311F468943D
+:1002A00055915A3348F4505390F3220F022E220FE7
+:1002B000220F200D250FF4CF0EF4219589919991ED
+:1002C000533619F3533729F1533559F1BC018827B7
+:1002D0009927E8945C3621F4899199916894559115
+:1002E000543639F446EF7EF077FF0DC08FEF9FEF65
+:1002F0000AC055374AE039F0583540E121F052360E
+:1003000042E009F00895FF93EF937DDFEF91FF91B5
+:10031000B7CFFF93EF93FC0181918030B9F35BDF9E
+:10032000FBCFFF93EF9368DFF1CFDF93CF93CDB790
+:10033000DEB72596A3DFCF91DF910895F701819372
+:100340007F010895DF93CF93CDB7DEB72596E09177
+:100350007200F0917300EF93FF93EEE9F1E0E09308
+:100360007200F0937300FF92EF92E990F99086DFAC
+:10037000F7011082EF90FF90FF91EF91E0937200F0
+:10038000F0937300CF91DF9108951895A0E0B0E04D
+:10039000EBECF1E025CB61B614BE8EE081BD89E2C5
+:1003A00088BB8EE387BB789471E8272E70E0372EE8
+:1003B000C0E9D0E06EE1462E60E0562E81EA91E081
+:1003C000B0D8892B09F0FEC1A8951092900080E664
+:1003D00090E028D7892B39F480E990E061E070E063
+:1003E0004EE850E073D780919000860D81BF80E980
+:1003F00091E067E670E0CFD69C018430910529F04A
+:1004000057E6A52E50E0B52EDAC180E991E06BE603
+:1004100070E0C1D69C014BE6A42E40E0B42ECFC1C3
+:10042000812C22E0922E90E8792E80E991E060E024
+:1004300070E0EDD49C0182E0C82EBEC1A89580E991
+:1004400091E068E770E0E3D49C01009709F0B7C140
+:1004500080918100882349F380918000827171F737
+:1004600081E890E06CE670E066DA009739F3A895D1
+:100470008DB79EB708970FB6F8949EBF0FBE8DBF7D
+:10048000EDB7FEB73196ADB7BEB71296DC93CE93FB
+:10049000119753824282B582A4823782268252DF2C
+:1004A0008DB79EB708960FB6F8949EBF0FBE8DBF4E
+:1004B000CE01B8D69C01009709F078C1CE016CE05E
+:1004C00070E04EE850E002D7892B09F07BC18091A3
+:1004D0008E0090918F000C9709F074C18091980064
+:1004E00090919900A0919A00B0919B0087559144FA
+:1004F000A645B54409F066C1DD24A89580E990E0E1
+:1005000068E070E04EE850E0E1D680918E00909176
+:100510008F00089709F056C1E0909400F090950084
+:100520000091960010919700809190009091910019
+:10053000A0919200B09193008C3449E4940743E574
+:10054000A40744E5B40709F4B6C08D3469E49607FE
+:1005500063E5A60764E5B60778F486362DE69207CC
+:1005600024E7A20720E2B207B9F084549944A345D6
+:10057000B04509F027C19FC0843661E6960764E75D
+:10058000A60761E6B60709F463C086569146A346FE
+:10059000B44709F017C18FC0C70181709070892BD3
+:1005A00029F00894E11CF11C011D111DD801C7019F
+:1005B0004097A109B10985359105A105B10508F05C
+:1005C00001C180E990E0B7014EE850E07FD680910C
+:1005D0008E0090918F00A0E0B0E08E159F05A007DF
+:1005E000B10709F0EFC080919000813009F0EAC0B6
+:1005F000D09092008D2D8150823008F0E3C0D1BAA6
+:1006000090919E00983019F0903109F0DBC081B3D1
+:10061000892B81BB94FDDD0C2091940030919500D5
+:100620004091960050919700DA01C90180549F4192
+:10063000A040B04081549C49A040B04008F0C2C0E6
+:1006400060E874E88EE190E0A9D9215029BD55CF2A
+:10065000DD2009F4B7C080E0E81684E0F80680E009
+:10066000080780E0180708F4ADC08D2D90E00197D1
+:100670009C01442737FD4095542FDA01C9018E2192
+:100680009F21A023B1230097A105B10509F09AC0CD
+:100690008091B7019091B801A091B901B091BA01D0
+:1006A000282339234A235B232115310541055105B0
+:1006B00009F088C01AC0C70181709070892B29F099
+:1006C0000894E11CF11C011D111D8091B70190914E
+:1006D000B801A091B901B091BA01E80EF91E0A1F44
+:1006E0001B1FC801B7017ED208CF1092A001109243
+:1006F00077001092760080B78823A1F496E097BD2A
+:10070000A0E6ACBDB1E0B0BFCABCC3BE20E129BF0A
+:10071000DD24D394DEBCDBBC84E690E0A8DC40E8BA
+:10072000D416B9F78091B7019091B8019170B401D6
+:10073000681B790B80E090E04EE850E0C7D58091CF
+:100740008E0090918F00A0E0B0E0E81AF90A0A0B41
+:100750001B0BDD24D39408C080E09CEFAFEFBFEF0C
+:10076000E80EF91E0A1F1B1FA89591E0E91694E0F8
+:10077000F90690E0090790E0190718F060E074E0CE
+:1007800001C0B70180E090E04EE850E09FD59C01A9
+:1007900080918E0090918F008050944039F4DD0C50
+:1007A000B099DACFD394B1E0DB16B1F68091A00115
+:1007B0008823E1F77EBC7BBC232B21F43FCE232B87
+:1007C00009F42ECEA89513BE1ABC80B7882359F021
+:1007D00010E811501EBD1BBD84E690E048DC1123DB
+:1007E000C1F710BE1CBC8DE481BD85B7877E8061DA
+:1007F00085BF85B7806285BF889585B78F7D85BFAA
+:10080000A8958EE081BDDACDA0E0B0E0E9E0F4E0AB
+:10081000F1C86C01C0917400D0917500FC01118287
+:10082000108224813581468157812130310541056F
+:10083000510509F45BC08E819F81A885B985281771
+:1008400039074A075B0708F051C0211531054105FA
+:10085000510539F48881833021F42E853F854889FC
+:100860005989F60120873187428753872115310541
+:100870004105510579F18EEFE82E8FEFF82E8FEFBD
+:10088000082F8FEF182FE20EF31E041F151F8E8105
+:100890009F81A885B9850297A109B109E816F906D3
+:1008A0000A071B0728F020E030E040E050E016C0C7
+:1008B0002A8130E040E050E0C801B70156D89B01E2
+:1008C000AC018A899B89AC89BD89280F391F4A1FD1
+:1008D0005B1F04C02E853F8548895989F60124870E
+:1008E00035874687578720E030E002C021E030E0BE
+:1008F000C901CDB7DEB7E8E099C8A4E0B0E0E2E80E
+:10090000F4E072C84B015C01609074007090750057
+:1009100082E088169104A104B10408F4B0C0F30188
+:1009200086819781A085B18588169906AA06BB069F
+:1009300008F0A5C08081823009F45DC0833009F4DD
+:1009400078C0813009F09BC0C40196958795880DC9
+:10095000991D9C013170892F992786956C01EE2491
+:10096000FF24F3014285538564857585CE01019688
+:10097000F1E02F3F3F0749F0C40ED51EE61EF71EDB
+:10098000B701A60102E010E01DC04C0D5D1D6E1DFB
+:100990007F1D2FEF31E001E010E004D7892B09F033
+:1009A0006EC0F30142855385648575854F5F5F4F47
+:1009B0006F4F7F4F4C0D5D1D6E1D7F1DCE0102964A
+:1009C00020E030E0EFD6892B09F059C069817A81A7
+:1009D000C40181709070892B39F0A4E076956795F9
+:1009E000AA95E1F79B0122C09B0140E050E03F70D7
+:1009F0004070507048C077276B2D5A2D492DF30158
+:100A000082859385A485B585480F591F6A1F7B1F72
+:100A100094013070220F331FCE01019602E010E0E6
+:100A2000C1D6892B61F589819A819C0140E050E013
+:100A30002AC0B501A40127E076956795579547959B
+:100A40002A95D1F7F30182859385A485B585480F52
+:100A5000591F6A1F7B1F94012F773070220F331F9D
+:100A6000220F331FCE01019604E010E09BD6892BA4
+:100A700031F429813A814B815C815F7004C021E0AF
+:100A800030E040E050E0B901CA012496EEE0C8C76A
+:100A9000A0E0B0E0EDE4F5E0ABC75C01C09174000C
+:100AA000D0917500FC01C080D1800894C11CD11C7C
+:100AB000C114D10409F48FC0248535854685578536
+:100AC000211531054105510509F485C0C6018F7016
+:100AD0009070892B09F079C02F5F3F4F4F4F5F4FC8
+:100AE000248735874687578740855185628573857A
+:100AF000411551056105710539F48C819D81C81638
+:100B0000D90608F462C067C08A8190E00197960117
+:100B1000E4E036952795EA95E1F782239323892B24
+:100B200009F053C0CB01BA01E8DE9B01AC01623091
+:100B300071058105910518F421E030E04EC08E81E9
+:100B40009F81A885B985281739074A075B0708F0F0
+:100B500042C0F5012087318742875387C0917400D6
+:100B6000D09175000EEFE02E0FEFF02E0FEF002F5B
+:100B70000FEF102FE20EF31E041F151F8E819F81B1
+:100B8000A885B9850297A109B109E816F9060A07EF
+:100B90001B0728F020E030E040E050E011C02A813F
+:100BA00030E040E050E0C801B701DFD69B01AC0166
+:100BB0008A899B89AC89BD89280F391F4A1F5B1F11
+:100BC000F5012487358746875787F501D182C08292
+:100BD00020E030E002C023E030E0C901CDB7DEB74D
+:100BE000EAE022C7A0E0B0E0E7EFF5E0F9C6E82FC1
+:100BF000C0917400D0917500209719F426E030E080
+:100C000001C1898180FD03C025E030E0FBC0EA8C92
+:100C1000FB8C0C8D1D8D4E2F592FCB01DA013C0121
+:100C20004D01E614F7040805190510F437014801D1
+:100C3000EE88FF88088D198D1E8A1F8A188E198EDE
+:100C4000611471048104910409F4D6C08A81A82E2C
+:100C5000BB24CC24DD24B9E0AA0CBB1CCC1CDD1CBD
+:100C6000BA95D1F7E114F10401051105A1F11701BD
+:100C7000280108942108310841085108C401B30132
+:100C80006150704080409040A601950187D679015F
+:100C90008A01C201B101A601950180D6E216F306D0
+:100CA00004071507C0F088279927DC018A199B09DA
+:100CB000AC09BD0982219321A421B5218E8B9F8B84
+:100CC000A88FB98F681A790A8A0A9B0A2AA13BA1C0
+:100CD0004CA15DA132C02E8D3F8D48A159A12AA300
+:100CE0003BA34CA35DA329C0CA01B90106DE9B0149
+:100CF000AC01623071058105910508F480C08E81D8
+:100D00009F81A885B985281739074A075B0708F02E
+:100D100076C02AA33BA34CA35DA38E899F89A88D8F
+:100D2000B98D8A0D9B1DAC1DBD1D8E8B9F8BA88F11
+:100D3000B98F6A187B088C089D08A614B704C804EC
+:100D4000D90490F2EE88FF88088D198DE60CF71C07
+:100D5000081D191DEE8AFF8A088F198F8090740074
+:100D600090907500AEEFAA2EAFEFBA2EAFEFCA2E5D
+:100D7000AFEFDA2EA20EB31EC41ED51EF40186817B
+:100D80009781A085B1850297A109B109A816B90676
+:100D9000CA06DB06A0F5228130E040E050E0C60143
+:100DA000B501E3D59B01AC01F40182899389A48943
+:100DB000B589280F391F4A1F5B1F211531054105D1
+:100DC0005105E9F0F9E016950795F794E794FA953F
+:100DD000D1F78A8190E00197AA2797FDA095BA2FB5
+:100DE000E822F9220A231B232E0D3F1D401F511F0D
+:100DF0002EA33FA348A759A720E030E003C01982E3
+:100E000021E030E0C901CDB7DEB7E2E105C6ACE2D2
+:100E1000B0E0ECE0F7E0ECC57C016B018091740080
+:100E200090917500892B19F426E030E0B6C0CE0110
+:100E30000196D70113969C938E93129761157105B5
+:100E400041F023E030E08DE0A82EB12CAC0EBD1EA9
+:100E500028C0C701D9DC9C01A0C0F70120813181E5
+:100E60002F70307015E0220F331F1A95E1F7C5017E
+:100E700000E210E097D4892B19F021E030E020C087
+:100E80009D85992309F48DC0888D953E29F09E3269
+:100E900019F08F7383FF20C0C701FADD9C01009712
+:100EA00079F4D7011C964D915D916D917C911F97BE
+:100EB000411551056105710581F62115310561F076
+:100EC000F70114861586168617862330310521F022
+:100ED0002115310509F061C09601275F3F4FF701E9
+:100EE00084859585A685B7850097A105B10509F488
+:100EF00043C0FE013D96AE014B5E5F4F8081803264
+:100F000051F0853009F485EED9018D939D0131961C
+:100F1000E417F50799F78D89803299F08EE2F9018F
+:100F200081939F01FE017596AE01485E5F4F8081FF
+:100F3000803239F0D9018D939D013196E417F50780
+:100F4000B1F7888DF6018087FE013D96448D558D61
+:100F5000668D778DD6014D935D936D937C9313973A
+:100F6000808D918D15969C938E9314978689978981
+:100F700017969C938E931697F9011082C70188DD0E
+:100F80009C018330910549F4D7011C961D921D9256
+:100F90001D921C921F9720E030E0C901AC96EAE058
+:100FA00043C523E030E08CCFA0E0B0E0E9EDF7E00E
+:100FB0001AC57C015B016A0103C00894C11CD11CE5
+:100FC000D6018C918032C9F38F3219F40894C11C78
+:100FD000D11CF7011482158216821782D6018C91DA
+:100FE000813230F4C70110DCEC01F5011082C2C07F
+:100FF000A0E25A2E88248394FBE06F2E712C6A0C99
+:101000007B1CD7011296CD91DC911397FE01CE0186
+:101010000B9601C05192E817F907E1F730E09924E7
+:1010200048E002C038E04BE0F601E90DF11D2081F7
+:1010300093942132A8F12F3299F12E3211F0341706
+:1010400028F0483069F52E3269F32AC0822F815882
+:101050008F3118F08F558D31C0F4A32FB0E0842F5D
+:1010600090E00197A817B90784F4F601E90DF11D86
+:1010700090819394AC0FBD1F2C93832F8F5FFE0143
+:10108000E80FF11D90833E5FCFCF822F81568A31CA
+:1010900008F42052FE01E30FF11D20833F5FC4CF0F
+:1010A0001B86213208F48B86C701AEDBEC0100976A
+:1010B000A1F5F701448555856685778520813181C5
+:1010C0002F703070E5E0220F331FEA95E1F7C5017C
+:1010D00000E210E067D3892B19F081E090E01CC09A
+:1010E000D5018C91882309F44AC0F301808183FDE6
+:1010F0000FC0F701A281B381F501E615F70509F4E8
+:1011000041C090818C91981719F431961196F5CFC2
+:10111000C701BEDC009769F2EC01C330D10551F57F
+:10112000D7011296ED91FC9113978385882301F1E5
+:1011300021C0F301808184FF1BC0C90CD11CD501E3
+:1011400054968D919C915597A0E0B0E0DC019927D1
+:101150008827F501228D338D40E050E0822B932BC0
+:10116000A42BB52BF70184839583A683B78349CF3E
+:10117000C4E0D0E0CE01CDB7DEB7EFE050C4C3E0AD
+:10118000D0E0CBCFD7011296ED91FC9113978385D8
+:10119000882379F2EFCFACE2B0E0E0EDF8E02CC4C8
+:1011A0008C01AB018091740090917500892B19F42A
+:1011B00026E030E033C0CE010196F80193838283AC
+:1011C0003DE0E32EF12CEC0EFD1EC801B701ECDE74
+:1011D0009C010097F1F48D858823C1F0888D84FFF0
+:1011E0001BC0F70184899589A0E0B0E0DC01992754
+:1011F0008827228D338D40E050E0822B932BA42B47
+:10120000B52BF80184839583A683B783C801FCDAE4
+:101210009C012330310511F424E030E0C901AC9683
+:10122000E6E006C4ACE3B0E0E7E1F9E0E5C3AC0119
+:1012300000917400109175000115110519F466E014
+:1012400070E040C0F8011182CE010196988B8F8723
+:101250006DE1E62EF12CEC0EFD1ECE010D96B701D0
+:10126000A3DEBC01009771F58D8D882349F188A517
+:1012700084FD26C0F70184899589A0E0B0E0DC01F7
+:1012800099278827228D338D40E050E0822B932BC5
+:10129000A42BB52BF801868F978FA0A3B1A3F701DC
+:1012A000848D958DA68DB78DF801828F938FA48F35
+:1012B000B58F168A178A108E118E81E0818302C045
+:1012C00063E070E0CB01EC96E6E0B2C3A0E0B0E0F2
+:1012D000EBE6F9E087C33C016B014A01C091740061
+:1012E000D0917500FA0111821082209719F426E03E
+:1012F00030E0CAC0898180FD03C025E030E0C4C071
+:101300002A8D3B8D4C8D5D8D8E899F89A88DB98DE1
+:10131000281B390B4A0B5B0BCB01A0E0B0E0281770
+:1013200039074A075B0708F469015301412CE2E0E1
+:101330005E2EA0C02E893F89488D598DDA01C901E2
+:101340009170A070B0700097A105B10509F05EC062
+:10135000DA01C90179E0B695A795979587957A95B1
+:10136000D1F7FA80FA94F822C9F421153105410524
+:10137000510529F46E8D7F8D88A199A105C06AA1C0
+:101380007BA18CA19DA1B9DA62307105810591051F
+:1013900008F477C06AA37BA38CA39DA3009174007B
+:1013A000109175002AA13BA14CA15DA122503040B3
+:1013B00040405040F80186819781A085B185029711
+:1013C000A109B109281739074A075B0708F059C076
+:1013D000628170E080E090E0C8D29B01AC01F8012E
+:1013E00082899389A489B589280F391F4A1F5B1FF9
+:1013F000211531054105510509F443C02F0D311D5B
+:10140000411D511D2EA33FA348A759A72E893F89EF
+:101410003170C201821B930B76018C159D0508F477
+:101420007C016114710419F480E090E001C0C501F1
+:101430004EA15FA168A579A58701B4D1892B09F5D3
+:10144000C701A0E0B0E02E893F89488D598D280F53
+:10145000391F4A1F5B1F2E8B3F8B488F598FAE0C55
+:10146000BF1CCE18DF08F401808191818E0D9F1D75
+:1014700091838083C114D10409F05CCF20E030E077
+:1014800003C0198221E030E0C901CDB7DEB7E0E149
+:10149000C5C2A0E0B0E0EEE4FAE0AAC2B82EA92EE0
+:1014A0006A017B012EEF31E002E010E07BD1892B55
+:1014B00011F023E031C0CB2DDA2D8881998185553B
+:1014C0009A4A11F022E028C08B2D9A2DB701A6016F
+:1014D00026E330E002E010E065D1892B39F4888101
+:1014E00099818654914411F420E016C08B2D9A2DD9
+:1014F000B701A60122E530E002E010E053D1892BCC
+:1015000011F021E009C020E088819981865491443E
+:1015100009F421E081E02827822FCDB7DEB7EAE089
+:1015200083C2A4E2B0E0E6E9FAE05EC25C01109298
+:10153000750010927400009709F4E6C063D180FF33
+:1015400003C022E030E0E8C04E010894811C911CE9
+:10155000C40140E050E060E070E09BDF813021F0AA
+:10156000CC24DD24760119C0C40140E050E060E0E5
+:1015700070E02EEB31E000E110E014D1892B09F08E
+:10158000C6C08D81882309F4C5C0C984DA84EB8480
+:10159000FC84C401B701A6017CDF833009F4B7C025
+:1015A000882309F0B7C0CE010196B701A6012DE04E
+:1015B00030E004E210E0F6D0892B09F0A8C08A855B
+:1015C0009B85BC0180E090E0611571058105910566
+:1015D00021F4688D798D8A8D9B8D2C8130E040E0DF
+:1015E00050E0C3D13B014C018A819B81A0E0B0E077
+:1015F000C80ED91EEA1EFB1EF501C286D386E486FC
+:10160000F586898182832D813E81358324838F8174
+:1016100098857C0100E010E0E114F104010511055A
+:1016200021F4EC88FD880E891F898A819B81A0E0C6
+:10163000B0E0E81AF90A0A0B1B0BE618F7080809CC
+:101640001909B4E036952795BA95E1F7C901A0E0EC
+:10165000B0E0E81AF90A0A0B1B0BF501228130E011
+:1016600040E050E0C801B70199D12E5F3F4F4F4F86
+:101670005F4FF5012683378340875187273FFFE07F
+:101680003F07F0E04F07F0E05F0710F481E001C092
+:1016900082E0275F3F4F4040504008F083E0F50173
+:1016A0008083833029F488A199A1AAA1BBA109C094
+:1016B000F50182859385A485B585860D971DA81DA6
+:1016C000B91D86879787A08BB18BF50184819581A1
+:1016D000A4E096958795AA95E1F7A0E0B0E0228571
+:1016E000338544855585820F931FA41FB51F860D32
+:1016F000971DA81DB91D828B938BA48BB58B11826E
+:10170000B0927500A092740020E030E005C021E0A6
+:1017100030E002C027E030E0C901A496EEE080C1CD
+:10172000DF92EF92FF920F931F93D82E7A018B01D5
+:1017300087FF0AC087E740E050E060E070E0F0DF3C
+:10174000823050F58FE7D822A0D4A1D49CD49FD466
+:101750008D2DB1D4812F9927AA27BB27ACD4C801DE
+:10176000AA27BB27A8D4BB27A12F902F8F2DA3D4A6
+:101770008E2DA1D480E4D81611F485E906C088E442
+:10178000D81611F487E801C081E095D41AE07FD41F
+:1017900087FF02C01150D9F71F910F91FF90EF9072
+:1017A000DF900895A0E0B0E0E7EDFBE023C16C011D
+:1017B00079018091CB0183FD07C039E0440F551FAB
+:1017C000661F771F3A95D1F781E5AADF882389F450
+:1017D000C0E3D5E75CD48F3F19F42197D9F709C04E
+:1017E0008E3F39F4C601B701A80172D400E010E0C1
+:1017F00002C001E010E049D44AD4C801CDB7DEB739
+:10180000E8E014C1A4E0B0E0E7E0FCE0F3C036D4C7
+:101810000AE010E03CD401501040E1F734D408E570
+:1018200012E035D401501040E1F780E440E050E090
+:1018300060E070E075DF813009F05EC088E44AEA5C
+:1018400051E060E070E06CDF8130B1F56E0108942A
+:10185000C11CD11C76018E010B5F1F4F18D4F701FC
+:1018600081937F01E017F107C9F78B81813009F07F
+:1018700043C08C818A3A09F03FC008EA11E603C0F0
+:1018800001501040C9F189EE40E050E060E070E4A2
+:1018900047DF8823A9F73CC0FAD3F60181936F0193
+:1018A000EE15FF05C9F7898186FD03C0E4E0FE2E31
+:1018B00024C07CE0F72E21C089EE40E050E060E0DB
+:1018C00070E02EDF823028F0FF24F39461E4E62EEE
+:1018D00004C052E0F52E49EEE42E08EA11E603C0FA
+:1018E0000150104049F08E2D40E050E060E070E083
+:1018F00017DF8823A9F716C0FF24F092CB01C5D3C8
+:10190000C6D380E0FF2009F481E02496E8E08EC091
+:101910008AE740E050E060E070E002DF882309F4ED
+:10192000BBCFEACF80E540E052E060E070E0F8DE57
+:10193000882311F7E2CFFB0151915523A9F0BF0194
+:10194000DC014D9145174111E1F759F4CD010190AA
+:10195000002049F04D9140154111C9F3FB0141119F
+:10196000EFCF81E090E001970895FF27EE27BB2796
+:10197000AA2760FF04C0A20FB31FE41FF51F220FA8
+:10198000331F441F551F969587957795679589F75F
+:101990000097760771F7CF01BD010895A1E21A2ED5
+:1019A000AA1BBB1BFD010DC0AA1FBB1FEE1FFF1F03
+:1019B000A217B307E407F50720F0A21BB30BE40B53
+:1019C000F50B661F771F881F991F1A9469F760959A
+:1019D0007095809590959B01AC01BD01CF01089554
+:1019E0002F923F924F925F926F927F928F929F922F
+:1019F000AF92BF92CF92DF92EF92FF920F931F931D
+:101A0000CF93DF93CDB7DEB7CA1BDB0B0FB6F894CD
+:101A1000DEBF0FBECDBF09942A88398848885F840D
+:101A20006E847D848C849B84AA84B984C884DF807E
+:101A3000EE80FD800C811B81AA81B981CE0FD11D62
+:101A40000FB6F894DEBF0FBECDBFED010895F89438
+:021A5000FFCFC6
+:101A52006F736363616C0077617600002E574156A5
+:021A6200000082
+
diff --git a/code/LICENSE b/code/LICENSE
new file mode 100755
index 0000000..9b455b1
--- /dev/null
+++ b/code/LICENSE
@@ -0,0 +1,29 @@
+Copyright (c) 2013, Markus Konrad
+(http://www.mkonrad.net)
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+* Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+* Neither the name of the author nor the names
+ of its contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/code/blink/Makefile b/code/blink/Makefile
new file mode 100755
index 0000000..dfba433
--- /dev/null
+++ b/code/blink/Makefile
@@ -0,0 +1,59 @@
+#
+# Makefile template for ATtiny85
+# Derived from AVR Crosspack template
+#
+
+DEVICE = attiny85 # See avr-help for all possible devices
+CLOCK = 8000000 # 1Mhz
+PROGRAMMER = -c avrisp -P /dev/cu.usbmodem1421 # For using Adafruit USBtiny
+OBJECTS = main.o # Add more objects for each .c file here
+FUSES = -U lfuse:w:0x62:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m # settings as taken from http://www.engbedded.com/fusecalc/
+
+#put avrdude.conf from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf in the folder of the code you want to compile!
+AVRDUDE = /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C avrdude.conf $(PROGRAMMER) -p $(DEVICE)
+COMPILE = /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-gcc -Wall -Os -DF_CPU=$(CLOCK) -mmcu=$(DEVICE)
+
+# symbolic targets:
+all: main.hex
+
+.c.o:
+ $(COMPILE) -c $< -o $@
+
+.S.o:
+ $(COMPILE) -x assembler-with-cpp -c $< -o $@
+
+.c.s:
+ $(COMPILE) -S $< -o $@
+
+flash: all
+ $(AVRDUDE) -U flash:w:main.hex:i
+
+fuse:
+ $(AVRDUDE) $(FUSES)
+
+install: flash fuse
+
+# if you use a bootloader, change the command below appropriately:
+load: all
+ bootloadHID main.hex
+
+clean:
+ rm -f main.hex main.elf $(OBJECTS)
+
+# file targets:
+main.elf: $(OBJECTS)
+ $(COMPILE) -o main.elf $(OBJECTS)
+
+main.hex: main.elf
+ rm -f main.hex
+ /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-objcopy -j .text -j .data -O ihex main.elf main.hex
+ /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-size --format=avr --mcu=$(DEVICE) main.elf
+# If you have an EEPROM section, you must also create a hex file for the
+# EEPROM and add it to the "flash" target.
+
+# Targets for code debugging and analysis:
+disasm: main.elf
+ avr-objdump -d main.elf
+
+cpp:
+ $(COMPILE) -E main.c
diff --git a/code/blink/_schemes/leds.fzz b/code/blink/_schemes/leds.fzz
new file mode 100755
index 0000000..df5c042
Binary files /dev/null and b/code/blink/_schemes/leds.fzz differ
diff --git a/code/blink/avrdude.conf b/code/blink/avrdude.conf
new file mode 100644
index 0000000..e223a8c
--- /dev/null
+++ b/code/blink/avrdude.conf
@@ -0,0 +1,14792 @@
+# $Id: avrdude.conf.in 1371 2016-02-15 20:15:07Z joerg_wunsch $ -*- text -*-
+#
+# AVRDUDE Configuration File
+#
+# This file contains configuration data used by AVRDUDE which describes
+# the programming hardware pinouts and also provides part definitions.
+# AVRDUDE's "-C" command line option specifies the location of the
+# configuration file. The "-c" option names the programmer configuration
+# which must match one of the entry's "id" parameter. The "-p" option
+# identifies which part AVRDUDE is going to be programming and must match
+# one of the parts' "id" parameter.
+#
+# DO NOT MODIFY THIS FILE. Modifications will be overwritten the next
+# time a "make install" is run. For user-specific additions, use the
+# "-C +filename" commandline option.
+#
+# Possible entry formats are:
+#
+# programmer
+# parent # optional parent
+# id = [, [, ] ...] ; # are quoted strings
+# desc = ; # quoted string
+# type = ; # programmer type, quoted string
+# # supported programmer types can be listed by "-c ?type"
+# connection_type = parallel | serial | usb
+# baudrate = ; # baudrate for avr910-programmer
+# vcc = [, ... ] ; # pin number(s)
+# buff = [, ... ] ; # pin number(s)
+# reset = ; # pin number
+# sck = ; # pin number
+# mosi = ; # pin number
+# miso = ; # pin number
+# errled = ; # pin number
+# rdyled = ; # pin number
+# pgmled = ; # pin number
+# vfyled = ; # pin number
+# usbvid = ; # USB VID (Vendor ID)
+# usbpid = [, ...] # USB PID (Product ID) (1)
+# usbdev = ; # USB interface or other device info
+# usbvendor = ; # USB Vendor Name
+# usbproduct = ; # USB Product Name
+# usbsn = ; # USB Serial Number
+#
+# To invert a bit, use = ~ , the spaces are important.
+# For a pin list all pins must be inverted.
+# A single pin can be specified as usual = ~ , for lists
+# specify it as follows = ~ ( [, ... ] ) .
+#
+# (1) Not all programmer types can process a list of PIDs.
+# ;
+#
+# part
+# id = ; # quoted string
+# desc = ; # quoted string
+# has_jtag = ; # part has JTAG i/f
+# has_debugwire = ; # part has debugWire i/f
+# has_pdi = ; # part has PDI i/f
+# has_tpi = ; # part has TPI i/f
+# devicecode = ; # deprecated, use stk500_devcode
+# stk500_devcode = ; # numeric
+# avr910_devcode = ; # numeric
+# signature = ; # signature bytes
+# usbpid = ; # DFU USB PID
+# chip_erase_delay = ; # micro-seconds
+# reset = dedicated | io;
+# retry_pulse = reset | sck;
+# pgm_enable = ;
+# chip_erase = ;
+# chip_erase_delay = ; # chip erase delay (us)
+# # STK500 parameters (parallel programming IO lines)
+# pagel = ; # pin name in hex, i.e., 0xD7
+# bs2 = ; # pin name in hex, i.e., 0xA0
+# serial = ; # can use serial downloading
+# parallel = ; # can use par. programming
+# # STK500v2 parameters, to be taken from Atmel's XML files
+# timeout = ;
+# stabdelay = ;
+# cmdexedelay = ;
+# synchloops = ;
+# bytedelay = ;
+# pollvalue = ;
+# pollindex = ;
+# predelay = ;
+# postdelay = ;
+# pollmethod = ;
+# mode = ;
+# delay = ;
+# blocksize = ;
+# readsize = ;
+# hvspcmdexedelay = ;
+# # STK500v2 HV programming parameters, from XML
+# pp_controlstack = , , ...; # PP only
+# hvsp_controlstack = , , ...; # HVSP only
+# hventerstabdelay = ;
+# progmodedelay = ; # PP only
+# latchcycles = ;
+# togglevtg = ;
+# poweroffdelay = ;
+# resetdelayms = ;
+# resetdelayus = ;
+# hvleavestabdelay = ;
+# resetdelay = ;
+# synchcycles = ; # HVSP only
+# chiperasepulsewidth = ; # PP only
+# chiperasepolltimeout = ;
+# chiperasetime = ; # HVSP only
+# programfusepulsewidth = ; # PP only
+# programfusepolltimeout = ;
+# programlockpulsewidth = ; # PP only
+# programlockpolltimeout = ;
+# # JTAG ICE mkII parameters, also from XML files
+# allowfullpagebitstream = ;
+# enablepageprogramming = ;
+# idr = ; # IO addr of IDR (OCD) reg.
+# rampz = ; # IO addr of RAMPZ reg.
+# spmcr = ; # mem addr of SPMC[S]R reg.
+# eecr = ; # mem addr of EECR reg.
+# # (only when != 0x3c)
+# is_at90s1200 = ; # AT90S1200 part
+# is_avr32 = ; # AVR32 part
+#
+# memory
+# paged = ; # yes / no
+# size = ; # bytes
+# page_size = ; # bytes
+# num_pages = ; # numeric
+# min_write_delay = ; # micro-seconds
+# max_write_delay = ; # micro-seconds
+# readback_p1 = ; # byte value
+# readback_p2 = ; # byte value
+# pwroff_after_write = ; # yes / no
+# read = ;
+# write = ;
+# read_lo = ;
+# read_hi = ;
+# write_lo = ;
+# write_hi = ;
+# loadpage_lo = ;
+# loadpage_hi = ;
+# writepage = ;
+# ;
+# ;
+#
+# If any of the above parameters are not specified, the default value
+# of 0 is used for numerics or the empty string ("") for string
+# values. If a required parameter is left empty, AVRDUDE will
+# complain.
+#
+# Parts can also inherit parameters from previously defined parts
+# using the following syntax. In this case specified integer and
+# string values override parameter values from the parent part. New
+# memory definitions are added to the definitions inherited from the
+# parent.
+#
+# part parent # quoted string
+# id = ; # quoted string
+#
+# ;
+#
+# NOTES:
+# * 'devicecode' is the device code used by the STK500 (see codes
+# listed below)
+# * Not all memory types will implement all instructions.
+# * AVR Fuse bits and Lock bits are implemented as a type of memory.
+# * Example memory types are:
+# "flash", "eeprom", "fuse", "lfuse" (low fuse), "hfuse" (high
+# fuse), "signature", "calibration", "lock"
+# * The memory type specified on the avrdude command line must match
+# one of the memory types defined for the specified chip.
+# * The pwroff_after_write flag causes avrdude to attempt to
+# power the device off and back on after an unsuccessful write to
+# the affected memory area if VCC programmer pins are defined. If
+# VCC pins are not defined for the programmer, a message
+# indicating that the device needs a power-cycle is printed out.
+# This flag was added to work around a problem with the
+# at90s4433/2333's; see the at90s4433 errata at:
+#
+# http://www.atmel.com/dyn/resources/prod_documents/doc1280.pdf
+#
+# INSTRUCTION FORMATS
+#
+# Instruction formats are specified as a comma seperated list of
+# string values containing information (bit specifiers) about each
+# of the 32 bits of the instruction. Bit specifiers may be one of
+# the following formats:
+#
+# '1' = the bit is always set on input as well as output
+#
+# '0' = the bit is always clear on input as well as output
+#
+# 'x' = the bit is ignored on input and output
+#
+# 'a' = the bit is an address bit, the bit-number matches this bit
+# specifier's position within the current instruction byte
+#
+# 'aN' = the bit is the Nth address bit, bit-number = N, i.e., a12
+# is address bit 12 on input, a0 is address bit 0.
+#
+# 'i' = the bit is an input data bit
+#
+# 'o' = the bit is an output data bit
+#
+# Each instruction must be composed of 32 bit specifiers. The
+# instruction specification closely follows the instruction data
+# provided in Atmel's data sheets for their parts.
+#
+# See below for some examples.
+#
+#
+# The following are STK500 part device codes to use for the
+# "devicecode" field of the part. These came from Atmel's software
+# section avr061.zip which accompanies the application note
+# AVR061 available from:
+#
+# http://www.atmel.com/dyn/resources/prod_documents/doc2525.pdf
+#
+
+#define ATTINY10 0x10 /* the _old_ one that never existed! */
+#define ATTINY11 0x11
+#define ATTINY12 0x12
+#define ATTINY15 0x13
+#define ATTINY13 0x14
+
+#define ATTINY22 0x20
+#define ATTINY26 0x21
+#define ATTINY28 0x22
+#define ATTINY2313 0x23
+
+#define AT90S1200 0x33
+
+#define AT90S2313 0x40
+#define AT90S2323 0x41
+#define AT90S2333 0x42
+#define AT90S2343 0x43
+
+#define AT90S4414 0x50
+#define AT90S4433 0x51
+#define AT90S4434 0x52
+#define ATMEGA48 0x59
+
+#define AT90S8515 0x60
+#define AT90S8535 0x61
+#define AT90C8534 0x62
+#define ATMEGA8515 0x63
+#define ATMEGA8535 0x64
+
+#define ATMEGA8 0x70
+#define ATMEGA88 0x73
+#define ATMEGA168 0x86
+
+#define ATMEGA161 0x80
+#define ATMEGA163 0x81
+#define ATMEGA16 0x82
+#define ATMEGA162 0x83
+#define ATMEGA169 0x84
+
+#define ATMEGA323 0x90
+#define ATMEGA32 0x91
+
+#define ATMEGA64 0xA0
+
+#define ATMEGA103 0xB1
+#define ATMEGA128 0xB2
+#define AT90CAN128 0xB3
+#define AT90CAN64 0xB3
+#define AT90CAN32 0xB3
+
+#define AT86RF401 0xD0
+
+#define AT89START 0xE0
+#define AT89S51 0xE0
+#define AT89S52 0xE1
+
+# The following table lists the devices in the original AVR910
+# appnote:
+# |Device |Signature | Code |
+# +-------+----------+------+
+# |tiny12 | 1E 90 05 | 0x55 |
+# |tiny15 | 1E 90 06 | 0x56 |
+# | | | |
+# | S1200 | 1E 90 01 | 0x13 |
+# | | | |
+# | S2313 | 1E 91 01 | 0x20 |
+# | S2323 | 1E 91 02 | 0x48 |
+# | S2333 | 1E 91 05 | 0x34 |
+# | S2343 | 1E 91 03 | 0x4C |
+# | | | |
+# | S4414 | 1E 92 01 | 0x28 |
+# | S4433 | 1E 92 03 | 0x30 |
+# | S4434 | 1E 92 02 | 0x6C |
+# | | | |
+# | S8515 | 1E 93 01 | 0x38 |
+# | S8535 | 1E 93 03 | 0x68 |
+# | | | |
+# |mega32 | 1E 95 01 | 0x72 |
+# |mega83 | 1E 93 05 | 0x65 |
+# |mega103| 1E 97 01 | 0x41 |
+# |mega161| 1E 94 01 | 0x60 |
+# |mega163| 1E 94 02 | 0x64 |
+
+# Appnote AVR109 also has a table of AVR910 device codes, which
+# lists:
+# dev avr910 signature
+# ATmega8 0x77 0x1E 0x93 0x07
+# ATmega8515 0x3B 0x1E 0x93 0x06
+# ATmega8535 0x6A 0x1E 0x93 0x08
+# ATmega16 0x75 0x1E 0x94 0x03
+# ATmega162 0x63 0x1E 0x94 0x04
+# ATmega163 0x66 0x1E 0x94 0x02
+# ATmega169 0x79 0x1E 0x94 0x05
+# ATmega32 0x7F 0x1E 0x95 0x02
+# ATmega323 0x73 0x1E 0x95 0x01
+# ATmega64 0x46 0x1E 0x96 0x02
+# ATmega128 0x44 0x1E 0x97 0x02
+#
+# These codes refer to "BOOT" device codes which are apparently
+# different than standard device codes, for whatever reasons
+# (often one above the standard code).
+
+# There are several extended versions of AVR910 implementations around
+# in the Internet. These add the following codes (only devices that
+# actually exist are listed):
+
+# ATmega8515 0x3A
+# ATmega128 0x43
+# ATmega64 0x45
+# ATtiny26 0x5E
+# ATmega8535 0x69
+# ATmega32 0x72
+# ATmega16 0x74
+# ATmega8 0x76
+# ATmega169 0x78
+
+#
+# Overall avrdude defaults; suitable for ~/.avrduderc
+#
+default_parallel = "unknown";
+default_serial = "unknown";
+# default_bitclock = 2.5;
+
+# Turn off safemode by default
+#default_safemode = no;
+
+
+#
+# PROGRAMMER DEFINITIONS
+#
+
+# http://wiring.org.co/
+# Basically STK500v2 protocol, with some glue to trigger the
+# bootloader.
+programmer
+ id = "wiring";
+ desc = "Wiring";
+ type = "wiring";
+ connection_type = serial;
+;
+
+programmer
+ id = "arduino";
+ desc = "Arduino";
+ type = "arduino";
+ connection_type = serial;
+;
+# this will interface with the chips on these programmers:
+#
+# http://real.kiev.ua/old/avreal/en/adapters
+# http://www.amontec.com/jtagkey.shtml, jtagkey-tiny.shtml
+# http://www.olimex.com/dev/arm-usb-ocd.html, arm-usb-tiny.html
+# http://www.ethernut.de/en/hardware/turtelizer/index.html
+# http://elk.informatik.fh-augsburg.de/hhweb/doc/openocd/usbjtag/usbjtag.html
+# http://dangerousprototypes.com/docs/FT2232_breakout_board
+# http://www.ftdichip.com/Products/Modules/DLPModules.htm,DLP-2232*,DLP-USB1232H
+# http://flashrom.org/FT2232SPI_Programmer
+#
+# The drivers will look for a specific device and use the first one found.
+# If you have mulitple devices, then look for unique information (like SN)
+# And fill that in here.
+#
+# Note that the pin numbers for the main ISP signals (reset, sck,
+# mosi, miso) are fixed and cannot be changed, since they must match
+# the way the Multi-Protocol Synchronous Serial Engine (MPSSE) of
+# these FTDI ICs has been designed.
+
+programmer
+ id = "avrftdi";
+ desc = "FT2232D based generic programmer";
+ type = "avrftdi";
+ connection_type = usb;
+ usbvid = 0x0403;
+ usbpid = 0x6010;
+ usbvendor = "";
+ usbproduct = "";
+ usbdev = "A";
+ usbsn = "";
+#ISP-signals - lower ADBUS-Nibble (default)
+ reset = 3;
+ sck = 0;
+ mosi = 1;
+ miso = 2;
+#LED SIGNALs - higher ADBUS-Nibble
+# errled = 4;
+# rdyled = 5;
+# pgmled = 6;
+# vfyled = 7;
+#Buffer Signal - ACBUS - Nibble
+# buff = 8;
+;
+# This is an implementation of the above with a buffer IC (74AC244) and
+# 4 LEDs directly attached, all active low.
+programmer
+ id = "2232HIO";
+ desc = "FT2232H based generic programmer";
+ type = "avrftdi";
+ connection_type = usb;
+ usbvid = 0x0403;
+# Note: This PID is reserved for generic H devices and
+# should be programmed into the EEPROM
+# usbpid = 0x8A48;
+ usbpid = 0x6010;
+ usbdev = "A";
+ usbvendor = "";
+ usbproduct = "";
+ usbsn = "";
+#ISP-signals
+ reset = 3;
+ sck = 0;
+ mosi = 1;
+ miso = 2;
+ buff = ~4;
+#LED SIGNALs
+ errled = ~ 11;
+ rdyled = ~ 14;
+ pgmled = ~ 13;
+ vfyled = ~ 12;
+;
+
+#The FT4232H can be treated as FT2232H, but it has a different USB
+#device ID of 0x6011.
+programmer parent "avrftdi"
+ id = "4232h";
+ desc = "FT4232H based generic programmer";
+ usbpid = 0x6011;
+;
+
+programmer
+ id = "jtagkey";
+ desc = "Amontec JTAGKey, JTAGKey-Tiny and JTAGKey2";
+ type = "avrftdi";
+ connection_type = usb;
+ usbvid = 0x0403;
+# Note: This PID is used in all JTAGKey variants
+ usbpid = 0xCFF8;
+ usbdev = "A";
+ usbvendor = "";
+ usbproduct = "";
+ usbsn = "";
+#ISP-signals => 20 - Pin connector on JTAGKey
+ reset = 3; # TMS 7 violet
+ sck = 0; # TCK 9 white
+ mosi = 1; # TDI 5 green
+ miso = 2; # TDO 13 orange
+ buff = ~4;
+# VTG VREF 1 brown with red tip
+# GND GND 20 black
+# The colors are on the 20 pin breakout cable
+# from Amontec
+;
+
+# UM232H module from FTDI and Glyn.com.au.
+# See helix.air.net.au for detailed usage information.
+# J1: Connect pin 2 and 3 for USB power.
+# J2: Connect pin 2 and 3 for USB power.
+# J2: Pin 7 is SCK
+# : Pin 8 is MOSI
+# : Pin 9 is MISO
+# : Pin 11 is RST
+# : Pin 6 is ground
+# Use the -b flag to set the SPI clock rate eg -b 3750000 is the fastest I could get
+# a 16MHz Atmega1280 to program reliably. The 232H is conveniently 5V tolerant.
+programmer
+ id = "UM232H";
+ desc = "FT232H based module from FTDI and Glyn.com.au";
+ type = "avrftdi";
+ usbvid = 0x0403;
+# Note: This PID is reserved for generic 232H devices and
+# should be programmed into the EEPROM
+ usbpid = 0x6014;
+ usbdev = "A";
+ usbvendor = "";
+ usbproduct = "";
+ usbsn = "";
+#ISP-signals
+ sck = 0;
+ mosi = 1;
+ miso = 2;
+ reset = 3;
+;
+
+# C232HM module from FTDI and Glyn.com.au.
+# : Orange is SCK
+# : Yellow is MOSI
+# : Green is MISO
+# : Brown is RST
+# : Black is ground
+# Use the -b flag to set the SPI clock rate eg -b 3750000 is the fastest I could get
+# a 16MHz Atmega1280 to program reliably. The 232H is conveniently 5V tolerant.
+programmer
+ id = "C232HM";
+ desc = "FT232H based module from FTDI and Glyn.com.au";
+ type = "avrftdi";
+ usbvid = 0x0403;
+# Note: This PID is reserved for generic 232H devices and
+# should be programmed into the EEPROM
+ usbpid = 0x6014;
+ usbdev = "A";
+ usbvendor = "";
+ usbproduct = "";
+ usbsn = "";
+#ISP-signals
+ sck = 0;
+ mosi = 1;
+ miso = 2;
+ reset = 3;
+;
+
+
+# On the adapter you can read "O-Link". On the PCB is printed "OpenJTAG v3.1"
+# You can find it as "OpenJTAG ARM JTAG USB" in the internet.
+# (But there are also several projects called Open JTAG, eg.
+# http://www.openjtag.org, which are completely different.)
+# http://www.100ask.net/shop/english.html (website seems to be outdated)
+# http://item.taobao.com/item.htm?id=1559277013
+# http://www.micro4you.com/store/openjtag-arm-jtag-usb.html (schematics!)
+# some other sources which call it O-Link
+# http://www.andahammer.com/olink/
+# http://www.developmentboard.net/31-o-link-debugger.html
+# http://armwerks.com/catalog/o-link-debugger-copy/
+# or just have a look at ebay ...
+# It is basically the same entry as jtagkey with different usb ids.
+programmer parent "jtagkey"
+ id = "o-link";
+ desc = "O-Link, OpenJTAG from www.100ask.net";
+ usbvid = 0x1457;
+ usbpid = 0x5118;
+ usbvendor = "www.100ask.net";
+ usbproduct = "USB<=>JTAG&RS232";
+;
+
+# http://wiki.openmoko.org/wiki/Debug_Board_v3
+programmer
+ id = "openmoko";
+ desc = "Openmoko debug board (v3)";
+ type = "avrftdi";
+ usbvid = 0x1457;
+ usbpid = 0x5118;
+ usbdev = "A";
+ usbvendor = "";
+ usbproduct = "";
+ usbsn = "";
+ reset = 3; # TMS 7
+ sck = 0; # TCK 9
+ mosi = 1; # TDI 5
+ miso = 2; # TDO 13
+;
+
+# Only Rev. A boards.
+# Schematic and user manual: http://www.cs.put.poznan.pl/wswitala/download/pdf/811EVBK.pdf
+programmer
+ id = "lm3s811";
+ desc = "Luminary Micro LM3S811 Eval Board (Rev. A)";
+ type = "avrftdi";
+ connection_type = usb;
+ usbvid = 0x0403;
+ usbpid = 0xbcd9;
+ usbvendor = "LMI";
+ usbproduct = "LM3S811 Evaluation Board";
+ usbdev = "A";
+ usbsn = "";
+#ISP-signals - lower ACBUS-Nibble (default)
+ reset = 3;
+ sck = 0;
+ mosi = 1;
+ miso = 2;
+# Enable correct buffers
+ buff = 7;
+;
+
+# submitted as bug #46020
+programmer
+ id = "tumpa";
+ desc = "TIAO USB Multi-Protocol Adapter";
+ type = "avrftdi";
+ connection_type = usb;
+ usbvid = 0x0403;
+ usbpid = 0x8A98;
+ usbdev = "A";
+ usbvendor = "TIAO";
+ usbproduct = "";
+ usbsn = "";
+ sck = 0; # TCK 9
+ mosi = 1; # TDI 5
+ miso = 2; # TDO 13
+ reset = 3; # TMS 7
+;
+
+programmer
+ id = "avrisp";
+ desc = "Atmel AVR ISP";
+ type = "stk500";
+ connection_type = serial;
+;
+
+programmer
+ id = "avrispv2";
+ desc = "Atmel AVR ISP V2";
+ type = "stk500v2";
+ connection_type = serial;
+;
+
+programmer
+ id = "avrispmkII";
+ desc = "Atmel AVR ISP mkII";
+ type = "stk500v2";
+ connection_type = usb;
+;
+
+programmer parent "avrispmkII"
+ id = "avrisp2";
+;
+
+programmer
+ id = "buspirate";
+ desc = "The Bus Pirate";
+ type = "buspirate";
+ connection_type = serial;
+;
+
+programmer
+ id = "buspirate_bb";
+ desc = "The Bus Pirate (bitbang interface, supports TPI)";
+ type = "buspirate_bb";
+ connection_type = serial;
+ # pins are bits in bitbang byte (numbers are 87654321)
+ # 1|POWER|PULLUP|AUX|MOSI|CLK|MISO|CS
+ reset = 1;
+ sck = 3;
+ mosi = 4;
+ miso = 2;
+ #vcc = 7; This is internally set independent of this setting.
+;
+
+# This is supposed to be the "default" STK500 entry.
+# Attempts to select the correct firmware version
+# by probing for it. Better use one of the entries
+# below instead.
+programmer
+ id = "stk500";
+ desc = "Atmel STK500";
+ type = "stk500generic";
+ connection_type = serial;
+;
+
+programmer
+ id = "stk500v1";
+ desc = "Atmel STK500 Version 1.x firmware";
+ type = "stk500";
+ connection_type = serial;
+;
+
+programmer
+ id = "mib510";
+ desc = "Crossbow MIB510 programming board";
+ type = "stk500";
+ connection_type = serial;
+;
+
+programmer
+ id = "stk500v2";
+ desc = "Atmel STK500 Version 2.x firmware";
+ type = "stk500v2";
+ connection_type = serial;
+;
+
+programmer
+ id = "stk500pp";
+ desc = "Atmel STK500 V2 in parallel programming mode";
+ type = "stk500pp";
+ connection_type = serial;
+;
+
+programmer
+ id = "stk500hvsp";
+ desc = "Atmel STK500 V2 in high-voltage serial programming mode";
+ type = "stk500hvsp";
+ connection_type = serial;
+;
+
+programmer
+ id = "stk600";
+ desc = "Atmel STK600";
+ type = "stk600";
+ connection_type = usb;
+;
+
+programmer
+ id = "stk600pp";
+ desc = "Atmel STK600 in parallel programming mode";
+ type = "stk600pp";
+ connection_type = usb;
+;
+
+programmer
+ id = "stk600hvsp";
+ desc = "Atmel STK600 in high-voltage serial programming mode";
+ type = "stk600hvsp";
+ connection_type = usb;
+;
+
+programmer
+ id = "avr910";
+ desc = "Atmel Low Cost Serial Programmer";
+ type = "avr910";
+ connection_type = serial;
+;
+
+programmer
+ id = "ft245r";
+ desc = "FT245R Synchronous BitBang";
+ type = "ftdi_syncbb";
+ connection_type = usb;
+ miso = 1; # D1
+ sck = 0; # D0
+ mosi = 2; # D2
+ reset = 4; # D4
+;
+
+programmer
+ id = "ft232r";
+ desc = "FT232R Synchronous BitBang";
+ type = "ftdi_syncbb";
+ connection_type = usb;
+ miso = 1; # RxD
+ sck = 0; # TxD
+ mosi = 2; # RTS
+ reset = 4; # DTR
+;
+
+# see http://www.bitwizard.nl/wiki/index.php/FTDI_ATmega
+programmer
+ id = "bwmega";
+ desc = "BitWizard ftdi_atmega builtin programmer";
+ type = "ftdi_syncbb";
+ connection_type = usb;
+ miso = 5; # DSR
+ sck = 6; # DCD
+ mosi = 3; # CTS
+ reset = 7; # RI
+;
+
+# see http://www.geocities.jp/arduino_diecimila/bootloader/index_en.html
+# Note: pins are numbered from 1!
+programmer
+ id = "arduino-ft232r";
+ desc = "Arduino: FT232R connected to ISP";
+ type = "ftdi_syncbb";
+ connection_type = usb;
+ miso = 3; # CTS X3(1)
+ sck = 5; # DSR X3(2)
+ mosi = 6; # DCD X3(3)
+ reset = 7; # RI X3(4)
+;
+
+# website mentioned above uses this id
+programmer parent "arduino-ft232r"
+ id = "diecimila";
+ desc = "alias for arduino-ft232r";
+;
+
+# There is a ATmega328P kit PCB called "uncompatino".
+# This board allows ISP via its on-board FT232R.
+# This is designed like Arduino Duemilanove but has no standard ICPS header.
+# Its 4 pairs of pins are shorted to enable ftdi_syncbb.
+# http://akizukidenshi.com/catalog/g/gP-07487/
+# http://akizukidenshi.com/download/ds/akizuki/k6096_manual_20130816.pdf
+programmer
+ id = "uncompatino";
+ desc = "uncompatino with all pairs of pins shorted";
+ type = "ftdi_syncbb";
+ connection_type = usb;
+ miso = 3; # cts
+ sck = 5; # dsr
+ mosi = 6; # dcd
+ reset = 7; # ri
+;
+
+# FTDI USB to serial cable TTL-232R-5V with a custom adapter for ICSP
+# http://www.ftdichip.com/Products/Cables/USBTTLSerial.htm
+# http://www.ftdichip.com/Support/Documents/DataSheets/Cables/DS_TTL-232R_CABLES.pdf
+# For ICSP pinout see for example http://www.atmel.com/images/doc2562.pdf
+# (Figure 1. ISP6PIN header pinout and Table 1. Connections required for ISP ...)
+# TTL-232R GND 1 Black -> ICPS GND (pin 6)
+# TTL-232R CTS 2 Brown -> ICPS MOSI (pin 4)
+# TTL-232R VCC 3 Red -> ICPS VCC (pin 2)
+# TTL-232R TXD 4 Orange -> ICPS RESET (pin 5)
+# TTL-232R RXD 5 Yellow -> ICPS SCK (pin 3)
+# TTL-232R RTS 6 Green -> ICPS MISO (pin 1)
+# Except for VCC and GND, you can connect arbitual pairs as long as
+# the following table is adjusted.
+programmer
+ id = "ttl232r";
+ desc = "FTDI TTL232R-5V with ICSP adapter";
+ type = "ftdi_syncbb";
+ connection_type = usb;
+ miso = 2; # rts
+ sck = 1; # rxd
+ mosi = 3; # cts
+ reset = 0; # txd
+;
+
+programmer
+ id = "usbasp";
+ desc = "USBasp, http://www.fischl.de/usbasp/";
+ type = "usbasp";
+ connection_type = usb;
+ usbvid = 0x16C0; # VOTI
+ usbpid = 0x05DC; # Obdev's free shared PID
+ usbvendor = "www.fischl.de";
+ usbproduct = "USBasp";
+
+ # following variants are autodetected for id "usbasp"
+
+ # original usbasp from fischl.de
+ # see above "usbasp"
+
+ # old usbasp from fischl.de
+ #usbvid = 0x03EB; # ATMEL
+ #usbpid = 0xC7B4; # (unoffical) USBasp
+ #usbvendor = "www.fischl.de";
+ #usbproduct = "USBasp";
+
+ # NIBObee (only if -P nibobee is given on command line)
+ # see below "nibobee"
+;
+
+programmer
+ id = "nibobee";
+ desc = "NIBObee";
+ type = "usbasp";
+ connection_type = usb;
+ usbvid = 0x16C0; # VOTI
+ usbpid = 0x092F; # NIBObee PID
+ usbvendor = "www.nicai-systems.com";
+ usbproduct = "NIBObee";
+;
+
+programmer
+ id = "usbasp-clone";
+ desc = "Any usbasp clone with correct VID/PID";
+ type = "usbasp";
+ connection_type = usb;
+ usbvid = 0x16C0; # VOTI
+ usbpid = 0x05DC; # Obdev's free shared PID
+ #usbvendor = "";
+ #usbproduct = "";
+;
+
+programmer
+ id = "usbtiny";
+ desc = "USBtiny simple USB programmer, http://www.ladyada.net/make/usbtinyisp/";
+ type = "usbtiny";
+ connection_type = usb;
+ usbvid = 0x1781;
+ usbpid = 0x0c9f;
+;
+
+programmer
+ id = "arduinoisp";
+ desc = "Arduino ISP Programmer";
+ type = "usbtiny";
+ connection_type = usb;
+ usbvid = 0x2341;
+ usbpid = 0x0049;
+;
+
+programmer
+ id = "arduinoisporg";
+ desc = "Arduino ISP Programmer";
+ type = "usbtiny";
+ connection_type = usb;
+ usbvid = 0x2A03;
+ usbpid = 0x0049;
+;
+
+programmer
+ id = "butterfly";
+ desc = "Atmel Butterfly Development Board";
+ type = "butterfly";
+ connection_type = serial;
+;
+
+programmer
+ id = "avr109";
+ desc = "Atmel AppNote AVR109 Boot Loader";
+ type = "butterfly";
+ connection_type = serial;
+;
+
+programmer
+ id = "avr911";
+ desc = "Atmel AppNote AVR911 AVROSP";
+ type = "butterfly";
+ connection_type = serial;
+;
+
+# suggested in http://forum.mikrokopter.de/topic-post48317.html
+programmer
+ id = "mkbutterfly";
+ desc = "Mikrokopter.de Butterfly";
+ type = "butterfly_mk";
+ connection_type = serial;
+;
+
+programmer parent "mkbutterfly"
+ id = "butterfly_mk";
+;
+
+programmer
+ id = "jtagmkI";
+ desc = "Atmel JTAG ICE (mkI)";
+ baudrate = 115200; # default is 115200
+ type = "jtagmki";
+ connection_type = serial;
+;
+
+# easier to type
+programmer parent "jtagmkI"
+ id = "jtag1";
+;
+
+# easier to type
+programmer parent "jtag1"
+ id = "jtag1slow";
+ baudrate = 19200;
+;
+
+# The JTAG ICE mkII has both, serial and USB connectivity. As it is
+# mostly used through USB these days (AVR Studio 5 only supporting it
+# that way), we make connection_type = usb the default. Users are
+# still free to use a serial port with the -P option.
+
+programmer
+ id = "jtagmkII";
+ desc = "Atmel JTAG ICE mkII";
+ baudrate = 19200; # default is 19200
+ type = "jtagmkii";
+ connection_type = usb;
+;
+
+# easier to type
+programmer parent "jtagmkII"
+ id = "jtag2slow";
+;
+
+# JTAG ICE mkII @ 115200 Bd
+programmer parent "jtag2slow"
+ id = "jtag2fast";
+ baudrate = 115200;
+;
+
+# make the fast one the default, people will love that
+programmer parent "jtag2fast"
+ id = "jtag2";
+;
+
+# JTAG ICE mkII in ISP mode
+programmer
+ id = "jtag2isp";
+ desc = "Atmel JTAG ICE mkII in ISP mode";
+ baudrate = 115200;
+ type = "jtagmkii_isp";
+ connection_type = usb;
+;
+
+# JTAG ICE mkII in debugWire mode
+programmer
+ id = "jtag2dw";
+ desc = "Atmel JTAG ICE mkII in debugWire mode";
+ baudrate = 115200;
+ type = "jtagmkii_dw";
+ connection_type = usb;
+;
+
+# JTAG ICE mkII in AVR32 mode
+programmer
+ id = "jtagmkII_avr32";
+ desc = "Atmel JTAG ICE mkII im AVR32 mode";
+ baudrate = 115200;
+ type = "jtagmkii_avr32";
+ connection_type = usb;
+;
+
+# JTAG ICE mkII in AVR32 mode
+programmer
+ id = "jtag2avr32";
+ desc = "Atmel JTAG ICE mkII im AVR32 mode";
+ baudrate = 115200;
+ type = "jtagmkii_avr32";
+ connection_type = usb;
+;
+
+# JTAG ICE mkII in PDI mode
+programmer
+ id = "jtag2pdi";
+ desc = "Atmel JTAG ICE mkII PDI mode";
+ baudrate = 115200;
+ type = "jtagmkii_pdi";
+ connection_type = usb;
+;
+
+# AVR Dragon in JTAG mode
+programmer
+ id = "dragon_jtag";
+ desc = "Atmel AVR Dragon in JTAG mode";
+ baudrate = 115200;
+ type = "dragon_jtag";
+ connection_type = usb;
+;
+
+# AVR Dragon in ISP mode
+programmer
+ id = "dragon_isp";
+ desc = "Atmel AVR Dragon in ISP mode";
+ baudrate = 115200;
+ type = "dragon_isp";
+ connection_type = usb;
+;
+
+# AVR Dragon in PP mode
+programmer
+ id = "dragon_pp";
+ desc = "Atmel AVR Dragon in PP mode";
+ baudrate = 115200;
+ type = "dragon_pp";
+ connection_type = usb;
+;
+
+# AVR Dragon in HVSP mode
+programmer
+ id = "dragon_hvsp";
+ desc = "Atmel AVR Dragon in HVSP mode";
+ baudrate = 115200;
+ type = "dragon_hvsp";
+ connection_type = usb;
+;
+
+# AVR Dragon in debugWire mode
+programmer
+ id = "dragon_dw";
+ desc = "Atmel AVR Dragon in debugWire mode";
+ baudrate = 115200;
+ type = "dragon_dw";
+ connection_type = usb;
+;
+
+# AVR Dragon in PDI mode
+programmer
+ id = "dragon_pdi";
+ desc = "Atmel AVR Dragon in PDI mode";
+ baudrate = 115200;
+ type = "dragon_pdi";
+ connection_type = usb;
+;
+
+programmer
+ id = "jtag3";
+ desc = "Atmel AVR JTAGICE3 in JTAG mode";
+ type = "jtagice3";
+ connection_type = usb;
+ usbpid = 0x2110, 0x2140;
+;
+
+programmer
+ id = "jtag3pdi";
+ desc = "Atmel AVR JTAGICE3 in PDI mode";
+ type = "jtagice3_pdi";
+ connection_type = usb;
+ usbpid = 0x2110, 0x2140;
+;
+
+programmer
+ id = "jtag3dw";
+ desc = "Atmel AVR JTAGICE3 in debugWIRE mode";
+ type = "jtagice3_dw";
+ connection_type = usb;
+ usbpid = 0x2110, 0x2140;
+;
+
+programmer
+ id = "jtag3isp";
+ desc = "Atmel AVR JTAGICE3 in ISP mode";
+ type = "jtagice3_isp";
+ connection_type = usb;
+ usbpid = 0x2110, 0x2140;
+;
+
+programmer
+ id = "xplainedpro";
+ desc = "Atmel AVR XplainedPro in JTAG mode";
+ type = "jtagice3";
+ connection_type = usb;
+ usbpid = 0x2111;
+;
+
+programmer
+ id = "xplainedmini";
+ desc = "Atmel AVR XplainedMini in ISP mode";
+ type = "jtagice3_isp";
+ connection_type = usb;
+ usbpid = 0x2145;
+;
+
+programmer
+ id = "xplainedmini_dw";
+ desc = "Atmel AVR XplainedMini in debugWIRE mode";
+ type = "jtagice3_dw";
+ connection_type = usb;
+ usbpid = 0x2145;
+;
+
+programmer
+ id = "atmelice";
+ desc = "Atmel-ICE (ARM/AVR) in JTAG mode";
+ type = "jtagice3";
+ connection_type = usb;
+ usbpid = 0x2141;
+;
+
+programmer
+ id = "atmelice_pdi";
+ desc = "Atmel-ICE (ARM/AVR) in PDI mode";
+ type = "jtagice3_pdi";
+ connection_type = usb;
+ usbpid = 0x2141;
+;
+
+programmer
+ id = "atmelice_dw";
+ desc = "Atmel-ICE (ARM/AVR) in debugWIRE mode";
+ type = "jtagice3_dw";
+ connection_type = usb;
+ usbpid = 0x2141;
+;
+
+programmer
+ id = "atmelice_isp";
+ desc = "Atmel-ICE (ARM/AVR) in ISP mode";
+ type = "jtagice3_isp";
+ connection_type = usb;
+ usbpid = 0x2141;
+;
+
+
+programmer
+ id = "pavr";
+ desc = "Jason Kyle's pAVR Serial Programmer";
+ type = "avr910";
+ connection_type = serial;
+;
+
+programmer
+ id = "pickit2";
+ desc = "MicroChip's PICkit2 Programmer";
+ type = "pickit2";
+ connection_type = usb;
+;
+
+programmer
+ id = "flip1";
+ desc = "FLIP USB DFU protocol version 1 (doc7618)";
+ type = "flip1";
+ connection_type = usb;
+;
+
+programmer
+ id = "flip2";
+ desc = "FLIP USB DFU protocol version 2 (AVR4023)";
+ type = "flip2";
+ connection_type = usb;
+;
+
+
+#This programmer bitbangs GPIO lines using the Linux sysfs GPIO interface
+#
+#To enable it set the configuration below to match the GPIO lines connected to the
+#relevant ISP header pins and uncomment the entry definition. In case you don't
+#have the required permissions to edit this system wide config file put the
+#entry in a separate .conf file and use it with -C+.conf
+#on the command line.
+#
+#To check if your avrdude build has support for the linuxgpio programmer compiled in,
+#use -c?type on the command line and look for linuxgpio in the list. If it's not available
+#you need pass the --enable-linuxgpio=yes option to configure and recompile avrdude.
+#
+#programmer
+# id = "linuxgpio";
+# desc = "Use the Linux sysfs interface to bitbang GPIO lines";
+# type = "linuxgpio";
+# reset = ?;
+# sck = ?;
+# mosi = ?;
+# miso = ?;
+#;
+
+# some ultra cheap programmers use bitbanging on the
+# serialport.
+#
+# PC - DB9 - Pins for RS232:
+#
+# GND 5 -- |O
+# | O| <- 9 RI
+# DTR 4 <- |O |
+# | O| <- 8 CTS
+# TXD 3 <- |O |
+# | O| -> 7 RTS
+# RXD 2 -> |O |
+# | O| <- 6 DSR
+# DCD 1 -> |O
+#
+# Using RXD is currently not supported.
+# Using RI is not supported under Win32 but is supported under Posix.
+
+# serial ponyprog design (dasa2 in uisp)
+# reset=!txd sck=rts mosi=dtr miso=cts
+
+programmer
+ id = "ponyser";
+ desc = "design ponyprog serial, reset=!txd sck=rts mosi=dtr miso=cts";
+ type = "serbb";
+ connection_type = serial;
+ reset = ~3;
+ sck = 7;
+ mosi = 4;
+ miso = 8;
+;
+
+# Same as above, different name
+# reset=!txd sck=rts mosi=dtr miso=cts
+
+programmer parent "ponyser"
+ id = "siprog";
+ desc = "Lancos SI-Prog ";
+;
+
+# unknown (dasa in uisp)
+# reset=rts sck=dtr mosi=txd miso=cts
+
+programmer
+ id = "dasa";
+ desc = "serial port banging, reset=rts sck=dtr mosi=txd miso=cts";
+ type = "serbb";
+ connection_type = serial;
+ reset = 7;
+ sck = 4;
+ mosi = 3;
+ miso = 8;
+;
+
+# unknown (dasa3 in uisp)
+# reset=!dtr sck=rts mosi=txd miso=cts
+
+programmer
+ id = "dasa3";
+ desc = "serial port banging, reset=!dtr sck=rts mosi=txd miso=cts";
+ type = "serbb";
+ connection_type = serial;
+ reset = ~4;
+ sck = 7;
+ mosi = 3;
+ miso = 8;
+;
+
+# C2N232i (jumper configuration "auto")
+# reset=dtr sck=!rts mosi=!txd miso=!cts
+
+programmer
+ id = "c2n232i";
+ desc = "serial port banging, reset=dtr sck=!rts mosi=!txd miso=!cts";
+ type = "serbb";
+ connection_type = serial;
+ reset = 4;
+ sck = ~7;
+ mosi = ~3;
+ miso = ~8;
+;
+
+#
+# PART DEFINITIONS
+#
+
+#------------------------------------------------------------
+# ATtiny11
+#------------------------------------------------------------
+
+# This is an HVSP-only device.
+
+part
+ id = "t11";
+ desc = "ATtiny11";
+ stk500_devcode = 0x11;
+ signature = 0x1e 0x90 0x04;
+ chip_erase_delay = 20000;
+
+ timeout = 200;
+ hvsp_controlstack =
+ 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00,
+ 0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78,
+ 0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
+ 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ hvspcmdexedelay = 0;
+ synchcycles = 6;
+ latchcycles = 1;
+ togglevtg = 1;
+ poweroffdelay = 25;
+ resetdelayms = 0;
+ resetdelayus = 50;
+ hvleavestabdelay = 100;
+ resetdelay = 25;
+ chiperasepolltimeout = 40;
+ chiperasetime = 0;
+ programfusepolltimeout = 25;
+ programlockpolltimeout = 25;
+
+ memory "eeprom"
+ size = 64;
+ blocksize = 64;
+ readsize = 256;
+ delay = 5;
+ ;
+
+ memory "flash"
+ size = 1024;
+ blocksize = 128;
+ readsize = 256;
+ delay = 3;
+ ;
+
+ memory "signature"
+ size = 3;
+ ;
+
+ memory "lock"
+ size = 1;
+ ;
+
+ memory "calibration"
+ size = 1;
+ ;
+
+ memory "fuse"
+ size = 1;
+ ;
+;
+
+#------------------------------------------------------------
+# ATtiny12
+#------------------------------------------------------------
+
+part
+ id = "t12";
+ desc = "ATtiny12";
+ stk500_devcode = 0x12;
+ avr910_devcode = 0x55;
+ signature = 0x1e 0x90 0x05;
+ chip_erase_delay = 20000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 0;
+
+ hvsp_controlstack =
+ 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00,
+ 0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78,
+ 0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
+ 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
+ hventerstabdelay = 100;
+ hvspcmdexedelay = 0;
+ synchcycles = 6;
+ latchcycles = 1;
+ togglevtg = 1;
+ poweroffdelay = 25;
+ resetdelayms = 0;
+ resetdelayus = 50;
+ hvleavestabdelay = 100;
+ resetdelay = 25;
+ chiperasepolltimeout = 40;
+ chiperasetime = 0;
+ programfusepolltimeout = 25;
+ programlockpolltimeout = 25;
+
+ memory "eeprom"
+ size = 64;
+ min_write_delay = 9000;
+ max_write_delay = 20000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = "1 0 1 0 0 0 0 0 x x x x x x x x",
+ "x x a5 a4 a3 a2 a1 a0 o o o o o o o o";
+
+ write = "1 1 0 0 0 0 0 0 x x x x x x x x",
+ "x x a5 a4 a3 a2 a1 a0 i i i i i i i i";
+
+ mode = 0x04;
+ delay = 8;
+ blocksize = 64;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ size = 1024;
+ min_write_delay = 4500;
+ max_write_delay = 20000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " x x x x x x x a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " x x x x x x x a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x x a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ write_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x x a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ mode = 0x04;
+ delay = 5;
+ blocksize = 128;
+ readsize = 256;
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "0 0 0 0 0 0 a1 a0 o o o o o o o o";
+ ;
+
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 x x x x x x x x",
+ "x x x x x x x x x x x x x o o x";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
+ "x x x x x x x x x x x x x x x x";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 x x x x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+
+ memory "fuse"
+ size = 1;
+ read = "0 1 0 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 x x x x x",
+ "x x x x x x x x i i i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+;
+
+#------------------------------------------------------------
+# ATtiny13
+#------------------------------------------------------------
+
+part
+ id = "t13";
+ desc = "ATtiny13";
+ has_debugwire = yes;
+ flash_instr = 0xB4, 0x0E, 0x1E;
+ eeprom_instr = 0xBB, 0xFE, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
+ 0xBC, 0x0E, 0xB4, 0x0E, 0xBA, 0x0D, 0xBB, 0xBC,
+ 0x99, 0xE1, 0xBB, 0xAC;
+ stk500_devcode = 0x14;
+ signature = 0x1e 0x90 0x07;
+ chip_erase_delay = 4000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ hvsp_controlstack =
+ 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
+ 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
+ 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
+ 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ hvspcmdexedelay = 0;
+ synchcycles = 6;
+ latchcycles = 1;
+ togglevtg = 1;
+ poweroffdelay = 25;
+ resetdelayms = 0;
+ resetdelayus = 90;
+ hvleavestabdelay = 100;
+ resetdelay = 25;
+ chiperasepolltimeout = 40;
+ chiperasetime = 0;
+ programfusepolltimeout = 25;
+ programlockpolltimeout = 25;
+
+ ocdrev = 0;
+
+ memory "eeprom"
+ size = 64;
+ page_size = 4;
+ min_write_delay = 4000;
+ max_write_delay = 4000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x",
+ "x x a5 a4 a3 a2 a1 a0 o o o o o o o o";
+
+ write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x",
+ "x x a5 a4 a3 a2 a1 a0 i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x x x x",
+ " x x a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 5;
+ blocksize = 4;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 1024;
+ page_size = 32;
+ num_pages = 32;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " 0 0 0 0 0 0 0 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " 0 0 0 0 0 0 0 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x x x a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x x x a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " 0 0 0 0 0 0 0 a8",
+ " a7 a6 a5 a4 x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 32;
+ readsize = 256;
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+
+ memory "lock"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ ;
+
+ memory "calibration"
+ size = 2;
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 a0 o o o o o o o o";
+ ;
+
+ memory "lfuse"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ ;
+
+ memory "hfuse"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ ;
+
+;
+
+
+#------------------------------------------------------------
+# ATtiny15
+#------------------------------------------------------------
+
+part
+ id = "t15";
+ desc = "ATtiny15";
+ stk500_devcode = 0x13;
+ avr910_devcode = 0x56;
+ signature = 0x1e 0x90 0x06;
+ chip_erase_delay = 8200;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 0;
+
+ hvsp_controlstack =
+ 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00,
+ 0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78,
+ 0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
+ 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
+ hventerstabdelay = 100;
+ hvspcmdexedelay = 5;
+ synchcycles = 6;
+ latchcycles = 16;
+ togglevtg = 1;
+ poweroffdelay = 25;
+ resetdelayms = 0;
+ resetdelayus = 50;
+ hvleavestabdelay = 100;
+ resetdelay = 25;
+ chiperasepolltimeout = 40;
+ chiperasetime = 0;
+ programfusepolltimeout = 25;
+ programlockpolltimeout = 25;
+
+ memory "eeprom"
+ size = 64;
+ min_write_delay = 8200;
+ max_write_delay = 8200;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = "1 0 1 0 0 0 0 0 x x x x x x x x",
+ "x x a5 a4 a3 a2 a1 a0 o o o o o o o o";
+
+ write = "1 1 0 0 0 0 0 0 x x x x x x x x",
+ "x x a5 a4 a3 a2 a1 a0 i i i i i i i i";
+
+ mode = 0x04;
+ delay = 10;
+ blocksize = 64;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ size = 1024;
+ min_write_delay = 4100;
+ max_write_delay = 4100;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " x x x x x x x a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " x x x x x x x a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x x a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ write_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x x a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ mode = 0x04;
+ delay = 5;
+ blocksize = 128;
+ readsize = 256;
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "0 0 0 0 0 0 a1 a0 o o o o o o o o";
+ ;
+
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 x x x x x x x x",
+ "x x x x x x x x x x x x x o o x";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
+ "x x x x x x x x x x x x x x x x";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 x x x x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+
+ memory "fuse"
+ size = 1;
+ read = "0 1 0 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x x x o o o o x x o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 x x x x x",
+ "x x x x x x x x i i i i 1 1 i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+;
+
+#------------------------------------------------------------
+# AT90s1200
+#------------------------------------------------------------
+
+part
+ id = "1200";
+ desc = "AT90S1200";
+ is_at90s1200 = yes;
+ stk500_devcode = 0x33;
+ avr910_devcode = 0x13;
+ signature = 0x1e 0x90 0x01;
+ pagel = 0xd7;
+ bs2 = 0xa0;
+ chip_erase_delay = 20000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 1;
+ bytedelay = 0;
+ pollindex = 0;
+ pollvalue = 0xFF;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 0;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 0;
+ togglevtg = 0;
+ poweroffdelay = 0;
+ resetdelayms = 0;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 15;
+ chiperasepolltimeout = 0;
+ programfusepulsewidth = 2;
+ programfusepolltimeout = 0;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 1;
+
+ memory "eeprom"
+ size = 64;
+ min_write_delay = 4000;
+ max_write_delay = 9000;
+ readback_p1 = 0x00;
+ readback_p2 = 0xff;
+ read = "1 0 1 0 0 0 0 0 x x x x x x x x",
+ "x x a5 a4 a3 a2 a1 a0 o o o o o o o o";
+
+ write = "1 1 0 0 0 0 0 0 x x x x x x x x",
+ "x x a5 a4 a3 a2 a1 a0 i i i i i i i i";
+
+ mode = 0x04;
+ delay = 20;
+ blocksize = 32;
+ readsize = 256;
+ ;
+ memory "flash"
+ size = 1024;
+ min_write_delay = 4000;
+ max_write_delay = 9000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " x x x x x x x a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " x x x x x x x a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x x a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ write_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x x a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ mode = 0x02;
+ delay = 15;
+ blocksize = 128;
+ readsize = 256;
+ ;
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ memory "fuse"
+ size = 1;
+ ;
+ memory "lock"
+ size = 1;
+ min_write_delay = 9000;
+ max_write_delay = 20000;
+ write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
+ "x x x x x x x x x x x x x x x x";
+ ;
+ ;
+
+#------------------------------------------------------------
+# AT90s4414
+#------------------------------------------------------------
+
+part
+ id = "4414";
+ desc = "AT90S4414";
+ stk500_devcode = 0x50;
+ avr910_devcode = 0x28;
+ signature = 0x1e 0x92 0x01;
+ chip_erase_delay = 20000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 0;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 0;
+ togglevtg = 0;
+ poweroffdelay = 0;
+ resetdelayms = 0;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 15;
+ chiperasepolltimeout = 0;
+ programfusepulsewidth = 2;
+ programfusepolltimeout = 0;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 1;
+
+ memory "eeprom"
+ size = 256;
+ min_write_delay = 9000;
+ max_write_delay = 20000;
+ readback_p1 = 0x80;
+ readback_p2 = 0x7f;
+ read = " 1 0 1 0 0 0 0 0 x x x x x x x a8",
+ "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0 x x x x x x x a8",
+ "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
+
+ mode = 0x04;
+ delay = 12;
+ blocksize = 64;
+ readsize = 256;
+ ;
+ memory "flash"
+ size = 4096;
+ min_write_delay = 9000;
+ max_write_delay = 20000;
+ readback_p1 = 0x7f;
+ readback_p2 = 0x7f;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " x x x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " x x x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ write_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ mode = 0x04;
+ delay = 12;
+ blocksize = 64;
+ readsize = 256;
+ ;
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ memory "fuse"
+ size = 1;
+ ;
+ memory "lock"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
+ "x x x x x x x x x x x x x x x x";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+ ;
+
+#------------------------------------------------------------
+# AT90s2313
+#------------------------------------------------------------
+
+part
+ id = "2313";
+ desc = "AT90S2313";
+ stk500_devcode = 0x40;
+ avr910_devcode = 0x20;
+ signature = 0x1e 0x91 0x01;
+ chip_erase_delay = 20000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 0;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 0;
+ togglevtg = 0;
+ poweroffdelay = 0;
+ resetdelayms = 0;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 15;
+ chiperasepolltimeout = 0;
+ programfusepulsewidth = 2;
+ programfusepolltimeout = 0;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 1;
+
+ memory "eeprom"
+ size = 128;
+ min_write_delay = 4000;
+ max_write_delay = 9000;
+ readback_p1 = 0x80;
+ readback_p2 = 0x7f;
+ read = "1 0 1 0 0 0 0 0 x x x x x x x x",
+ "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
+
+ write = "1 1 0 0 0 0 0 0 x x x x x x x x",
+ "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
+
+ mode = 0x04;
+ delay = 12;
+ blocksize = 64;
+ readsize = 256;
+ ;
+ memory "flash"
+ size = 2048;
+ min_write_delay = 4000;
+ max_write_delay = 9000;
+ readback_p1 = 0x7f;
+ readback_p2 = 0x7f;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " x x x x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " x x x x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ write_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ mode = 0x04;
+ delay = 12;
+ blocksize = 128;
+ readsize = 256;
+ ;
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ memory "fuse"
+ size = 1;
+ ;
+ memory "lock"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x i i x",
+ "x x x x x x x x x x x x x x x x";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+ ;
+
+#------------------------------------------------------------
+# AT90s2333
+#------------------------------------------------------------
+
+part
+ id = "2333";
+##### WARNING: No XML file for device 'AT90S2333'! #####
+ desc = "AT90S2333";
+ stk500_devcode = 0x42;
+ avr910_devcode = 0x34;
+ signature = 0x1e 0x91 0x05;
+ chip_erase_delay = 20000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 0;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 0;
+ togglevtg = 0;
+ poweroffdelay = 0;
+ resetdelayms = 0;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 15;
+ chiperasepolltimeout = 0;
+ programfusepulsewidth = 2;
+ programfusepolltimeout = 0;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 1;
+
+ memory "eeprom"
+ size = 128;
+ min_write_delay = 9000;
+ max_write_delay = 20000;
+ readback_p1 = 0x00;
+ readback_p2 = 0xff;
+ read = "1 0 1 0 0 0 0 0 x x x x x x x x",
+ "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
+
+ write = "1 1 0 0 0 0 0 0 x x x x x x x x",
+ "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
+
+ mode = 0x04;
+ delay = 12;
+ blocksize = 128;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ size = 2048;
+ min_write_delay = 9000;
+ max_write_delay = 20000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " x x x x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " x x x x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ write_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ mode = 0x04;
+ delay = 12;
+ blocksize = 128;
+ readsize = 256;
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ memory "fuse"
+ size = 1;
+ min_write_delay = 9000;
+ max_write_delay = 20000;
+ pwroff_after_write = yes;
+ read = "0 1 0 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 i i i i i",
+ "x x x x x x x x x x x x x x x x";
+ ;
+ memory "lock"
+ size = 1;
+ min_write_delay = 9000;
+ max_write_delay = 20000;
+ read = "0 1 0 1 1 0 0 0 x x x x x x x x",
+ "x x x x x x x x x x x x x o o x";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
+ "x x x x x x x x x x x x x x x x";
+ ;
+ ;
+
+
+#------------------------------------------------------------
+# AT90s2343 (also AT90s2323 and ATtiny22)
+#------------------------------------------------------------
+
+part
+ id = "2343";
+ desc = "AT90S2343";
+ stk500_devcode = 0x43;
+ avr910_devcode = 0x4c;
+ signature = 0x1e 0x91 0x03;
+ chip_erase_delay = 18000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 0;
+
+ hvsp_controlstack =
+ 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x00,
+ 0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78,
+ 0x78, 0x00, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
+ 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
+ hventerstabdelay = 100;
+ hvspcmdexedelay = 0;
+ synchcycles = 6;
+ latchcycles = 1;
+ togglevtg = 0;
+ poweroffdelay = 25;
+ resetdelayms = 0;
+ resetdelayus = 50;
+ hvleavestabdelay = 100;
+ resetdelay = 25;
+ chiperasepolltimeout = 40;
+ chiperasetime = 0;
+ programfusepolltimeout = 25;
+ programlockpolltimeout = 25;
+
+ memory "eeprom"
+ size = 128;
+ min_write_delay = 9000;
+ max_write_delay = 20000;
+ readback_p1 = 0x00;
+ readback_p2 = 0xff;
+ read = "1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
+
+ write = "1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
+
+ mode = 0x04;
+ delay = 12;
+ blocksize = 64;
+ readsize = 256;
+ ;
+ memory "flash"
+ size = 2048;
+ min_write_delay = 9000;
+ max_write_delay = 20000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " x x x x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " x x x x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ write_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ mode = 0x04;
+ delay = 12;
+ blocksize = 128;
+ readsize = 128;
+ ;
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ memory "fuse"
+ size = 1;
+ min_write_delay = 9000;
+ max_write_delay = 20000;
+ read = "0 1 0 1 1 0 0 0 x x x x x x x x",
+ "x x x x x x x x o o o x x x x o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 1 1 1 1 i",
+ "x x x x x x x x x x x x x x x x";
+ ;
+ memory "lock"
+ size = 1;
+ min_write_delay = 9000;
+ max_write_delay = 20000;
+ read = "0 1 0 1 1 0 0 0 x x x x x x x x",
+ "x x x x x x x x o o o x x x x o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
+ "x x x x x x x x x x x x x x x x";
+ ;
+ ;
+
+
+#------------------------------------------------------------
+# AT90s4433
+#------------------------------------------------------------
+
+part
+ id = "4433";
+ desc = "AT90S4433";
+ stk500_devcode = 0x51;
+ avr910_devcode = 0x30;
+ signature = 0x1e 0x92 0x03;
+ chip_erase_delay = 20000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 0;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 0;
+ togglevtg = 0;
+ poweroffdelay = 0;
+ resetdelayms = 0;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 15;
+ chiperasepolltimeout = 0;
+ programfusepulsewidth = 2;
+ programfusepolltimeout = 0;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 1;
+
+ memory "eeprom"
+ size = 256;
+ min_write_delay = 9000;
+ max_write_delay = 20000;
+ readback_p1 = 0x00;
+ readback_p2 = 0xff;
+ read = " 1 0 1 0 0 0 0 0 x x x x x x x x",
+ "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0 x x x x x x x x",
+ "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
+
+ mode = 0x04;
+ delay = 12;
+ blocksize = 128;
+ readsize = 256;
+ ;
+ memory "flash"
+ size = 4096;
+ min_write_delay = 9000;
+ max_write_delay = 20000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " x x x x x a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " x x x x x a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ write_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ mode = 0x04;
+ delay = 12;
+ blocksize = 128;
+ readsize = 256;
+ ;
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ memory "fuse"
+ size = 1;
+ min_write_delay = 9000;
+ max_write_delay = 20000;
+ pwroff_after_write = yes;
+ read = "0 1 0 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 i i i i i",
+ "x x x x x x x x x x x x x x x x";
+ ;
+ memory "lock"
+ size = 1;
+ min_write_delay = 9000;
+ max_write_delay = 20000;
+ read = "0 1 0 1 1 0 0 0 x x x x x x x x",
+ "x x x x x x x x x x x x x o o x";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
+ "x x x x x x x x x x x x x x x x";
+ ;
+ ;
+
+#------------------------------------------------------------
+# AT90s4434
+#------------------------------------------------------------
+
+part
+ id = "4434";
+##### WARNING: No XML file for device 'AT90S4434'! #####
+ desc = "AT90S4434";
+ stk500_devcode = 0x52;
+ avr910_devcode = 0x6c;
+ signature = 0x1e 0x92 0x02;
+ chip_erase_delay = 20000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
+ "x x x x x x x x x x x x x x x x";
+
+ memory "eeprom"
+ size = 256;
+ min_write_delay = 9000;
+ max_write_delay = 20000;
+ readback_p1 = 0x00;
+ readback_p2 = 0xff;
+ read = " 1 0 1 0 0 0 0 0 x x x x x x x x",
+ "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0 x x x x x x x x",
+ "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
+ ;
+ memory "flash"
+ size = 4096;
+ min_write_delay = 9000;
+ max_write_delay = 20000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " x x x x x a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " x x x x x a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ write_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+ ;
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ memory "fuse"
+ size = 1;
+ min_write_delay = 9000;
+ max_write_delay = 20000;
+ read = "0 1 0 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 i i i i i",
+ "x x x x x x x x x x x x x x x x";
+ ;
+ memory "lock"
+ size = 1;
+ min_write_delay = 9000;
+ max_write_delay = 20000;
+ read = "0 1 0 1 1 0 0 0 x x x x x x x x",
+ "x x x x x x x x x x x x x o o x";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
+ "x x x x x x x x x x x x x x x x";
+ ;
+ ;
+
+#------------------------------------------------------------
+# AT90s8515
+#------------------------------------------------------------
+
+part
+ id = "8515";
+ desc = "AT90S8515";
+ stk500_devcode = 0x60;
+ avr910_devcode = 0x38;
+ signature = 0x1e 0x93 0x01;
+ chip_erase_delay = 20000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 0;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 0;
+ togglevtg = 0;
+ poweroffdelay = 0;
+ resetdelayms = 0;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ resetdelay = 15;
+ chiperasepulsewidth = 15;
+ chiperasepolltimeout = 0;
+ programfusepulsewidth = 2;
+ programfusepolltimeout = 0;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 1;
+
+ memory "eeprom"
+ size = 512;
+ min_write_delay = 4000;
+ max_write_delay = 9000;
+ readback_p1 = 0x80;
+ readback_p2 = 0x7f;
+ read = " 1 0 1 0 0 0 0 0 x x x x x x x a8",
+ "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0 x x x x x x x a8",
+ "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
+
+ mode = 0x04;
+ delay = 12;
+ blocksize = 128;
+ readsize = 256;
+ ;
+ memory "flash"
+ size = 8192;
+ min_write_delay = 4000;
+ max_write_delay = 9000;
+ readback_p1 = 0x7f;
+ readback_p2 = 0x7f;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " x x x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " x x x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ write_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ mode = 0x04;
+ delay = 12;
+ blocksize = 128;
+ readsize = 256;
+ ;
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ memory "fuse"
+ size = 1;
+ ;
+ memory "lock"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
+ "x x x x x x x x x x x x x x x x";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+ ;
+
+#------------------------------------------------------------
+# AT90s8535
+#------------------------------------------------------------
+
+part
+ id = "8535";
+ desc = "AT90S8535";
+ stk500_devcode = 0x61;
+ avr910_devcode = 0x68;
+ signature = 0x1e 0x93 0x03;
+ chip_erase_delay = 20000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 0;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 0;
+ togglevtg = 0;
+ poweroffdelay = 0;
+ resetdelayms = 0;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 15;
+ chiperasepolltimeout = 0;
+ programfusepulsewidth = 2;
+ programfusepolltimeout = 0;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 1;
+
+ memory "eeprom"
+ size = 512;
+ min_write_delay = 9000;
+ max_write_delay = 20000;
+ readback_p1 = 0x00;
+ readback_p2 = 0xff;
+ read = " 1 0 1 0 0 0 0 0 x x x x x x x a8",
+ "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0 x x x x x x x a8",
+ "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
+
+ mode = 0x04;
+ delay = 12;
+ blocksize = 128;
+ readsize = 256;
+ ;
+ memory "flash"
+ size = 8192;
+ min_write_delay = 9000;
+ max_write_delay = 20000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " x x x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " x x x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ write_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ mode = 0x04;
+ delay = 12;
+ blocksize = 128;
+ readsize = 256;
+ ;
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ memory "fuse"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 x x x x x x x x",
+ "x x x x x x x x x x x x x x x o";
+ write = "1 0 1 0 1 1 0 0 1 0 1 1 1 1 1 i",
+ "x x x x x x x x x x x x x x x x";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 x x x x x x x x",
+ "x x x x x x x x o o x x x x x x";
+ write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
+ "x x x x x x x x x x x x x x x x";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+ ;
+
+#------------------------------------------------------------
+# ATmega103
+#------------------------------------------------------------
+
+part
+ id = "m103";
+ desc = "ATmega103";
+ stk500_devcode = 0xB1;
+ avr910_devcode = 0x41;
+ signature = 0x1e 0x97 0x01;
+ chip_erase_delay = 112000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 0;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x8E, 0x9E, 0x2E, 0x3E, 0xAE, 0xBE,
+ 0x4E, 0x5E, 0xCE, 0xDE, 0x6E, 0x7E, 0xEE, 0xDE,
+ 0x66, 0x76, 0xE6, 0xF6, 0x6A, 0x7A, 0xEA, 0x7A,
+ 0x7F, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 0;
+ togglevtg = 0;
+ poweroffdelay = 0;
+ resetdelayms = 0;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 15;
+ chiperasepolltimeout = 0;
+ programfusepulsewidth = 2;
+ programfusepolltimeout = 0;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 10;
+
+ memory "eeprom"
+ size = 4096;
+ min_write_delay = 4000;
+ max_write_delay = 9000;
+ readback_p1 = 0x80;
+ readback_p2 = 0x7f;
+ read = " 1 0 1 0 0 0 0 0",
+ " x x x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " x x x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ mode = 0x04;
+ delay = 12;
+ blocksize = 64;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 131072;
+ page_size = 256;
+ num_pages = 512;
+ min_write_delay = 22000;
+ max_write_delay = 56000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 x x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x11;
+ delay = 70;
+ blocksize = 256;
+ readsize = 256;
+ ;
+
+ memory "fuse"
+ size = 1;
+ read = "0 1 0 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x x x x x o x o 1 o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 1 i 1 i i",
+ "x x x x x x x x x x x x x x x x";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 x x x x x x x x",
+ "x x x x x x x x x x x x x o o x";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 1 1 i i 1",
+ "x x x x x x x x x x x x x x x x";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ ;
+
+
+#------------------------------------------------------------
+# ATmega64
+#------------------------------------------------------------
+
+part
+ id = "m64";
+ desc = "ATmega64";
+ has_jtag = yes;
+ stk500_devcode = 0xA0;
+ avr910_devcode = 0x45;
+ signature = 0x1e 0x96 0x02;
+ chip_erase_delay = 9000;
+ pagel = 0xD7;
+ bs2 = 0xA0;
+ reset = dedicated;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 0;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 6;
+ togglevtg = 0;
+ poweroffdelay = 0;
+ resetdelayms = 0;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ idr = 0x22;
+ spmcr = 0x68;
+ allowfullpagebitstream = yes;
+
+ ocdrev = 2;
+
+ memory "eeprom"
+ paged = no; /* leave this "no" */
+ page_size = 8; /* for parallel programming */
+ size = 2048;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = " 1 0 1 0 0 0 0 0",
+ " x x x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " x x x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ mode = 0x04;
+ delay = 20;
+ blocksize = 64;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 65536;
+ page_size = 256;
+ num_pages = 256;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " x a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " x a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " x a14 a13 a12 a11 a10 a9 a8",
+ " a7 x x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x21;
+ delay = 6;
+ blocksize = 128;
+ readsize = 256;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x x x i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "calibration"
+ size = 4;
+ read = "0 0 1 1 1 0 0 0 x x x x x x x x",
+ "0 0 0 0 0 0 a1 a0 o o o o o o o o";
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ ;
+
+
+
+
+#------------------------------------------------------------
+# ATmega128
+#------------------------------------------------------------
+
+part
+ id = "m128";
+ desc = "ATmega128";
+ has_jtag = yes;
+ stk500_devcode = 0xB2;
+ avr910_devcode = 0x43;
+ signature = 0x1e 0x97 0x02;
+ chip_erase_delay = 9000;
+ pagel = 0xD7;
+ bs2 = 0xA0;
+ reset = dedicated;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 0;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 6;
+ togglevtg = 0;
+ poweroffdelay = 0;
+ resetdelayms = 0;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ idr = 0x22;
+ spmcr = 0x68;
+ rampz = 0x3b;
+ allowfullpagebitstream = yes;
+
+ ocdrev = 1;
+
+ memory "eeprom"
+ paged = no; /* leave this "no" */
+ page_size = 8; /* for parallel programming */
+ size = 4096;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = " 1 0 1 0 0 0 0 0",
+ " x x x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " x x x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ mode = 0x04;
+ delay = 12;
+ blocksize = 64;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 131072;
+ page_size = 256;
+ num_pages = 512;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 x x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x21;
+ delay = 6;
+ blocksize = 128;
+ readsize = 256;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x x x i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "calibration"
+ size = 4;
+ read = "0 0 1 1 1 0 0 0 x x x x x x x x",
+ "0 0 0 0 0 0 a1 a0 o o o o o o o o";
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# AT90CAN128
+#------------------------------------------------------------
+
+part
+ id = "c128";
+ desc = "AT90CAN128";
+ has_jtag = yes;
+ stk500_devcode = 0xB3;
+# avr910_devcode = 0x43;
+ signature = 0x1e 0x97 0x81;
+ chip_erase_delay = 9000;
+ pagel = 0xD7;
+ bs2 = 0xA0;
+ reset = dedicated;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 6;
+ togglevtg = 0;
+ poweroffdelay = 0;
+ resetdelayms = 0;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ idr = 0x31;
+ spmcr = 0x57;
+ rampz = 0x3b;
+ eecr = 0x3f;
+ allowfullpagebitstream = no;
+
+ ocdrev = 3;
+
+ memory "eeprom"
+ paged = no; /* leave this "no" */
+ page_size = 8; /* for parallel programming */
+ size = 4096;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = " 1 0 1 0 0 0 0 0",
+ " 0 0 0 x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " 0 0 0 x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 0 0 0",
+ " x x x x x x x x";
+
+
+ mode = 0x41;
+ delay = 20;
+ blocksize = 8;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 131072;
+ page_size = 256;
+ num_pages = 512;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 0 x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 0 x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 x x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 256;
+ readsize = 256;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# AT90CAN64
+#------------------------------------------------------------
+
+part
+ id = "c64";
+ desc = "AT90CAN64";
+ has_jtag = yes;
+ stk500_devcode = 0xB3;
+# avr910_devcode = 0x43;
+ signature = 0x1e 0x96 0x81;
+ chip_erase_delay = 9000;
+ pagel = 0xD7;
+ bs2 = 0xA0;
+ reset = dedicated;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 6;
+ togglevtg = 0;
+ poweroffdelay = 0;
+ resetdelayms = 0;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ idr = 0x31;
+ spmcr = 0x57;
+ rampz = 0x3b;
+ eecr = 0x3f;
+ allowfullpagebitstream = no;
+
+ ocdrev = 3;
+
+ memory "eeprom"
+ paged = no; /* leave this "no" */
+ page_size = 8; /* for parallel programming */
+ size = 2048;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = " 1 0 1 0 0 0 0 0",
+ " 0 0 0 x x a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " 0 0 0 x x a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x a10 a9 a8",
+ " a7 a6 a5 a4 a3 0 0 0",
+ " x x x x x x x x";
+
+
+ mode = 0x41;
+ delay = 20;
+ blocksize = 8;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 65536;
+ page_size = 256;
+ num_pages = 256;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 0 x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 0 x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 x x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 256;
+ readsize = 256;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# AT90CAN32
+#------------------------------------------------------------
+
+part
+ id = "c32";
+ desc = "AT90CAN32";
+ has_jtag = yes;
+ stk500_devcode = 0xB3;
+# avr910_devcode = 0x43;
+ signature = 0x1e 0x95 0x81;
+ chip_erase_delay = 9000;
+ pagel = 0xD7;
+ bs2 = 0xA0;
+ reset = dedicated;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 6;
+ togglevtg = 0;
+ poweroffdelay = 0;
+ resetdelayms = 0;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ idr = 0x31;
+ spmcr = 0x57;
+ rampz = 0x3b;
+ eecr = 0x3f;
+ allowfullpagebitstream = no;
+
+ ocdrev = 3;
+
+ memory "eeprom"
+ paged = no; /* leave this "no" */
+ page_size = 8; /* for parallel programming */
+ size = 1024;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = " 1 0 1 0 0 0 0 0",
+ " 0 0 0 x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " 0 0 0 x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x x a9 a8",
+ " a7 a6 a5 a4 a3 0 0 0",
+ " x x x x x x x x";
+
+
+ mode = 0x41;
+ delay = 20;
+ blocksize = 8;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 32768;
+ page_size = 256;
+ num_pages = 128;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 0 x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 0 x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 x x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 256;
+ readsize = 256;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ ;
+
+
+#------------------------------------------------------------
+# ATmega16
+#------------------------------------------------------------
+
+part
+ id = "m16";
+ desc = "ATmega16";
+ has_jtag = yes;
+ stk500_devcode = 0x82;
+ avr910_devcode = 0x74;
+ signature = 0x1e 0x94 0x03;
+ pagel = 0xd7;
+ bs2 = 0xa0;
+ chip_erase_delay = 9000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 0;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 100;
+ latchcycles = 6;
+ togglevtg = 0;
+ poweroffdelay = 0;
+ resetdelayms = 0;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ resetdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ idr = 0x31;
+ spmcr = 0x57;
+ allowfullpagebitstream = yes;
+
+ ocdrev = 2;
+
+ memory "eeprom"
+ paged = no; /* leave this "no" */
+ page_size = 4; /* for parallel programming */
+ size = 512;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = " 1 0 1 0 0 0 0 0",
+ " 0 0 x x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " 0 0 x x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x04;
+ delay = 10;
+ blocksize = 128;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 16384;
+ page_size = 128;
+ num_pages = 128;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " 0 0 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " 0 0 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 x x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 x x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " 0 0 a13 a12 a11 a10 a9 a8",
+ " a7 a6 x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x21;
+ delay = 6;
+ blocksize = 128;
+ readsize = 256;
+ ;
+
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ memory "calibration"
+ size = 4;
+
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 a1 a0 o o o o o o o o";
+ ;
+ ;
+
+
+#------------------------------------------------------------
+# ATmega164P
+#------------------------------------------------------------
+
+# close to ATmega16
+
+part parent "m16"
+ id = "m164p";
+ desc = "ATmega164P";
+ signature = 0x1e 0x94 0x0a;
+
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 1;
+ allowfullpagebitstream = no;
+ chip_erase_delay = 55000;
+
+ ocdrev = 3;
+ ;
+
+
+#------------------------------------------------------------
+# ATmega324P
+#------------------------------------------------------------
+
+# similar to ATmega164P
+
+part
+ id = "m324p";
+ desc = "ATmega324P";
+ has_jtag = yes;
+ stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one
+ avr910_devcode = 0x74;
+ signature = 0x1e 0x95 0x08;
+ pagel = 0xd7;
+ bs2 = 0xa0;
+ chip_erase_delay = 55000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 0;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ idr = 0x31;
+ spmcr = 0x57;
+ allowfullpagebitstream = no;
+
+ ocdrev = 3;
+
+ memory "eeprom"
+ paged = no; /* leave this "no" */
+ page_size = 4; /* for parallel programming */
+ size = 1024;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = " 1 0 1 0 0 0 0 0",
+ " 0 0 x x x a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " 0 0 x x x a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 10;
+ blocksize = 128;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 32768;
+ page_size = 128;
+ num_pages = 256;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " 0 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " 0 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 x x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 x x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " 0 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x21;
+ delay = 6;
+ blocksize = 256;
+ readsize = 256;
+ ;
+
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x 1 1 1 1 1 i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+
+ memory "calibration"
+ size = 1;
+
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+ ;
+
+
+#------------------------------------------------------------
+# ATmega324PA
+#------------------------------------------------------------
+
+# similar to ATmega324P
+
+part parent "m324p"
+ id = "m324pa";
+ desc = "ATmega324PA";
+ signature = 0x1e 0x95 0x11;
+
+ ocdrev = 3;
+ ;
+
+
+#------------------------------------------------------------
+# ATmega644
+#------------------------------------------------------------
+
+# similar to ATmega164
+
+part
+ id = "m644";
+ desc = "ATmega644";
+ has_jtag = yes;
+ stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one
+ avr910_devcode = 0x74;
+ signature = 0x1e 0x96 0x09;
+ pagel = 0xd7;
+ bs2 = 0xa0;
+ chip_erase_delay = 55000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 0;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 6;
+ togglevtg = 0;
+ poweroffdelay = 0;
+ resetdelayms = 0;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ idr = 0x31;
+ spmcr = 0x57;
+ allowfullpagebitstream = no;
+
+ ocdrev = 3;
+
+ memory "eeprom"
+ paged = no; /* leave this "no" */
+ page_size = 8; /* for parallel programming */
+ size = 2048;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = " 1 0 1 0 0 0 0 0",
+ " 0 0 x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " 0 0 x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 0 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 10;
+ blocksize = 128;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 65536;
+ page_size = 256;
+ num_pages = 256;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 x x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 x x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 x x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x21;
+ delay = 6;
+ blocksize = 256;
+ readsize = 256;
+ ;
+
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x 1 1 1 1 1 i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+
+ memory "calibration"
+ size = 1;
+
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# ATmega644P
+#------------------------------------------------------------
+
+# similar to ATmega164p
+
+part parent "m644"
+ id = "m644p";
+ desc = "ATmega644P";
+ signature = 0x1e 0x96 0x0a;
+
+ ocdrev = 3;
+ ;
+
+
+
+#------------------------------------------------------------
+# ATmega1284
+#------------------------------------------------------------
+
+# similar to ATmega164
+
+part
+ id = "m1284";
+ desc = "ATmega1284";
+ has_jtag = yes;
+ stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one
+ avr910_devcode = 0x74;
+ signature = 0x1e 0x97 0x06;
+ pagel = 0xd7;
+ bs2 = 0xa0;
+ chip_erase_delay = 55000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 6;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ idr = 0x31;
+ spmcr = 0x57;
+ allowfullpagebitstream = no;
+
+ ocdrev = 3;
+
+ memory "eeprom"
+ paged = no; /* leave this "no" */
+ page_size = 8; /* for parallel programming */
+ size = 4096;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = " 1 0 1 0 0 0 0 0",
+ " 0 0 x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " 0 0 x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 0 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 10;
+ blocksize = 128;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 131072;
+ page_size = 256;
+ num_pages = 512;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 x x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 x x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 x x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 10;
+ blocksize = 256;
+ readsize = 256;
+ ;
+
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x 1 1 1 1 1 i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+
+ memory "calibration"
+ size = 1;
+
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+ ;
+
+
+
+#------------------------------------------------------------
+# ATmega1284P
+#------------------------------------------------------------
+
+# similar to ATmega164p
+
+part
+ id = "m1284p";
+ desc = "ATmega1284P";
+ has_jtag = yes;
+ stk500_devcode = 0x82; # no STK500v1 support, use the ATmega16 one
+ avr910_devcode = 0x74;
+ signature = 0x1e 0x97 0x05;
+ pagel = 0xd7;
+ bs2 = 0xa0;
+ chip_erase_delay = 55000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 6;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ idr = 0x31;
+ spmcr = 0x57;
+ allowfullpagebitstream = no;
+
+ ocdrev = 3;
+
+ memory "eeprom"
+ paged = no; /* leave this "no" */
+ page_size = 8; /* for parallel programming */
+ size = 4096;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = " 1 0 1 0 0 0 0 0",
+ " 0 0 x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " 0 0 x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 0 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 10;
+ blocksize = 128;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 131072;
+ page_size = 256;
+ num_pages = 512;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 x x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 x x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 x x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 10;
+ blocksize = 256;
+ readsize = 256;
+ ;
+
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x 1 1 1 1 1 i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+
+ memory "calibration"
+ size = 1;
+
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+ ;
+
+
+
+#------------------------------------------------------------
+# ATmega162
+#------------------------------------------------------------
+
+part
+ id = "m162";
+ desc = "ATmega162";
+ has_jtag = yes;
+ stk500_devcode = 0x83;
+ avr910_devcode = 0x63;
+ signature = 0x1e 0x94 0x04;
+ chip_erase_delay = 9000;
+ pagel = 0xd7;
+ bs2 = 0xa0;
+
+ idr = 0x04;
+ spmcr = 0x57;
+ allowfullpagebitstream = yes;
+
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ ocdrev = 2;
+
+ memory "flash"
+ paged = yes;
+ size = 16384;
+ page_size = 128;
+ num_pages = 128;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " 0 0 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " 0 0 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 x x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 x x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " 0 0 a13 a12 a11 a10 a9 a8",
+ " a7 a6 x x x x x x",
+ " x x x x x x x x";
+ mode = 0x41;
+ delay = 10;
+ blocksize = 128;
+ readsize = 256;
+
+ ;
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 0;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 6;
+ togglevtg = 0;
+ poweroffdelay = 0;
+ resetdelayms = 0;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ memory "eeprom"
+ paged = no; /* leave this "no" */
+ page_size = 4; /* for parallel programming */
+ size = 512;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+
+ read = " 1 0 1 0 0 0 0 0",
+ " 0 0 x x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " 0 0 x x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 20;
+ blocksize = 4;
+ readsize = 256;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ min_write_delay = 16000;
+ max_write_delay = 16000;
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ ;
+
+ memory "hfuse"
+ size = 1;
+ min_write_delay = 16000;
+ max_write_delay = 16000;
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ ;
+
+ memory "efuse"
+ size = 1;
+ min_write_delay = 16000;
+ max_write_delay = 16000;
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x 1 1 1 1 1 i i i";
+ ;
+
+ memory "lock"
+ size = 1;
+ min_write_delay = 16000;
+ max_write_delay = 16000;
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ ;
+
+ memory "signature"
+ size = 3;
+
+ read = "0 0 1 1 0 0 0 0 0 0 x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+
+ memory "calibration"
+ size = 1;
+
+ read = "0 0 1 1 1 0 0 0 0 0 x x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+;
+
+
+
+#------------------------------------------------------------
+# ATmega163
+#------------------------------------------------------------
+
+part
+ id = "m163";
+ desc = "ATmega163";
+ stk500_devcode = 0x81;
+ avr910_devcode = 0x64;
+ signature = 0x1e 0x94 0x02;
+ chip_erase_delay = 32000;
+ pagel = 0xd7;
+ bs2 = 0xa0;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 0;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 0;
+ togglevtg = 0;
+ poweroffdelay = 0;
+ resetdelayms = 0;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 30;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 2;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 2;
+
+
+ memory "eeprom"
+ size = 512;
+ min_write_delay = 4000;
+ max_write_delay = 4000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = " 1 0 1 0 0 0 0 0",
+ " x x x x x x x a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " x x x x x x x a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+ mode = 0x41;
+ delay = 20;
+ blocksize = 4;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 16384;
+ page_size = 128;
+ num_pages = 128;
+ min_write_delay = 16000;
+ max_write_delay = 16000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " x x x a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " x x x a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " x x x a12 a11 a10 a9 a8",
+ " a7 a6 x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x11;
+ delay = 20;
+ blocksize = 128;
+ readsize = 256;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ min_write_delay = 2000;
+ max_write_delay = 2000;
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o x x o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i 1 1 i i i i";
+ ;
+
+ memory "hfuse"
+ size = 1;
+ min_write_delay = 2000;
+ max_write_delay = 2000;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x x x x x 1 o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x 1 1 1 1 1 i i i";
+ ;
+
+ memory "lock"
+ size = 1;
+ min_write_delay = 2000;
+ max_write_delay = 2000;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x 0 x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 x x x x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# ATmega169
+#------------------------------------------------------------
+
+part
+ id = "m169";
+ desc = "ATmega169";
+ has_jtag = yes;
+ stk500_devcode = 0x85;
+ avr910_devcode = 0x78;
+ signature = 0x1e 0x94 0x05;
+ chip_erase_delay = 9000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
+ "x x x x x x x x x x x x x x x x";
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ idr = 0x31;
+ spmcr = 0x57;
+
+ ocdrev = 2;
+
+ memory "eeprom"
+ paged = no; /* leave this "no" */
+ page_size = 4; /* for parallel programming */
+ size = 512;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = " 1 0 1 0 0 0 0 0",
+ " x x x x x x x a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " x x x x x x x a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x x x a8",
+ " a7 a6 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 20;
+ blocksize = 4;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 16384;
+ page_size = 128;
+ num_pages = 128;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " x x x a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " x x x a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " x x x a12 a11 a10 a9 a8",
+ " a7 a6 x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 128;
+ readsize = 256;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ min_write_delay = 2000;
+ max_write_delay = 2000;
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ ;
+
+ memory "hfuse"
+ size = 1;
+ min_write_delay = 2000;
+ max_write_delay = 2000;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ ;
+
+ memory "efuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ ;
+
+ memory "lock"
+ size = 1;
+ min_write_delay = 2000;
+ max_write_delay = 2000;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# ATmega329
+#------------------------------------------------------------
+
+part
+ id = "m329";
+ desc = "ATmega329";
+ has_jtag = yes;
+# stk500_devcode = 0x85; # no STK500 support, only STK500v2
+# avr910_devcode = 0x?; # try the ATmega169 one:
+ avr910_devcode = 0x75;
+ signature = 0x1e 0x95 0x03;
+ chip_erase_delay = 9000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
+ "x x x x x x x x x x x x x x x x";
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ idr = 0x31;
+ spmcr = 0x57;
+
+ ocdrev = 3;
+
+ memory "eeprom"
+ paged = no; /* leave this "no" */
+ page_size = 4; /* for parallel programming */
+ size = 1024;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = " 1 0 1 0 0 0 0 0",
+ " x x x x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " x x x x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 20;
+ blocksize = 8;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 32768;
+ page_size = 128;
+ num_pages = 256;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " x a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " x a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " x x x a12 a11 a10 a9 a8",
+ " a7 a6 x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 256;
+ readsize = 256;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ ;
+
+ memory "hfuse"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ ;
+
+ memory "efuse"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x x i i i";
+ ;
+
+ memory "lock"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# ATmega329P
+#------------------------------------------------------------
+# Identical to ATmega329 except of the signature
+
+part parent "m329"
+ id = "m329p";
+ desc = "ATmega329P";
+ signature = 0x1e 0x95 0x0b;
+
+ ocdrev = 3;
+ ;
+
+#------------------------------------------------------------
+# ATmega3290
+#------------------------------------------------------------
+
+# identical to ATmega329
+
+part parent "m329"
+ id = "m3290";
+ desc = "ATmega3290";
+ signature = 0x1e 0x95 0x04;
+
+ ocdrev = 3;
+ ;
+
+#------------------------------------------------------------
+# ATmega3290P
+#------------------------------------------------------------
+
+# identical to ATmega3290 except of the signature
+
+part parent "m3290"
+ id = "m3290p";
+ desc = "ATmega3290P";
+ signature = 0x1e 0x95 0x0c;
+
+ ocdrev = 3;
+ ;
+
+#------------------------------------------------------------
+# ATmega649
+#------------------------------------------------------------
+
+part
+ id = "m649";
+ desc = "ATmega649";
+ has_jtag = yes;
+# stk500_devcode = 0x85; # no STK500 support, only STK500v2
+# avr910_devcode = 0x?; # try the ATmega169 one:
+ avr910_devcode = 0x75;
+ signature = 0x1e 0x96 0x03;
+ chip_erase_delay = 9000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
+ "x x x x x x x x x x x x x x x x";
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ idr = 0x31;
+ spmcr = 0x57;
+
+ ocdrev = 3;
+
+ memory "eeprom"
+ paged = no; /* leave this "no" */
+ page_size = 8; /* for parallel programming */
+ size = 2048;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = " 1 0 1 0 0 0 0 0",
+ " x x x x x a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " x x x x x a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x a10 a9 a8",
+ " a7 a6 a5 a4 a3 0 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 20;
+ blocksize = 8;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 65536;
+ page_size = 256;
+ num_pages = 256;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " x x x a12 a11 a10 a9 a8",
+ " a7 x x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 256;
+ readsize = 256;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ ;
+
+ memory "hfuse"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ ;
+
+ memory "efuse"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x x i i i";
+ ;
+
+ memory "lock"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# ATmega6490
+#------------------------------------------------------------
+
+# identical to ATmega649
+
+part parent "m649"
+ id = "m6490";
+ desc = "ATmega6490";
+ signature = 0x1e 0x96 0x04;
+
+ ocdrev = 3;
+ ;
+
+#------------------------------------------------------------
+# ATmega32
+#------------------------------------------------------------
+
+part
+ id = "m32";
+ desc = "ATmega32";
+ has_jtag = yes;
+ stk500_devcode = 0x91;
+ avr910_devcode = 0x72;
+ signature = 0x1e 0x95 0x02;
+ chip_erase_delay = 9000;
+ pagel = 0xd7;
+ bs2 = 0xa0;
+ reset = dedicated;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
+ "x x x x x x x x x x x x x x x x";
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 0;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 6;
+ togglevtg = 0;
+ poweroffdelay = 0;
+ resetdelayms = 0;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ idr = 0x31;
+ spmcr = 0x57;
+ allowfullpagebitstream = yes;
+
+ ocdrev = 2;
+
+ memory "eeprom"
+ paged = no; /* leave this "no" */
+ page_size = 4; /* for parallel programming */
+ size = 1024;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = " 1 0 1 0 0 0 0 0",
+ " 0 0 x x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " 0 0 x x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x04;
+ delay = 10;
+ blocksize = 64;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 32768;
+ page_size = 128;
+ num_pages = 256;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " 0 0 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " 0 0 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 x x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 x x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " 0 0 a13 a12 a11 a10 a9 a8",
+ " a7 a6 x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x21;
+ delay = 6;
+ blocksize = 64;
+ readsize = 256;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ min_write_delay = 2000;
+ max_write_delay = 2000;
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ ;
+
+ memory "hfuse"
+ size = 1;
+ min_write_delay = 2000;
+ max_write_delay = 2000;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ ;
+
+ memory "lock"
+ size = 1;
+ min_write_delay = 2000;
+ max_write_delay = 2000;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+
+ memory "calibration"
+ size = 4;
+ read = "0 0 1 1 1 0 0 0 0 0 x x x x x x",
+ "0 0 0 0 0 0 a1 a0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# ATmega161
+#------------------------------------------------------------
+
+part
+ id = "m161";
+ desc = "ATmega161";
+ stk500_devcode = 0x80;
+ avr910_devcode = 0x60;
+ signature = 0x1e 0x94 0x01;
+ chip_erase_delay = 28000;
+ pagel = 0xd7;
+ bs2 = 0xa0;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
+ "x x x x x x x x x x x x x x x x";
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 0;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 0;
+ togglevtg = 0;
+ poweroffdelay = 0;
+ resetdelayms = 0;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 30;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 2;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 2;
+
+ memory "eeprom"
+ size = 512;
+ min_write_delay = 3400;
+ max_write_delay = 3400;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = " 1 0 1 0 0 0 0 0",
+ " x x x x x x x a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " x x x x x x x a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ mode = 0x04;
+ delay = 5;
+ blocksize = 128;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 16384;
+ page_size = 128;
+ num_pages = 128;
+ min_write_delay = 14000;
+ max_write_delay = 14000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " x x x a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " x x x a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " x x x a12 a11 a10 a9 a8",
+ " a7 a6 x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x21;
+ delay = 16;
+ blocksize = 128;
+ readsize = 256;
+ ;
+
+ memory "fuse"
+ size = 1;
+ min_write_delay = 2000;
+ max_write_delay = 2000;
+ read = "0 1 0 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x x x x o x o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 x x x x x",
+ "x x x x x x x x 1 i 1 i i i i i";
+ ;
+
+ memory "lock"
+ size = 1;
+ min_write_delay = 2000;
+ max_write_delay = 2000;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ ;
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ ;
+
+
+#------------------------------------------------------------
+# ATmega8
+#------------------------------------------------------------
+
+part
+ id = "m8";
+ desc = "ATmega8";
+ stk500_devcode = 0x70;
+ avr910_devcode = 0x76;
+ signature = 0x1e 0x93 0x07;
+ pagel = 0xd7;
+ bs2 = 0xc2;
+ chip_erase_delay = 10000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 0;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 2;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ resetdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ memory "eeprom"
+ size = 512;
+ page_size = 4;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = " 1 0 1 0 0 0 0 0",
+ " 0 0 x x x x x a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " 0 0 x x x x x a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ mode = 0x04;
+ delay = 20;
+ blocksize = 128;
+ readsize = 256;
+ ;
+ memory "flash"
+ paged = yes;
+ size = 8192;
+ page_size = 64;
+ num_pages = 128;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0x00;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 0 0 x x x x",
+ " x x x a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 0 0 x x x x",
+ " x x x a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x21;
+ delay = 10;
+ blocksize = 64;
+ readsize = 256;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ min_write_delay = 2000;
+ max_write_delay = 2000;
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ ;
+
+ memory "hfuse"
+ size = 1;
+ min_write_delay = 2000;
+ max_write_delay = 2000;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ ;
+
+ # Required for Arduino IDE
+ # see: https://github.com/arduino/Arduino/issues/2075
+ # https://github.com/arduino/Arduino/issues/2075#issuecomment-238031689
+ memory "efuse"
+ size = 0;
+ ;
+
+ memory "lock"
+ size = 1;
+ min_write_delay = 2000;
+ max_write_delay = 2000;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ ;
+
+ memory "calibration"
+ size = 4;
+ read = "0 0 1 1 1 0 0 0 0 0 x x x x x x",
+ "0 0 0 0 0 0 a1 a0 o o o o o o o o";
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ ;
+
+
+
+#------------------------------------------------------------
+# ATmega8515
+#------------------------------------------------------------
+
+part
+ id = "m8515";
+ desc = "ATmega8515";
+ stk500_devcode = 0x63;
+ avr910_devcode = 0x3A;
+ signature = 0x1e 0x93 0x06;
+ chip_erase_delay = 9000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 0;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 6;
+ togglevtg = 0;
+ poweroffdelay = 0;
+ resetdelayms = 0;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ memory "eeprom"
+ size = 512;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = " 1 0 1 0 0 0 0 0",
+ " 0 0 x x x x x a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " 0 0 x x x x x a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ mode = 0x04;
+ delay = 20;
+ blocksize = 128;
+ readsize = 256;
+ ;
+ memory "flash"
+ paged = yes;
+ size = 8192;
+ page_size = 64;
+ num_pages = 128;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 0 0 x x x x",
+ " x x x a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 0 0 x x x x",
+ " x x x a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x21;
+ delay = 6;
+ blocksize = 64;
+ readsize = 256;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ ;
+
+ memory "hfuse"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ ;
+
+ memory "lock"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ ;
+
+ memory "calibration"
+ size = 4;
+ read = "0 0 1 1 1 0 0 0 0 0 x x x x x x",
+ "0 0 0 0 0 0 a1 a0 o o o o o o o o";
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ ;
+
+
+
+
+#------------------------------------------------------------
+# ATmega8535
+#------------------------------------------------------------
+
+part
+ id = "m8535";
+ desc = "ATmega8535";
+ stk500_devcode = 0x64;
+ avr910_devcode = 0x69;
+ signature = 0x1e 0x93 0x08;
+ pagel = 0xd7;
+ bs2 = 0xa0;
+ chip_erase_delay = 9000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 0;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 6;
+ togglevtg = 0;
+ poweroffdelay = 0;
+ resetdelayms = 0;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ memory "eeprom"
+ size = 512;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = " 1 0 1 0 0 0 0 0",
+ " 0 0 x x x x x a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " 0 0 x x x x x a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ mode = 0x04;
+ delay = 20;
+ blocksize = 128;
+ readsize = 256;
+ ;
+ memory "flash"
+ paged = yes;
+ size = 8192;
+ page_size = 64;
+ num_pages = 128;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 0 0 x x x x",
+ " x x x a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 0 0 x x x x",
+ " x x x a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x21;
+ delay = 6;
+ blocksize = 64;
+ readsize = 256;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ min_write_delay = 2000;
+ max_write_delay = 2000;
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ ;
+
+ memory "hfuse"
+ size = 1;
+ min_write_delay = 2000;
+ max_write_delay = 2000;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ ;
+
+ memory "lock"
+ size = 1;
+ min_write_delay = 2000;
+ max_write_delay = 2000;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ ;
+
+ memory "calibration"
+ size = 4;
+ read = "0 0 1 1 1 0 0 0 0 0 x x x x x x",
+ "0 0 0 0 0 0 a1 a0 o o o o o o o o";
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ ;
+
+
+#------------------------------------------------------------
+# ATtiny26
+#------------------------------------------------------------
+
+part
+ id = "t26";
+ desc = "ATtiny26";
+ stk500_devcode = 0x21;
+ avr910_devcode = 0x5e;
+ signature = 0x1e 0x91 0x09;
+ pagel = 0xb3;
+ bs2 = 0xb2;
+ chip_erase_delay = 9000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 0;
+
+ pp_controlstack =
+ 0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC,
+ 0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC,
+ 0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C,
+ 0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 2;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ memory "eeprom"
+ size = 128;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = "1 0 1 0 0 0 0 0 x x x x x x x x",
+ "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
+
+ write = "1 1 0 0 0 0 0 0 x x x x x x x x",
+ "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
+
+ mode = 0x04;
+ delay = 10;
+ blocksize = 64;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 2048;
+ page_size = 32;
+ num_pages = 64;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " x x x x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " x x x x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x x x",
+ " x x x x a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x x x",
+ " x x x x a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " x x x x x x a9 a8",
+ " a7 a6 a5 a4 x x x x",
+ " x x x x x x x x";
+
+ mode = 0x21;
+ delay = 6;
+ blocksize = 16;
+ readsize = 256;
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "0 0 0 0 0 0 a1 a0 o o o o o o o o";
+ ;
+
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 x x x x x x x x",
+ "x x x x x x x x x x x x x x o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 1 1 1 i i",
+ "x x x x x x x x x x x x x x x x";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x x x x i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "calibration"
+ size = 4;
+ read = "0 0 1 1 1 0 0 0 x x x x x x x x",
+ "0 0 0 0 0 0 a1 a0 o o o o o o o o";
+ ;
+
+;
+
+
+#------------------------------------------------------------
+# ATtiny261
+#------------------------------------------------------------
+# Close to ATtiny26
+
+part
+ id = "t261";
+ desc = "ATtiny261";
+ has_debugwire = yes;
+ flash_instr = 0xB4, 0x00, 0x10;
+ eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
+ 0xBC, 0x00, 0xB4, 0x00, 0xBA, 0x0D, 0xBB, 0xBC,
+ 0x99, 0xE1, 0xBB, 0xAC;
+# stk500_devcode = 0x21;
+# avr910_devcode = 0x5e;
+ signature = 0x1e 0x91 0x0c;
+ pagel = 0xb3;
+ bs2 = 0xb2;
+ chip_erase_delay = 4000;
+
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 0;
+
+ pp_controlstack =
+ 0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC,
+ 0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC,
+ 0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C,
+ 0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 2;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ ocdrev = 1;
+
+ memory "eeprom"
+ paged = no;
+ size = 128;
+ page_size = 4;
+ num_pages = 32;
+ min_write_delay = 4000;
+ max_write_delay = 4000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+
+ read = "1 0 1 0 0 0 0 0 x x x x x x x x",
+ "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
+
+ write = "1 1 0 0 0 0 0 0 x x x x x x x x",
+ "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x x x x",
+ " x a6 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 10;
+ blocksize = 4;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 2048;
+ page_size = 32;
+ num_pages = 64;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " x x x x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " x x x x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x x x",
+ " x x x x a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x x x",
+ " x x x x a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " x x x x x x a9 a8",
+ " a7 a6 a5 a4 x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 32;
+ readsize = 256;
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "0 0 0 0 0 0 a1 a0 o o o o o o o o";
+ ;
+
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 x x x x x x x x",
+ "x x x x x x x x x x x x x x o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 1 1 1 i i",
+ "x x x x x x x x x x x x x x x x";
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ ;
+
+ memory "efuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x x x x i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 x x x x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+
+;
+
+
+#------------------------------------------------------------
+# ATtiny461
+#------------------------------------------------------------
+# Close to ATtiny261
+
+part
+ id = "t461";
+ desc = "ATtiny461";
+ has_debugwire = yes;
+ flash_instr = 0xB4, 0x00, 0x10;
+ eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
+ 0xBC, 0x00, 0xB4, 0x00, 0xBA, 0x0D, 0xBB, 0xBC,
+ 0x99, 0xE1, 0xBB, 0xAC;
+# stk500_devcode = 0x21;
+# avr910_devcode = 0x5e;
+ signature = 0x1e 0x92 0x08;
+ pagel = 0xb3;
+ bs2 = 0xb2;
+ chip_erase_delay = 4000;
+
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 0;
+
+ pp_controlstack =
+ 0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC,
+ 0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC,
+ 0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C,
+ 0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 2;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ ocdrev = 1;
+
+ memory "eeprom"
+ paged = no;
+ size = 256;
+ page_size = 4;
+ num_pages = 64;
+ min_write_delay = 4000;
+ max_write_delay = 4000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+
+ read = " 1 0 1 0 0 0 0 0 x x x x x x x x",
+ "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0 x x x x x x x x",
+ "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x x x x",
+ " a7 a6 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 10;
+ blocksize = 4;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 4096;
+ page_size = 64;
+ num_pages = 64;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " x x x x x a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " x x x x x a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x x x",
+ " x x x a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x x x",
+ " x x x a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " x x x x x a10 a9 a8",
+ " a7 a6 a5 x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 64;
+ readsize = 256;
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "0 0 0 0 0 0 a1 a0 o o o o o o o o";
+ ;
+
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 x x x x x x x x",
+ "x x x x x x x x x x x x x x o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 1 1 1 i i",
+ "x x x x x x x x x x x x x x x x";
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ ;
+
+ memory "efuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x x x x i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 x x x x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+
+;
+
+
+#------------------------------------------------------------
+# ATtiny861
+#------------------------------------------------------------
+# Close to ATtiny461
+
+part
+ id = "t861";
+ desc = "ATtiny861";
+ has_debugwire = yes;
+ flash_instr = 0xB4, 0x00, 0x10;
+ eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
+ 0xBC, 0x00, 0xB4, 0x00, 0xBA, 0x0D, 0xBB, 0xBC,
+ 0x99, 0xE1, 0xBB, 0xAC;
+# stk500_devcode = 0x21;
+# avr910_devcode = 0x5e;
+ signature = 0x1e 0x93 0x0d;
+ pagel = 0xb3;
+ bs2 = 0xb2;
+ chip_erase_delay = 4000;
+
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 0;
+
+ pp_controlstack =
+ 0xC4, 0xE4, 0xC4, 0xE4, 0xCC, 0xEC, 0xCC, 0xEC,
+ 0xD4, 0xF4, 0xD4, 0xF4, 0xDC, 0xFC, 0xDC, 0xFC,
+ 0xC8, 0xE8, 0xD8, 0xF8, 0x4C, 0x6C, 0x5C, 0x7C,
+ 0xEC, 0xBC, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 2;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ ocdrev = 1;
+
+ memory "eeprom"
+ paged = no;
+ size = 512;
+ num_pages = 128;
+ page_size = 4;
+ min_write_delay = 4000;
+ max_write_delay = 4000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+
+ read = " 1 0 1 0 0 0 0 0 x x x x x x x a8",
+ "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0 x x x x x x x a8",
+ "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x x x a8",
+ " a7 a6 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 10;
+ blocksize = 4;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 8192;
+ page_size = 64;
+ num_pages = 128;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " x x x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " x x x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x x x",
+ " x x x a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x x x",
+ " x x x a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " x x x x a11 a10 a9 a8",
+ " a7 a6 a5 x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 64;
+ readsize = 256;
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "0 0 0 0 0 0 a1 a0 o o o o o o o o";
+ ;
+
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 x x x x x x x x",
+ "x x x x x x x x x x x x x x o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 1 1 1 i i",
+ "x x x x x x x x x x x x x x x x";
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ ;
+
+ memory "efuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x x x x i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 x x x x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+
+;
+
+
+#------------------------------------------------------------
+# ATtiny28
+#------------------------------------------------------------
+
+# This is an HVPP-only device.
+
+part
+ id = "t28";
+ desc = "ATtiny28";
+ stk500_devcode = 0x22;
+ avr910_devcode = 0x5c;
+ signature = 0x1e 0x91 0x07;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 0;
+ togglevtg = 0;
+ poweroffdelay = 0;
+ resetdelayms = 0;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ resetdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ memory "flash"
+ size = 2048;
+ page_size = 2;
+ readsize = 256;
+ delay = 5;
+ ;
+
+ memory "signature"
+ size = 3;
+ ;
+
+ memory "lock"
+ size = 1;
+ ;
+
+ memory "calibration"
+ size = 1;
+ ;
+
+ memory "fuse"
+ size = 1;
+ ;
+;
+
+
+
+#------------------------------------------------------------
+# ATmega48
+#------------------------------------------------------------
+
+part
+ id = "m48";
+ desc = "ATmega48";
+ has_debugwire = yes;
+ flash_instr = 0xB6, 0x01, 0x11;
+ eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
+ 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
+ 0x99, 0xF9, 0xBB, 0xAF;
+ stk500_devcode = 0x59;
+# avr910_devcode = 0x;
+ signature = 0x1e 0x92 0x05;
+ pagel = 0xd7;
+ bs2 = 0xc2;
+ chip_erase_delay = 45000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ resetdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ ocdrev = 1;
+
+ memory "eeprom"
+ paged = no;
+ page_size = 4;
+ size = 256;
+ min_write_delay = 3600;
+ max_write_delay = 3600;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = " 1 0 1 0 0 0 0 0",
+ " 0 0 0 x x x x x",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " 0 0 0 x x x x x",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x x x x",
+ " a7 a6 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 20;
+ blocksize = 4;
+ readsize = 256;
+ ;
+ memory "flash"
+ paged = yes;
+ size = 4096;
+ page_size = 64;
+ num_pages = 64;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0x00;
+ readback_p2 = 0x00;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " 0 0 0 0 0 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " 0 0 0 0 0 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x x a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x x a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " 0 0 0 0 0 a10 a9 a8",
+ " a7 a6 a5 x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 64;
+ readsize = 256;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ ;
+
+ memory "hfuse"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ ;
+
+ memory "efuse"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x x x x i";
+ ;
+
+ memory "lock"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# ATmega48P
+#------------------------------------------------------------
+
+part parent "m48"
+ id = "m48p";
+ desc = "ATmega48P";
+ signature = 0x1e 0x92 0x0a;
+
+ ocdrev = 1;
+ ;
+
+#------------------------------------------------------------
+# ATmega48PB
+#------------------------------------------------------------
+
+part parent "m48"
+ id = "m48pb";
+ desc = "ATmega48PB";
+ signature = 0x1e 0x92 0x10;
+
+ ocdrev = 1;
+ ;
+
+#------------------------------------------------------------
+# ATmega88
+#------------------------------------------------------------
+
+part
+ id = "m88";
+ desc = "ATmega88";
+ has_debugwire = yes;
+ flash_instr = 0xB6, 0x01, 0x11;
+ eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
+ 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
+ 0x99, 0xF9, 0xBB, 0xAF;
+ stk500_devcode = 0x73;
+# avr910_devcode = 0x;
+ signature = 0x1e 0x93 0x0a;
+ pagel = 0xd7;
+ bs2 = 0xc2;
+ chip_erase_delay = 9000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ resetdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ ocdrev = 1;
+
+ memory "eeprom"
+ paged = no;
+ page_size = 4;
+ size = 512;
+ min_write_delay = 3600;
+ max_write_delay = 3600;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = " 1 0 1 0 0 0 0 0",
+ " 0 0 0 x x x x a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " 0 0 0 x x x x a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x x x a8",
+ " a7 a6 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 20;
+ blocksize = 4;
+ readsize = 256;
+ ;
+ memory "flash"
+ paged = yes;
+ size = 8192;
+ page_size = 64;
+ num_pages = 128;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x x a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x x a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 64;
+ readsize = 256;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ ;
+
+ memory "hfuse"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ ;
+
+ memory "efuse"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x x i i i";
+ ;
+
+ memory "lock"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# ATmega88P
+#------------------------------------------------------------
+
+part parent "m88"
+ id = "m88p";
+ desc = "ATmega88P";
+ signature = 0x1e 0x93 0x0f;
+
+ ocdrev = 1;
+ ;
+
+#------------------------------------------------------------
+# ATmega88PB
+#------------------------------------------------------------
+
+part parent "m88"
+ id = "m88pb";
+ desc = "ATmega88PB";
+ signature = 0x1e 0x93 0x16;
+
+ ocdrev = 1;
+ ;
+
+#------------------------------------------------------------
+# ATmega168
+#------------------------------------------------------------
+
+part
+ id = "m168";
+ desc = "ATmega168";
+ has_debugwire = yes;
+ flash_instr = 0xB6, 0x01, 0x11;
+ eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
+ 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
+ 0x99, 0xF9, 0xBB, 0xAF;
+ stk500_devcode = 0x86;
+ # avr910_devcode = 0x;
+ signature = 0x1e 0x94 0x06;
+ pagel = 0xd7;
+ bs2 = 0xc2;
+ chip_erase_delay = 9000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ resetdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ ocdrev = 1;
+
+ memory "eeprom"
+ paged = no;
+ page_size = 4;
+ size = 512;
+ min_write_delay = 3600;
+ max_write_delay = 3600;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = " 1 0 1 0 0 0 0 0",
+ " 0 0 0 x x x x a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " 0 0 0 x x x x a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x x x a8",
+ " a7 a6 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 20;
+ blocksize = 4;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 16384;
+ page_size = 128;
+ num_pages = 128;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " 0 0 0 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " 0 0 0 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " 0 0 0 a12 a11 a10 a9 a8",
+ " a7 a6 x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 128;
+ readsize = 256;
+
+ ;
+
+ memory "lfuse"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ ;
+
+ memory "hfuse"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ ;
+
+ memory "efuse"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x x i i i";
+ ;
+
+ memory "lock"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+;
+
+#------------------------------------------------------------
+# ATmega168P
+#------------------------------------------------------------
+
+part parent "m168"
+ id = "m168p";
+ desc = "ATmega168P";
+ signature = 0x1e 0x94 0x0b;
+
+ ocdrev = 1;
+;
+
+#------------------------------------------------------------
+# ATmega168PB
+#------------------------------------------------------------
+
+part parent "m168"
+ id = "m168pb";
+ desc = "ATmega168PB";
+ signature = 0x1e 0x94 0x15;
+
+ ocdrev = 1;
+;
+
+#------------------------------------------------------------
+# ATtiny88
+#------------------------------------------------------------
+
+part
+ id = "t88";
+ desc = "ATtiny88";
+ has_debugwire = yes;
+ flash_instr = 0xB6, 0x01, 0x11;
+ eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
+ 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
+ 0x99, 0xF9, 0xBB, 0xAF;
+ stk500_devcode = 0x73;
+# avr910_devcode = 0x;
+ signature = 0x1e 0x93 0x11;
+ pagel = 0xd7;
+ bs2 = 0xc2;
+ chip_erase_delay = 9000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ resetdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ ocdrev = 1;
+
+ memory "eeprom"
+ paged = no;
+ page_size = 4;
+ size = 64;
+ min_write_delay = 3600;
+ max_write_delay = 3600;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = " 1 0 1 0 0 0 0 0",
+ " 0 0 0 x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " 0 0 0 x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x x x x",
+ " x a6 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 20;
+ blocksize = 4;
+ readsize = 64;
+ ;
+ memory "flash"
+ paged = yes;
+ size = 8192;
+ page_size = 64;
+ num_pages = 128;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x x a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x x a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 64;
+ readsize = 256;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ ;
+
+ memory "hfuse"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ ;
+
+ memory "efuse"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x x x x i";
+ ;
+
+ memory "lock"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# ATmega328
+#------------------------------------------------------------
+
+part
+ id = "m328";
+ desc = "ATmega328";
+ has_debugwire = yes;
+ flash_instr = 0xB6, 0x01, 0x11;
+ eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
+ 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
+ 0x99, 0xF9, 0xBB, 0xAF;
+ stk500_devcode = 0x86;
+ # avr910_devcode = 0x;
+ signature = 0x1e 0x95 0x14;
+ pagel = 0xd7;
+ bs2 = 0xc2;
+ chip_erase_delay = 9000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ resetdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ ocdrev = 1;
+
+ memory "eeprom"
+ paged = no;
+ page_size = 4;
+ size = 1024;
+ min_write_delay = 3600;
+ max_write_delay = 3600;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = " 1 0 1 0 0 0 0 0",
+ " 0 0 0 x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " 0 0 0 x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x x a9 a8",
+ " a7 a6 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 20;
+ blocksize = 4;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 32768;
+ page_size = 128;
+ num_pages = 256;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " 0 0 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " 0 0 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " 0 0 a13 a12 a11 a10 a9 a8",
+ " a7 a6 x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 128;
+ readsize = 256;
+
+ ;
+
+ memory "lfuse"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ ;
+
+ memory "hfuse"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ ;
+
+ memory "efuse"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x x i i i";
+ ;
+
+ memory "lock"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+;
+
+part parent "m328"
+ id = "m328p";
+ desc = "ATmega328P";
+ signature = 0x1e 0x95 0x0F;
+
+ ocdrev = 1;
+;
+
+#------------------------------------------------------------
+# ATmega32m1
+#------------------------------------------------------------
+
+part parent "m328"
+ id = "m32m1";
+ desc = "ATmega32M1";
+ # stk500_devcode = 0x;
+ # avr910_devcode = 0x;
+ signature = 0x1e 0x95 0x84;
+ bs2 = 0xe2;
+
+ memory "efuse"
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x i i i i i i";
+ ;
+;
+
+#------------------------------------------------------------
+# ATtiny2313
+#------------------------------------------------------------
+
+part
+ id = "t2313";
+ desc = "ATtiny2313";
+ has_debugwire = yes;
+ flash_instr = 0xB2, 0x0F, 0x1F;
+ eeprom_instr = 0xBB, 0xFE, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
+ 0xBA, 0x0F, 0xB2, 0x0F, 0xBA, 0x0D, 0xBB, 0xBC,
+ 0x99, 0xE1, 0xBB, 0xAC;
+ stk500_devcode = 0x23;
+## Use the ATtiny26 devcode:
+ avr910_devcode = 0x5e;
+ signature = 0x1e 0x91 0x0a;
+ pagel = 0xD4;
+ bs2 = 0xD6;
+ reset = io;
+ chip_erase_delay = 9000;
+
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0E, 0x1E, 0x2E, 0x3E, 0x2E, 0x3E,
+ 0x4E, 0x5E, 0x4E, 0x5E, 0x6E, 0x7E, 0x6E, 0x7E,
+ 0x26, 0x36, 0x66, 0x76, 0x2A, 0x3A, 0x6A, 0x7A,
+ 0x2E, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ ocdrev = 0;
+
+ memory "eeprom"
+ size = 128;
+ paged = no;
+ page_size = 4;
+ min_write_delay = 4000;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x",
+ "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
+
+ write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x",
+ "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x x x x",
+ " x a6 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 4;
+ readsize = 256;
+ ;
+ memory "flash"
+ paged = yes;
+ size = 2048;
+ page_size = 32;
+ num_pages = 64;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " 0 0 0 0 0 0 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " 0 0 0 0 0 0 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+# The information in the data sheet of April/2004 is wrong, this works:
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x x x a3 a2 a1 a0",
+ " i i i i i i i i";
+
+# The information in the data sheet of April/2004 is wrong, this works:
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x x x a3 a2 a1 a0",
+ " i i i i i i i i";
+
+# The information in the data sheet of April/2004 is wrong, this works:
+ writepage = " 0 1 0 0 1 1 0 0",
+ " 0 0 0 0 0 0 a9 a8",
+ " a7 a6 a5 a4 x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 32;
+ readsize = 256;
+ ;
+# ATtiny2313 has Signature Bytes: 0x1E 0x91 0x0A.
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ memory "lock"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x x x x i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+# The Tiny2313 has calibration data for both 4 MHz and 8 MHz.
+# The information in the data sheet of April/2004 is wrong, this works:
+
+ memory "calibration"
+ size = 2;
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 a0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# ATtiny4313
+#------------------------------------------------------------
+
+part
+ id = "t4313";
+ desc = "ATtiny4313";
+ has_debugwire = yes;
+ flash_instr = 0xB2, 0x0F, 0x1F;
+ eeprom_instr = 0xBB, 0xFE, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
+ 0xBA, 0x0F, 0xB2, 0x0F, 0xBA, 0x0D, 0xBB, 0xBC,
+ 0x99, 0xE1, 0xBB, 0xAC;
+ stk500_devcode = 0x23;
+## Use the ATtiny26 devcode:
+ avr910_devcode = 0x5e;
+ signature = 0x1e 0x92 0x0d;
+ pagel = 0xD4;
+ bs2 = 0xD6;
+ reset = io;
+ chip_erase_delay = 9000;
+
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0E, 0x1E, 0x2E, 0x3E, 0x2E, 0x3E,
+ 0x4E, 0x5E, 0x4E, 0x5E, 0x6E, 0x7E, 0x6E, 0x7E,
+ 0x26, 0x36, 0x66, 0x76, 0x2A, 0x3A, 0x6A, 0x7A,
+ 0x2E, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ ocdrev = 0;
+
+ memory "eeprom"
+ size = 256;
+ paged = no;
+ page_size = 4;
+ min_write_delay = 4000;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x",
+ "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
+
+ write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x",
+ "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x x x x",
+ " a7 a6 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 4;
+ readsize = 256;
+ ;
+ memory "flash"
+ paged = yes;
+ size = 4096;
+ page_size = 64;
+ num_pages = 64;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " 0 0 0 0 0 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " 0 0 0 0 0 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x x a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x x a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " 0 0 0 0 0 a10 a9 a8",
+ " a7 a6 a5 x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 32;
+ readsize = 256;
+ ;
+# ATtiny4313 has Signature Bytes: 0x1E 0x92 0x0D.
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ memory "lock"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x x x x i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "calibration"
+ size = 2;
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 a0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# AT90PWM2
+#------------------------------------------------------------
+
+part
+ id = "pwm2";
+ desc = "AT90PWM2";
+ has_debugwire = yes;
+ flash_instr = 0xB6, 0x01, 0x11;
+ eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
+ 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
+ 0x99, 0xF9, 0xBB, 0xAF;
+ stk500_devcode = 0x65;
+## avr910_devcode = ?;
+ signature = 0x1e 0x93 0x81;
+ pagel = 0xD8;
+ bs2 = 0xE2;
+ reset = io;
+ chip_erase_delay = 9000;
+
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ memory "eeprom"
+ size = 512;
+ paged = no;
+ page_size = 4;
+ min_write_delay = 4000;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8",
+ "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
+
+ write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8",
+ "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x x x x",
+ " a7 a6 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 4;
+ readsize = 256;
+ ;
+ memory "flash"
+ paged = yes;
+ size = 8192;
+ page_size = 64;
+ num_pages = 128;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x x a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x x a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 64;
+ readsize = 256;
+ ;
+# AT90PWM2 has Signature Bytes: 0x1E 0x93 0x81.
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 0 0 x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ memory "lock"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# AT90PWM3
+#------------------------------------------------------------
+
+# Completely identical to AT90PWM2 (including the signature!)
+
+part parent "pwm2"
+ id = "pwm3";
+ desc = "AT90PWM3";
+ ;
+
+#------------------------------------------------------------
+# AT90PWM2B
+#------------------------------------------------------------
+# Same as AT90PWM2 but different signature.
+
+part parent "pwm2"
+ id = "pwm2b";
+ desc = "AT90PWM2B";
+ signature = 0x1e 0x93 0x83;
+
+ ocdrev = 1;
+ ;
+
+#------------------------------------------------------------
+# AT90PWM3B
+#------------------------------------------------------------
+
+# Completely identical to AT90PWM2B (including the signature!)
+
+part parent "pwm2b"
+ id = "pwm3b";
+ desc = "AT90PWM3B";
+
+ ocdrev = 1;
+ ;
+
+#------------------------------------------------------------
+# AT90PWM316
+#------------------------------------------------------------
+
+# Similar to AT90PWM3B, but with 16 kiB flash, 512 B EEPROM, and 1024 B SRAM.
+
+part parent "pwm3b"
+ id = "pwm316";
+ desc = "AT90PWM316";
+ signature = 0x1e 0x94 0x83;
+
+ ocdrev = 1;
+
+ memory "flash"
+ paged = yes;
+ size = 16384;
+ page_size = 128;
+ num_pages = 128;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " 0 0 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " 0 0 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 x x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 x x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " 0 0 a13 a12 a11 a10 a9 a8",
+ " a7 a6 x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x21;
+ delay = 6;
+ blocksize = 128;
+ readsize = 256;
+ ;
+ ;
+
+#------------------------------------------------------------
+# AT90PWM216
+#------------------------------------------------------------
+# Completely identical to AT90PWM316 (including the signature!)
+
+part parent "pwm316"
+ id = "pwm216";
+ desc = "AT90PWM216";
+ ;
+
+#------------------------------------------------------------
+# ATtiny25
+#------------------------------------------------------------
+
+part
+ id = "t25";
+ desc = "ATtiny25";
+ has_debugwire = yes;
+ flash_instr = 0xB4, 0x02, 0x12;
+ eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
+ 0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC,
+ 0x99, 0xE1, 0xBB, 0xAC;
+## no STK500 devcode in XML file, use the ATtiny45 one
+ stk500_devcode = 0x14;
+## avr910_devcode = ?;
+## Try the AT90S2313 devcode:
+ avr910_devcode = 0x20;
+ signature = 0x1e 0x91 0x08;
+ reset = io;
+ chip_erase_delay = 4500;
+
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ hvsp_controlstack =
+ 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
+ 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
+ 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
+ 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
+ hventerstabdelay = 100;
+ hvspcmdexedelay = 0;
+ synchcycles = 6;
+ latchcycles = 1;
+ togglevtg = 1;
+ poweroffdelay = 25;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 100;
+ resetdelay = 25;
+ chiperasepolltimeout = 40;
+ chiperasetime = 0;
+ programfusepolltimeout = 25;
+ programlockpolltimeout = 25;
+
+ ocdrev = 1;
+
+ memory "eeprom"
+ size = 128;
+ paged = no;
+ page_size = 4;
+ min_write_delay = 4000;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x",
+ "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
+
+ write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x",
+ "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x x x x",
+ " x a6 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 4;
+ readsize = 256;
+ ;
+ memory "flash"
+ paged = yes;
+ size = 2048;
+ page_size = 32;
+ num_pages = 64;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " 0 0 0 0 0 0 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " 0 0 0 0 0 0 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x x x a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x x x a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " 0 0 0 0 0 0 a9 a8",
+ " a7 a6 a5 a4 x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 32;
+ readsize = 256;
+ ;
+# ATtiny25 has Signature Bytes: 0x1E 0x91 0x08.
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ memory "lock"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x x x x i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 a0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# ATtiny45
+#------------------------------------------------------------
+
+part
+ id = "t45";
+ desc = "ATtiny45";
+ has_debugwire = yes;
+ flash_instr = 0xB4, 0x02, 0x12;
+ eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
+ 0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC,
+ 0x99, 0xE1, 0xBB, 0xAC;
+ stk500_devcode = 0x14;
+## avr910_devcode = ?;
+## Try the AT90S2313 devcode:
+ avr910_devcode = 0x20;
+ signature = 0x1e 0x92 0x06;
+ reset = io;
+ chip_erase_delay = 4500;
+
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ hvsp_controlstack =
+ 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
+ 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
+ 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
+ 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ hvspcmdexedelay = 0;
+ synchcycles = 6;
+ latchcycles = 1;
+ togglevtg = 1;
+ poweroffdelay = 25;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 100;
+ resetdelay = 25;
+ chiperasepolltimeout = 40;
+ chiperasetime = 0;
+ programfusepolltimeout = 25;
+ programlockpolltimeout = 25;
+
+ ocdrev = 1;
+
+ memory "eeprom"
+ size = 256;
+ page_size = 4;
+ min_write_delay = 4000;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x",
+ "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
+
+ write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x",
+ "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x x x x",
+ " a7 a6 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 4;
+ readsize = 256;
+ ;
+ memory "flash"
+ paged = yes;
+ size = 4096;
+ page_size = 64;
+ num_pages = 64;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " 0 0 0 0 0 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " 0 0 0 0 0 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x x a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x x a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " 0 0 0 0 0 a10 a9 a8",
+ " a7 a6 a5 x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 32;
+ readsize = 256;
+ ;
+# ATtiny45 has Signature Bytes: 0x1E 0x92 0x08. (Data sheet 2586C-AVR-06/05 (doc2586.pdf) indicates otherwise!)
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ memory "lock"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x x x x i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 a0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# ATtiny85
+#------------------------------------------------------------
+
+part
+ id = "t85";
+ desc = "ATtiny85";
+ has_debugwire = yes;
+ flash_instr = 0xB4, 0x02, 0x12;
+ eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
+ 0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC,
+ 0x99, 0xE1, 0xBB, 0xAC;
+## no STK500 devcode in XML file, use the ATtiny45 one
+ stk500_devcode = 0x14;
+## avr910_devcode = ?;
+## Try the AT90S2313 devcode:
+ avr910_devcode = 0x20;
+ signature = 0x1e 0x93 0x0b;
+ reset = io;
+ chip_erase_delay = 400000;
+
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ hvsp_controlstack =
+ 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
+ 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
+ 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
+ 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
+ hventerstabdelay = 100;
+ hvspcmdexedelay = 0;
+ synchcycles = 6;
+ latchcycles = 1;
+ togglevtg = 1;
+ poweroffdelay = 25;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 100;
+ resetdelay = 25;
+ chiperasepolltimeout = 40;
+ chiperasetime = 0;
+ programfusepolltimeout = 25;
+ programlockpolltimeout = 25;
+
+ ocdrev = 1;
+
+ memory "eeprom"
+ size = 512;
+ paged = no;
+ page_size = 4;
+ min_write_delay = 4000;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8",
+ "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
+
+ write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8",
+ "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x x x a8",
+ " a7 a6 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 12;
+ blocksize = 4;
+ readsize = 256;
+ ;
+ memory "flash"
+ paged = yes;
+ size = 8192;
+ page_size = 64;
+ num_pages = 128;
+ min_write_delay = 30000;
+ max_write_delay = 30000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x x a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x x a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 32;
+ readsize = 256;
+ ;
+# ATtiny85 has Signature Bytes: 0x1E 0x93 0x08.
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ memory "lock"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x x x x i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 a0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# ATmega640
+#------------------------------------------------------------
+# Almost same as ATmega1280, except for different memory sizes
+
+part
+ id = "m640";
+ desc = "ATmega640";
+ signature = 0x1e 0x96 0x08;
+ has_jtag = yes;
+# stk500_devcode = 0xB2;
+# avr910_devcode = 0x43;
+ chip_erase_delay = 9000;
+ pagel = 0xD7;
+ bs2 = 0xA0;
+ reset = dedicated;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ idr = 0x31;
+ spmcr = 0x57;
+ rampz = 0x3b;
+ allowfullpagebitstream = no;
+
+ ocdrev = 3;
+
+ memory "eeprom"
+ paged = no; /* leave this "no" */
+ page_size = 8; /* for parallel programming */
+ size = 4096;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0x00;
+ readback_p2 = 0x00;
+ read = " 1 0 1 0 0 0 0 0",
+ " x x x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " x x x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 0 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 10;
+ blocksize = 8;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 65536;
+ page_size = 256;
+ num_pages = 256;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0x00;
+ readback_p2 = 0x00;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " 0 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " 0 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " 0 a14 a13 a12 a11 a10 a9 a8",
+ " a7 x x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 10;
+ blocksize = 256;
+ readsize = 256;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x x i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 x x x x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# ATmega1280
+#------------------------------------------------------------
+
+part
+ id = "m1280";
+ desc = "ATmega1280";
+ signature = 0x1e 0x97 0x03;
+ has_jtag = yes;
+# stk500_devcode = 0xB2;
+# avr910_devcode = 0x43;
+ chip_erase_delay = 9000;
+ pagel = 0xD7;
+ bs2 = 0xA0;
+ reset = dedicated;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ idr = 0x31;
+ spmcr = 0x57;
+ rampz = 0x3b;
+ allowfullpagebitstream = no;
+
+ ocdrev = 3;
+
+ memory "eeprom"
+ paged = no; /* leave this "no" */
+ page_size = 8; /* for parallel programming */
+ size = 4096;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0x00;
+ readback_p2 = 0x00;
+ read = " 1 0 1 0 0 0 0 0",
+ " x x x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " x x x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 0 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 10;
+ blocksize = 8;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 131072;
+ page_size = 256;
+ num_pages = 512;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0x00;
+ readback_p2 = 0x00;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 x x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 10;
+ blocksize = 256;
+ readsize = 256;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x x i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 x x x x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# ATmega1281
+#------------------------------------------------------------
+# Identical to ATmega1280
+
+part parent "m1280"
+ id = "m1281";
+ desc = "ATmega1281";
+ signature = 0x1e 0x97 0x04;
+
+ ocdrev = 3;
+ ;
+
+#------------------------------------------------------------
+# ATmega2560
+#------------------------------------------------------------
+
+part
+ id = "m2560";
+ desc = "ATmega2560";
+ signature = 0x1e 0x98 0x01;
+ has_jtag = yes;
+ stk500_devcode = 0xB2;
+# avr910_devcode = 0x43;
+ chip_erase_delay = 9000;
+ pagel = 0xD7;
+ bs2 = 0xA0;
+ reset = dedicated;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ idr = 0x31;
+ spmcr = 0x57;
+ rampz = 0x3b;
+ allowfullpagebitstream = no;
+
+ ocdrev = 4;
+
+ memory "eeprom"
+ paged = no; /* leave this "no" */
+ page_size = 8; /* for parallel programming */
+ size = 4096;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0x00;
+ readback_p2 = 0x00;
+ read = " 1 0 1 0 0 0 0 0",
+ " x x x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " x x x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 0 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 10;
+ blocksize = 8;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 262144;
+ page_size = 256;
+ num_pages = 1024;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0x00;
+ readback_p2 = 0x00;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 x x x x x x x",
+ " x x x x x x x x";
+
+ load_ext_addr = " 0 1 0 0 1 1 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 0 a16",
+ " 0 0 0 0 0 0 0 0";
+
+ mode = 0x41;
+ delay = 10;
+ blocksize = 256;
+ readsize = 256;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x x i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 x x x x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# ATmega2561
+#------------------------------------------------------------
+
+part parent "m2560"
+ id = "m2561";
+ desc = "ATmega2561";
+ signature = 0x1e 0x98 0x02;
+
+ ocdrev = 4;
+ ;
+
+#------------------------------------------------------------
+# ATmega128RFA1
+#------------------------------------------------------------
+# Identical to ATmega2561 but half the ROM
+
+part parent "m2561"
+ id = "m128rfa1";
+ desc = "ATmega128RFA1";
+ signature = 0x1e 0xa7 0x01;
+ chip_erase_delay = 55000;
+ bs2 = 0xE2;
+
+ ocdrev = 3;
+
+ memory "flash"
+ paged = yes;
+ size = 131072;
+ page_size = 256;
+ num_pages = 512;
+ min_write_delay = 50000;
+ max_write_delay = 50000;
+ readback_p1 = 0x00;
+ readback_p2 = 0x00;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 x x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 20;
+ blocksize = 256;
+ readsize = 256;
+ ;
+ ;
+
+#------------------------------------------------------------
+# ATmega256RFR2
+#------------------------------------------------------------
+
+part parent "m2561"
+ id = "m256rfr2";
+ desc = "ATmega256RFR2";
+ signature = 0x1e 0xa8 0x02;
+ chip_erase_delay = 18500;
+ bs2 = 0xE2;
+
+ memory "eeprom"
+ paged = no; /* leave this "no" */
+ page_size = 8; /* for parallel programming */
+ size = 8192;
+ min_write_delay = 13000;
+ max_write_delay = 13000;
+ readback_p1 = 0x00;
+ readback_p2 = 0x00;
+ read = " 1 0 1 0 0 0 0 0",
+ " x x x a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " x x x a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 0 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 10;
+ blocksize = 8;
+ readsize = 256;
+ ;
+
+
+ ocdrev = 4;
+ ;
+
+#------------------------------------------------------------
+# ATmega128RFR2
+#------------------------------------------------------------
+
+part parent "m128rfa1"
+ id = "m128rfr2";
+ desc = "ATmega128RFR2";
+ signature = 0x1e 0xa7 0x02;
+
+
+ ocdrev = 3;
+ ;
+
+#------------------------------------------------------------
+# ATmega64RFR2
+#------------------------------------------------------------
+
+part parent "m128rfa1"
+ id = "m64rfr2";
+ desc = "ATmega64RFR2";
+ signature = 0x1e 0xa6 0x02;
+
+
+ ocdrev = 3;
+
+ memory "flash"
+ paged = yes;
+ size = 65536;
+ page_size = 256;
+ num_pages = 256;
+ min_write_delay = 50000;
+ max_write_delay = 50000;
+ readback_p1 = 0x00;
+ readback_p2 = 0x00;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " 0 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " 0 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " 0 a14 a13 a12 a11 a10 a9 a8",
+ " a7 x x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 20;
+ blocksize = 256;
+ readsize = 256;
+ ;
+
+ memory "eeprom"
+ paged = no; /* leave this "no" */
+ page_size = 8; /* for parallel programming */
+ size = 2048;
+ min_write_delay = 13000;
+ max_write_delay = 13000;
+ readback_p1 = 0x00;
+ readback_p2 = 0x00;
+ read = " 1 0 1 0 0 0 0 0",
+ " x x x x x a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " x x x x x a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x a10 a9 a8",
+ " a7 a6 a5 a4 a3 0 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 10;
+ blocksize = 8;
+ readsize = 256;
+ ;
+
+
+ ;
+
+#------------------------------------------------------------
+# ATmega2564RFR2
+#------------------------------------------------------------
+
+part parent "m256rfr2"
+ id = "m2564rfr2";
+ desc = "ATmega2564RFR2";
+ signature = 0x1e 0xa8 0x03;
+ ;
+
+#------------------------------------------------------------
+# ATmega1284RFR2
+#------------------------------------------------------------
+
+part parent "m128rfr2"
+ id = "m1284rfr2";
+ desc = "ATmega1284RFR2";
+ signature = 0x1e 0xa7 0x03;
+ ;
+
+#------------------------------------------------------------
+# ATmega644RFR2
+#------------------------------------------------------------
+
+part parent "m64rfr2"
+ id = "m644rfr2";
+ desc = "ATmega644RFR2";
+ signature = 0x1e 0xa6 0x03;
+ ;
+
+#------------------------------------------------------------
+# ATtiny24
+#------------------------------------------------------------
+
+part
+ id = "t24";
+ desc = "ATtiny24";
+ has_debugwire = yes;
+ flash_instr = 0xB4, 0x07, 0x17;
+ eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
+ 0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC,
+ 0x99, 0xE1, 0xBB, 0xAC;
+## no STK500 devcode in XML file, use the ATtiny45 one
+ stk500_devcode = 0x14;
+## avr910_devcode = ?;
+## Try the AT90S2313 devcode:
+ avr910_devcode = 0x20;
+ signature = 0x1e 0x91 0x0b;
+ reset = io;
+ chip_erase_delay = 4500;
+
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ hvsp_controlstack =
+ 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
+ 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
+ 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
+ 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0F;
+ hventerstabdelay = 100;
+ hvspcmdexedelay = 0;
+ synchcycles = 6;
+ latchcycles = 1;
+ togglevtg = 1;
+ poweroffdelay = 25;
+ resetdelayms = 0;
+ resetdelayus = 70;
+ hvleavestabdelay = 100;
+ resetdelay = 25;
+ chiperasepolltimeout = 40;
+ chiperasetime = 0;
+ programfusepolltimeout = 25;
+ programlockpolltimeout = 25;
+
+ ocdrev = 1;
+
+ memory "eeprom"
+ size = 128;
+ paged = no;
+ page_size = 4;
+ min_write_delay = 4000;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x",
+ "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
+
+ write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x",
+ "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x x x x",
+ " x a6 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 4;
+ readsize = 256;
+ ;
+ memory "flash"
+ paged = yes;
+ size = 2048;
+ page_size = 32;
+ num_pages = 64;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " 0 0 0 0 0 0 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " 0 0 0 0 0 0 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x x x a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x x x a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " 0 0 0 0 0 0 a9 a8",
+ " a7 a6 a5 a4 x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 32;
+ readsize = 256;
+ ;
+# ATtiny24 has Signature Bytes: 0x1E 0x91 0x0B.
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ memory "lock"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x x x x x x x i i";
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x x x x i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 a0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# ATtiny44
+#------------------------------------------------------------
+
+part
+ id = "t44";
+ desc = "ATtiny44";
+ has_debugwire = yes;
+ flash_instr = 0xB4, 0x07, 0x17;
+ eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
+ 0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC,
+ 0x99, 0xE1, 0xBB, 0xAC;
+## no STK500 devcode in XML file, use the ATtiny45 one
+ stk500_devcode = 0x14;
+## avr910_devcode = ?;
+## Try the AT90S2313 devcode:
+ avr910_devcode = 0x20;
+ signature = 0x1e 0x92 0x07;
+ reset = io;
+ chip_erase_delay = 4500;
+
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ hvsp_controlstack =
+ 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
+ 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
+ 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
+ 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0F;
+ hventerstabdelay = 100;
+ hvspcmdexedelay = 0;
+ synchcycles = 6;
+ latchcycles = 1;
+ togglevtg = 1;
+ poweroffdelay = 25;
+ resetdelayms = 0;
+ resetdelayus = 70;
+ hvleavestabdelay = 100;
+ resetdelay = 25;
+ chiperasepolltimeout = 40;
+ chiperasetime = 0;
+ programfusepolltimeout = 25;
+ programlockpolltimeout = 25;
+
+ ocdrev = 1;
+
+ memory "eeprom"
+ size = 256;
+ paged = no;
+ page_size = 4;
+ min_write_delay = 4000;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x",
+ "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
+
+ write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x",
+ "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x x x x",
+ " x a6 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 4;
+ readsize = 256;
+ ;
+ memory "flash"
+ paged = yes;
+ size = 4096;
+ page_size = 64;
+ num_pages = 64;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " 0 0 0 0 0 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " 0 0 0 0 0 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x x a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x x a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " 0 0 0 0 0 a10 a9 a8",
+ " a7 a6 a5 x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 32;
+ readsize = 256;
+ ;
+# ATtiny44 has Signature Bytes: 0x1E 0x92 0x07.
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ memory "lock"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x x x x x x x i i";
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x x x x i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 a0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# ATtiny84
+#------------------------------------------------------------
+
+part
+ id = "t84";
+ desc = "ATtiny84";
+ has_debugwire = yes;
+ flash_instr = 0xB4, 0x07, 0x17;
+ eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
+ 0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC,
+ 0x99, 0xE1, 0xBB, 0xAC;
+## no STK500 devcode in XML file, use the ATtiny45 one
+ stk500_devcode = 0x14;
+## avr910_devcode = ?;
+## Try the AT90S2313 devcode:
+ avr910_devcode = 0x20;
+ signature = 0x1e 0x93 0x0c;
+ reset = io;
+ chip_erase_delay = 4500;
+
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ hvsp_controlstack =
+ 0x4C, 0x0C, 0x1C, 0x2C, 0x3C, 0x64, 0x74, 0x66,
+ 0x68, 0x78, 0x68, 0x68, 0x7A, 0x6A, 0x68, 0x78,
+ 0x78, 0x7D, 0x6D, 0x0C, 0x80, 0x40, 0x20, 0x10,
+ 0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0F;
+ hventerstabdelay = 100;
+ hvspcmdexedelay = 0;
+ synchcycles = 6;
+ latchcycles = 1;
+ togglevtg = 1;
+ poweroffdelay = 25;
+ resetdelayms = 0;
+ resetdelayus = 70;
+ hvleavestabdelay = 100;
+ resetdelay = 25;
+ chiperasepolltimeout = 40;
+ chiperasetime = 0;
+ programfusepolltimeout = 25;
+ programlockpolltimeout = 25;
+
+ ocdrev = 1;
+
+ memory "eeprom"
+ size = 512;
+ paged = no;
+ page_size = 4;
+ min_write_delay = 4000;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = "1 0 1 0 0 0 0 0 0 0 0 x x x x a8",
+ "a7 a6 a5 a4 a3 a2 a1 a0 o o o o o o o o";
+
+ write = "1 1 0 0 0 0 0 0 0 0 0 x x x x a8",
+ "a7 a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x x x x",
+ " x a6 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 4;
+ readsize = 256;
+ ;
+ memory "flash"
+ paged = yes;
+ size = 8192;
+ page_size = 64;
+ num_pages = 128;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x x a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x x a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 32;
+ readsize = 256;
+ ;
+# ATtiny84 has Signature Bytes: 0x1E 0x93 0x0C.
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+
+ memory "lock"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x x x x x x x i i";
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x x x x i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 a0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# ATtiny43U
+#------------------------------------------------------------
+
+part
+ id = "t43u";
+ desc = "ATtiny43u";
+ has_debugwire = yes;
+ flash_instr = 0xB4, 0x07, 0x17;
+ eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D,
+ 0xBC, 0x07, 0xB4, 0x07, 0xBA, 0x0D, 0xBB, 0xBC,
+ 0x99, 0xE1, 0xBB, 0xAC;
+ stk500_devcode = 0x14;
+## avr910_devcode = ?;
+## Try the AT90S2313 devcode:
+ avr910_devcode = 0x20;
+ signature = 0x1e 0x92 0x0C;
+ reset = io;
+ chip_erase_delay = 1000;
+
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+ pp_controlstack = 0x0E, 0x1E, 0x0E, 0x1E, 0x2E, 0x3E, 0x2E, 0x3E, 0x4E, 0x5E,
+ 0x4E, 0x5E, 0x6E, 0x7E, 0x6E, 0x7E, 0x06, 0x16, 0x46, 0x56,
+ 0x0A, 0x1A, 0x4A, 0x5A, 0x1E, 0x7C, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ hvspcmdexedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 20;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ resetdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+ memory "eeprom"
+ size = 64;
+ paged = yes;
+ page_size = 4;
+ num_pages = 16;
+ min_write_delay = 4000;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x",
+ "0 0 a4 a3 a2 a1 a0 o o o o o o o o";
+
+ write = "1 1 0 0 0 0 0 0 0 0 0 x x x x x",
+ "0 0 a5 a4 a3 a2 a1 a0 i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x x x x",
+ " 0 0 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 5;
+ blocksize = 4;
+ readsize = 256;
+ ;
+ memory "flash"
+ paged = yes;
+ size = 4096;
+ page_size = 64;
+ num_pages = 64;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " 0 0 0 0 0 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " 0 0 0 0 0 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x x a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x x a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " 0 0 0 0 0 a10 a9 a8",
+ " a7 a6 a5 x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 10;
+ blocksize = 64;
+ readsize = 256;
+ ;
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ memory "lock"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ ;
+
+ memory "efuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x x x x i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ ;
+
+ memory "calibration"
+ size = 2;
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 a0 o o o o o o o o";
+ ;
+;
+
+#------------------------------------------------------------
+# ATmega32u4
+#------------------------------------------------------------
+
+part
+ id = "m32u4";
+ desc = "ATmega32U4";
+ signature = 0x1e 0x95 0x87;
+ usbpid = 0x2ff4;
+ has_jtag = yes;
+# stk500_devcode = 0xB2;
+# avr910_devcode = 0x43;
+ chip_erase_delay = 9000;
+ pagel = 0xD7;
+ bs2 = 0xA0;
+ reset = dedicated;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ idr = 0x31;
+ spmcr = 0x57;
+ rampz = 0x3b;
+ allowfullpagebitstream = no;
+
+ ocdrev = 3;
+
+ memory "eeprom"
+ paged = no; /* leave this "no" */
+ page_size = 4; /* for parallel programming */
+ size = 1024;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0x00;
+ readback_p2 = 0x00;
+ read = " 1 0 1 0 0 0 0 0",
+ " x x x x x a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " x x x x x a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x a10 a9 a8",
+ " a7 a6 a5 a4 a3 0 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 20;
+ blocksize = 4;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 32768;
+ page_size = 128;
+ num_pages = 256;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0x00;
+ readback_p2 = 0x00;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " 0 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " 0 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 128;
+ readsize = 256;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 x x x x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# AT90USB646
+#------------------------------------------------------------
+
+part
+ id = "usb646";
+ desc = "AT90USB646";
+ signature = 0x1e 0x96 0x82;
+ usbpid = 0x2ff9;
+ has_jtag = yes;
+# stk500_devcode = 0xB2;
+# avr910_devcode = 0x43;
+ chip_erase_delay = 9000;
+ pagel = 0xD7;
+ bs2 = 0xA0;
+ reset = dedicated;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ idr = 0x31;
+ spmcr = 0x57;
+ rampz = 0x3b;
+ allowfullpagebitstream = no;
+
+ ocdrev = 3;
+
+ memory "eeprom"
+ paged = no; /* leave this "no" */
+ page_size = 8; /* for parallel programming */
+ size = 2048;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0x00;
+ readback_p2 = 0x00;
+ read = " 1 0 1 0 0 0 0 0",
+ " x x x x x a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " x x x x x a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x a10 a9 a8",
+ " a7 a6 a5 a4 a3 0 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 10;
+ blocksize = 8;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 65536;
+ page_size = 256;
+ num_pages = 256;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0x00;
+ readback_p2 = 0x00;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " 0 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " 0 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " 0 a14 a13 a12 a11 a10 a9 a8",
+ " a7 x x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 256;
+ readsize = 256;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 x x x x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# AT90USB647
+#------------------------------------------------------------
+# identical to AT90USB646
+
+part parent "usb646"
+ id = "usb647";
+ desc = "AT90USB647";
+ signature = 0x1e 0x96 0x82;
+
+ ocdrev = 3;
+ ;
+
+#------------------------------------------------------------
+# AT90USB1286
+#------------------------------------------------------------
+
+part
+ id = "usb1286";
+ desc = "AT90USB1286";
+ signature = 0x1e 0x97 0x82;
+ usbpid = 0x2ffb;
+ has_jtag = yes;
+# stk500_devcode = 0xB2;
+# avr910_devcode = 0x43;
+ chip_erase_delay = 9000;
+ pagel = 0xD7;
+ bs2 = 0xA0;
+ reset = dedicated;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ idr = 0x31;
+ spmcr = 0x57;
+ rampz = 0x3b;
+ allowfullpagebitstream = no;
+
+ ocdrev = 3;
+
+ memory "eeprom"
+ paged = no; /* leave this "no" */
+ page_size = 8; /* for parallel programming */
+ size = 4096;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0x00;
+ readback_p2 = 0x00;
+ read = " 1 0 1 0 0 0 0 0",
+ " x x x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " x x x x a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x a10 a9 a8",
+ " a7 a6 a5 a4 a3 0 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 10;
+ blocksize = 8;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 131072;
+ page_size = 256;
+ num_pages = 512;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0x00;
+ readback_p2 = 0x00;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x x x",
+ " x a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 x x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 256;
+ readsize = 256;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x x i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 x x x x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 x x x x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# AT90USB1287
+#------------------------------------------------------------
+# identical to AT90USB1286
+
+part parent "usb1286"
+ id = "usb1287";
+ desc = "AT90USB1287";
+ signature = 0x1e 0x97 0x82;
+
+ ocdrev = 3;
+ ;
+
+#------------------------------------------------------------
+# AT90USB162
+#------------------------------------------------------------
+
+part
+ id = "usb162";
+ desc = "AT90USB162";
+ has_jtag = no;
+ has_debugwire = yes;
+ signature = 0x1e 0x94 0x82;
+ usbpid = 0x2ffa;
+ chip_erase_delay = 9000;
+ reset = io;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+ pagel = 0xD7;
+ bs2 = 0xC6;
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ ocdrev = 1;
+
+ memory "eeprom"
+ paged = no; /* leave this "no" */
+ page_size = 4; /* for parallel programming */
+ size = 512;
+ num_pages = 128;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0x00;
+ readback_p2 = 0x00;
+ read = " 1 0 1 0 0 0 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 20;
+ blocksize = 4;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 16384;
+ page_size = 128;
+ num_pages = 128;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0x00;
+ readback_p2 = 0x00;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 128;
+ readsize = 256;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# AT90USB82
+#------------------------------------------------------------
+# Changes against AT90USB162 (beside IDs)
+# memory "flash"
+# size = 8192;
+# num_pages = 64;
+
+part
+ id = "usb82";
+ desc = "AT90USB82";
+ has_jtag = no;
+ has_debugwire = yes;
+ signature = 0x1e 0x93 0x82;
+ usbpid = 0x2ff7;
+ chip_erase_delay = 9000;
+ reset = io;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+ pagel = 0xD7;
+ bs2 = 0xC6;
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ ocdrev = 1;
+
+ memory "eeprom"
+ paged = no; /* leave this "no" */
+ page_size = 4; /* for parallel programming */
+ size = 512;
+ num_pages = 128;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0x00;
+ readback_p2 = 0x00;
+ read = " 1 0 1 0 0 0 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 20;
+ blocksize = 4;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 8192;
+ page_size = 128;
+ num_pages = 64;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0x00;
+ readback_p2 = 0x00;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 128;
+ readsize = 256;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# ATmega32U2
+#------------------------------------------------------------
+# Changes against AT90USB162 (beside IDs)
+# memory "flash"
+# size = 32768;
+# num_pages = 256;
+# memory "eeprom"
+# size = 1024;
+# num_pages = 256;
+part
+ id = "m32u2";
+ desc = "ATmega32U2";
+ has_jtag = no;
+ has_debugwire = yes;
+ signature = 0x1e 0x95 0x8a;
+ usbpid = 0x2ff0;
+ chip_erase_delay = 9000;
+ reset = io;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+ pagel = 0xD7;
+ bs2 = 0xC6;
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ ocdrev = 1;
+
+ memory "eeprom"
+ paged = no; /* leave this "no" */
+ page_size = 4; /* for parallel programming */
+ size = 1024;
+ num_pages = 256;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0x00;
+ readback_p2 = 0x00;
+ read = " 1 0 1 0 0 0 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 20;
+ blocksize = 4;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 32768;
+ page_size = 128;
+ num_pages = 256;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0x00;
+ readback_p2 = 0x00;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 128;
+ readsize = 256;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ ;
+#------------------------------------------------------------
+# ATmega16U2
+#------------------------------------------------------------
+# Changes against ATmega32U2 (beside IDs)
+# memory "flash"
+# size = 16384;
+# num_pages = 128;
+# memory "eeprom"
+# size = 512;
+# num_pages = 128;
+part
+ id = "m16u2";
+ desc = "ATmega16U2";
+ has_jtag = no;
+ has_debugwire = yes;
+ signature = 0x1e 0x94 0x89;
+ usbpid = 0x2fef;
+ chip_erase_delay = 9000;
+ reset = io;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+ pagel = 0xD7;
+ bs2 = 0xC6;
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ ocdrev = 1;
+
+ memory "eeprom"
+ paged = no; /* leave this "no" */
+ page_size = 4; /* for parallel programming */
+ size = 512;
+ num_pages = 128;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0x00;
+ readback_p2 = 0x00;
+ read = " 1 0 1 0 0 0 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 20;
+ blocksize = 4;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 16384;
+ page_size = 128;
+ num_pages = 128;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0x00;
+ readback_p2 = 0x00;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 128;
+ readsize = 256;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# ATmega8U2
+#------------------------------------------------------------
+# Changes against ATmega16U2 (beside IDs)
+# memory "flash"
+# size = 8192;
+# page_size = 64;
+# blocksize = 64;
+
+part
+ id = "m8u2";
+ desc = "ATmega8U2";
+ has_jtag = no;
+ has_debugwire = yes;
+ signature = 0x1e 0x93 0x89;
+ usbpid = 0x2fee;
+ chip_erase_delay = 9000;
+ reset = io;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+ pagel = 0xD7;
+ bs2 = 0xC6;
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ ocdrev = 1;
+
+ memory "eeprom"
+ paged = no; /* leave this "no" */
+ page_size = 4; /* for parallel programming */
+ size = 512;
+ num_pages = 128;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0x00;
+ readback_p2 = 0x00;
+ read = " 1 0 1 0 0 0 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 0 0 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 20;
+ blocksize = 4;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 8192;
+ page_size = 128;
+ num_pages = 64;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0x00;
+ readback_p2 = 0x00;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " x x x x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " x x x x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ "a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 128;
+ readsize = 256;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x i i i i i i i i";
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+ ;
+#------------------------------------------------------------
+# ATmega325
+#------------------------------------------------------------
+
+part
+ id = "m325";
+ desc = "ATmega325";
+ signature = 0x1e 0x95 0x05;
+ has_jtag = yes;
+# stk500_devcode = 0x??; # No STK500v1 support?
+# avr910_devcode = 0x??; # Try the ATmega16 one
+ avr910_devcode = 0x74;
+ pagel = 0xd7;
+ bs2 = 0xa0;
+ chip_erase_delay = 9000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
+ "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ idr = 0x31;
+ spmcr = 0x57;
+ allowfullpagebitstream = no;
+
+ ocdrev = 3;
+
+ memory "eeprom"
+ paged = no; /* leave this "no" */
+ page_size = 4; /* for parallel programming */
+ size = 1024;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = " 1 0 1 0 0 0 0 0",
+ " 0 0 0 0 0 0 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 0 0 0 0 a9 a8",
+ " a7 a6 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 10;
+ blocksize = 4;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 32768;
+ page_size = 128;
+ num_pages = 256;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " 0 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " 0 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 0 0",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 0 0 0 0 0 0",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " 0 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 10;
+ blocksize = 128;
+ readsize = 256;
+ ;
+
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 0 0 0 0 0",
+ "0 0 0 0 0 0 0 0 1 1 i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "0 0 0 0 0 0 0 0 i i i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "0 0 0 0 0 0 0 0 i i i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "0 0 0 0 0 0 0 0 1 1 1 1 1 i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "0 0 0 0 0 0 a1 a0 o o o o o o o o";
+ ;
+
+ memory "calibration"
+ size = 1;
+
+ read = "0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# ATmega645
+#------------------------------------------------------------
+
+part
+ id = "m645";
+ desc = "ATmega645";
+ signature = 0x1E 0x96 0x05;
+ has_jtag = yes;
+# stk500_devcode = 0x??; # No STK500v1 support?
+# avr910_devcode = 0x??; # Try the ATmega16 one
+ avr910_devcode = 0x74;
+ pagel = 0xd7;
+ bs2 = 0xa0;
+ chip_erase_delay = 9000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0",
+ "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
+ 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
+ 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
+ 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 5;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ idr = 0x31;
+ spmcr = 0x57;
+ allowfullpagebitstream = no;
+
+ ocdrev = 3;
+
+ memory "eeprom"
+ paged = no; /* leave this "no" */
+ page_size = 8; /* for parallel programming */
+ size = 2048;
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = " 1 0 1 0 0 0 0 0",
+ " 0 0 0 0 0 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " 0 0 0 0 0 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 0 0 0 a10 a9 a8",
+ " a7 a6 a5 a4 a3 0 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 10;
+ blocksize = 8;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 65536;
+ page_size = 256;
+ num_pages = 256;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 0 0",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 0 0 0 0 0 0",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " a15 a14 a13 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " 0 0 0 0 0 0 0 0";
+
+ mode = 0x41;
+ delay = 10;
+ blocksize = 128;
+ readsize = 256;
+ ;
+
+ memory "lock"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 0 0 0 0 0",
+ "0 0 0 0 0 0 0 0 1 1 i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "0 0 0 0 0 0 0 0 i i i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "0 0 0 0 0 0 0 0 i i i i i i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "efuse"
+ size = 1;
+
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "0 0 0 0 0 0 0 0 1 1 1 1 1 i i i";
+ min_write_delay = 9000;
+ max_write_delay = 9000;
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "0 0 0 0 0 0 a1 a0 o o o o o o o o";
+ ;
+
+ memory "calibration"
+ size = 1;
+
+ read = "0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+ ;
+
+#------------------------------------------------------------
+# ATmega3250
+#------------------------------------------------------------
+
+part parent "m325"
+ id = "m3250";
+ desc = "ATmega3250";
+ signature = 0x1E 0x95 0x06;
+
+ ocdrev = 3;
+ ;
+
+#------------------------------------------------------------
+# ATmega6450
+#------------------------------------------------------------
+
+part parent "m645"
+ id = "m6450";
+ desc = "ATmega6450";
+ signature = 0x1E 0x96 0x06;
+
+ ocdrev = 3;
+ ;
+
+#------------------------------------------------------------
+# AVR XMEGA family common values
+#------------------------------------------------------------
+
+part
+ id = ".xmega";
+ desc = "AVR XMEGA family common values";
+ has_pdi = yes;
+ nvm_base = 0x01c0;
+ mcu_base = 0x0090;
+
+ memory "signature"
+ size = 3;
+ offset = 0x1000090;
+ ;
+
+ memory "prodsig"
+ size = 0x32;
+ offset = 0x8e0200;
+ page_size = 0x32;
+ readsize = 0x32;
+ ;
+
+ memory "fuse1"
+ size = 1;
+ offset = 0x8f0021;
+ ;
+
+ memory "fuse2"
+ size = 1;
+ offset = 0x8f0022;
+ ;
+
+ memory "fuse4"
+ size = 1;
+ offset = 0x8f0024;
+ ;
+
+ memory "fuse5"
+ size = 1;
+ offset = 0x8f0025;
+ ;
+
+ memory "lock"
+ size = 1;
+ offset = 0x8f0027;
+ ;
+
+ memory "data"
+ # SRAM, only used to supply the offset
+ offset = 0x1000000;
+ ;
+;
+
+#------------------------------------------------------------
+# ATxmega16A4U
+#------------------------------------------------------------
+
+part parent ".xmega"
+ id = "x16a4u";
+ desc = "ATxmega16A4U";
+ signature = 0x1e 0x94 0x41;
+ usbpid = 0x2fe3;
+
+ memory "eeprom"
+ size = 0x400;
+ offset = 0x8c0000;
+ page_size = 0x20;
+ readsize = 0x100;
+ ;
+
+ memory "application"
+ size = 0x4000;
+ offset = 0x800000;
+ page_size = 0x100;
+ readsize = 0x100;
+ ;
+
+ memory "apptable"
+ size = 0x1000;
+ offset = 0x803000;
+ page_size = 0x100;
+ readsize = 0x100;
+ ;
+
+ memory "boot"
+ size = 0x1000;
+ offset = 0x804000;
+ page_size = 0x100;
+ readsize = 0x100;
+ ;
+
+ memory "flash"
+ size = 0x5000;
+ offset = 0x800000;
+ page_size = 0x100;
+ readsize = 0x100;
+ ;
+
+ memory "usersig"
+ size = 0x100;
+ offset = 0x8e0400;
+ page_size = 0x100;
+ readsize = 0x100;
+ ;
+;
+
+#------------------------------------------------------------
+# ATxmega16C4
+#------------------------------------------------------------
+
+part parent "x16a4u"
+ id = "x16c4";
+ desc = "ATxmega16C4";
+ signature = 0x1e 0x95 0x44;
+;
+
+#------------------------------------------------------------
+# ATxmega16D4
+#------------------------------------------------------------
+
+part parent "x16a4u"
+ id = "x16d4";
+ desc = "ATxmega16D4";
+ signature = 0x1e 0x94 0x42;
+;
+
+#------------------------------------------------------------
+# ATxmega16A4
+#------------------------------------------------------------
+
+part parent "x16a4u"
+ id = "x16a4";
+ desc = "ATxmega16A4";
+ signature = 0x1e 0x94 0x41;
+ has_jtag = yes;
+
+ memory "fuse0"
+ size = 1;
+ offset = 0x8f0020;
+ ;
+;
+
+#------------------------------------------------------------
+# ATxmega32A4U
+#------------------------------------------------------------
+
+part parent ".xmega"
+ id = "x32a4u";
+ desc = "ATxmega32A4U";
+ signature = 0x1e 0x95 0x41;
+ usbpid = 0x2fe4;
+
+ memory "eeprom"
+ size = 0x400;
+ offset = 0x8c0000;
+ page_size = 0x20;
+ readsize = 0x100;
+ ;
+
+ memory "application"
+ size = 0x8000;
+ offset = 0x800000;
+ page_size = 0x100;
+ readsize = 0x100;
+ ;
+
+ memory "apptable"
+ size = 0x1000;
+ offset = 0x807000;
+ page_size = 0x100;
+ readsize = 0x100;
+ ;
+
+ memory "boot"
+ size = 0x1000;
+ offset = 0x808000;
+ page_size = 0x100;
+ readsize = 0x100;
+ ;
+
+ memory "flash"
+ size = 0x9000;
+ offset = 0x800000;
+ page_size = 0x100;
+ readsize = 0x100;
+ ;
+
+ memory "usersig"
+ size = 0x100;
+ offset = 0x8e0400;
+ page_size = 0x100;
+ readsize = 0x100;
+ ;
+;
+
+#------------------------------------------------------------
+# ATxmega32C4
+#------------------------------------------------------------
+
+part parent "x32a4u"
+ id = "x32c4";
+ desc = "ATxmega32C4";
+ signature = 0x1e 0x94 0x43;
+;
+
+#------------------------------------------------------------
+# ATxmega32D4
+#------------------------------------------------------------
+
+part parent "x32a4u"
+ id = "x32d4";
+ desc = "ATxmega32D4";
+ signature = 0x1e 0x95 0x42;
+;
+
+#------------------------------------------------------------
+# ATxmega32A4
+#------------------------------------------------------------
+
+part parent "x32a4u"
+ id = "x32a4";
+ desc = "ATxmega32A4";
+ signature = 0x1e 0x95 0x41;
+ has_jtag = yes;
+
+ memory "fuse0"
+ size = 1;
+ offset = 0x8f0020;
+ ;
+;
+
+#------------------------------------------------------------
+# ATxmega64A4U
+#------------------------------------------------------------
+
+part parent ".xmega"
+ id = "x64a4u";
+ desc = "ATxmega64A4U";
+ signature = 0x1e 0x96 0x46;
+ usbpid = 0x2fe5;
+
+ memory "eeprom"
+ size = 0x800;
+ offset = 0x8c0000;
+ page_size = 0x20;
+ readsize = 0x100;
+ ;
+
+ memory "application"
+ size = 0x10000;
+ offset = 0x800000;
+ page_size = 0x100;
+ readsize = 0x100;
+ ;
+
+ memory "apptable"
+ size = 0x1000;
+ offset = 0x80f000;
+ page_size = 0x100;
+ readsize = 0x100;
+ ;
+
+ memory "boot"
+ size = 0x1000;
+ offset = 0x810000;
+ page_size = 0x100;
+ readsize = 0x100;
+ ;
+
+ memory "flash"
+ size = 0x11000;
+ offset = 0x800000;
+ page_size = 0x100;
+ readsize = 0x100;
+ ;
+
+ memory "usersig"
+ size = 0x100;
+ offset = 0x8e0400;
+ page_size = 0x100;
+ readsize = 0x100;
+ ;
+;
+
+#------------------------------------------------------------
+# ATxmega64C3
+#------------------------------------------------------------
+
+part parent "x64a4u"
+ id = "x64c3";
+ desc = "ATxmega64C3";
+ signature = 0x1e 0x96 0x49;
+ usbpid = 0x2fd6;
+;
+
+#------------------------------------------------------------
+# ATxmega64D3
+#------------------------------------------------------------
+
+part parent "x64a4u"
+ id = "x64d3";
+ desc = "ATxmega64D3";
+ signature = 0x1e 0x96 0x4a;
+;
+
+#------------------------------------------------------------
+# ATxmega64D4
+#------------------------------------------------------------
+
+part parent "x64a4u"
+ id = "x64d4";
+ desc = "ATxmega64D4";
+ signature = 0x1e 0x96 0x47;
+;
+
+#------------------------------------------------------------
+# ATxmega64A1
+#------------------------------------------------------------
+
+part parent "x64a4u"
+ id = "x64a1";
+ desc = "ATxmega64A1";
+ signature = 0x1e 0x96 0x4e;
+ has_jtag = yes;
+
+ memory "fuse0"
+ size = 1;
+ offset = 0x8f0020;
+ ;
+;
+
+#------------------------------------------------------------
+# ATxmega64A1U
+#------------------------------------------------------------
+
+part parent "x64a1"
+ id = "x64a1u";
+ desc = "ATxmega64A1U";
+ signature = 0x1e 0x96 0x4e;
+ usbpid = 0x2fe8;
+;
+
+#------------------------------------------------------------
+# ATxmega64A3
+#------------------------------------------------------------
+
+part parent "x64a1"
+ id = "x64a3";
+ desc = "ATxmega64A3";
+ signature = 0x1e 0x96 0x42;
+;
+
+#------------------------------------------------------------
+# ATxmega64A3U
+#------------------------------------------------------------
+
+part parent "x64a1"
+ id = "x64a3u";
+ desc = "ATxmega64A3U";
+ signature = 0x1e 0x96 0x42;
+ usbpid = 0x2fe5;
+;
+
+#------------------------------------------------------------
+# ATxmega64A4
+#------------------------------------------------------------
+
+part parent "x64a1"
+ id = "x64a4";
+ desc = "ATxmega64A4";
+ signature = 0x1e 0x96 0x46;
+;
+
+#------------------------------------------------------------
+# ATxmega64B1
+#------------------------------------------------------------
+
+part parent "x64a1"
+ id = "x64b1";
+ desc = "ATxmega64B1";
+ signature = 0x1e 0x96 0x52;
+ usbpid = 0x2fe1;
+;
+
+#------------------------------------------------------------
+# ATxmega64B3
+#------------------------------------------------------------
+
+part parent "x64a1"
+ id = "x64b3";
+ desc = "ATxmega64B3";
+ signature = 0x1e 0x96 0x51;
+ usbpid = 0x2fdf;
+;
+
+#------------------------------------------------------------
+# ATxmega128C3
+#------------------------------------------------------------
+
+part parent ".xmega"
+ id = "x128c3";
+ desc = "ATxmega128C3";
+ signature = 0x1e 0x97 0x52;
+ usbpid = 0x2fd7;
+
+ memory "eeprom"
+ size = 0x800;
+ offset = 0x8c0000;
+ page_size = 0x20;
+ readsize = 0x100;
+ ;
+
+ memory "application"
+ size = 0x20000;
+ offset = 0x800000;
+ page_size = 0x200;
+ readsize = 0x100;
+ ;
+
+ memory "apptable"
+ size = 0x2000;
+ offset = 0x81e000;
+ page_size = 0x200;
+ readsize = 0x100;
+ ;
+
+ memory "boot"
+ size = 0x2000;
+ offset = 0x820000;
+ page_size = 0x200;
+ readsize = 0x100;
+ ;
+
+ memory "flash"
+ size = 0x22000;
+ offset = 0x800000;
+ page_size = 0x200;
+ readsize = 0x100;
+ ;
+
+ memory "usersig"
+ size = 0x200;
+ offset = 0x8e0400;
+ page_size = 0x200;
+ readsize = 0x100;
+ ;
+;
+
+#------------------------------------------------------------
+# ATxmega128D3
+#------------------------------------------------------------
+
+part parent "x128c3"
+ id = "x128d3";
+ desc = "ATxmega128D3";
+ signature = 0x1e 0x97 0x48;
+;
+
+#------------------------------------------------------------
+# ATxmega128D4
+#------------------------------------------------------------
+
+part parent "x128c3"
+ id = "x128d4";
+ desc = "ATxmega128D4";
+ signature = 0x1e 0x97 0x47;
+;
+
+#------------------------------------------------------------
+# ATxmega128A1
+#------------------------------------------------------------
+
+part parent "x128c3"
+ id = "x128a1";
+ desc = "ATxmega128A1";
+ signature = 0x1e 0x97 0x4c;
+ has_jtag = yes;
+
+ memory "fuse0"
+ size = 1;
+ offset = 0x8f0020;
+ ;
+;
+
+#------------------------------------------------------------
+# ATxmega128A1 revision D
+#------------------------------------------------------------
+
+part parent "x128a1"
+ id = "x128a1d";
+ desc = "ATxmega128A1revD";
+ signature = 0x1e 0x97 0x41;
+;
+
+#------------------------------------------------------------
+# ATxmega128A1U
+#------------------------------------------------------------
+
+part parent "x128a1"
+ id = "x128a1u";
+ desc = "ATxmega128A1U";
+ signature = 0x1e 0x97 0x4c;
+ usbpid = 0x2fed;
+;
+
+#------------------------------------------------------------
+# ATxmega128A3
+#------------------------------------------------------------
+
+part parent "x128a1"
+ id = "x128a3";
+ desc = "ATxmega128A3";
+ signature = 0x1e 0x97 0x42;
+;
+
+#------------------------------------------------------------
+# ATxmega128A3U
+#------------------------------------------------------------
+
+part parent "x128a1"
+ id = "x128a3u";
+ desc = "ATxmega128A3U";
+ signature = 0x1e 0x97 0x42;
+ usbpid = 0x2fe6;
+;
+
+#------------------------------------------------------------
+# ATxmega128A4
+#------------------------------------------------------------
+
+part parent ".xmega"
+ id = "x128a4";
+ desc = "ATxmega128A4";
+ signature = 0x1e 0x97 0x46;
+ has_jtag = yes;
+
+ memory "eeprom"
+ size = 0x800;
+ offset = 0x8c0000;
+ page_size = 0x20;
+ readsize = 0x100;
+ ;
+
+ memory "application"
+ size = 0x20000;
+ offset = 0x800000;
+ page_size = 0x200;
+ readsize = 0x100;
+ ;
+
+ memory "apptable"
+ size = 0x1000;
+ offset = 0x81f000;
+ page_size = 0x200;
+ readsize = 0x100;
+ ;
+
+ memory "boot"
+ size = 0x2000;
+ offset = 0x820000;
+ page_size = 0x200;
+ readsize = 0x100;
+ ;
+
+ memory "flash"
+ size = 0x22000;
+ offset = 0x800000;
+ page_size = 0x200;
+ readsize = 0x100;
+ ;
+
+ memory "usersig"
+ size = 0x200;
+ offset = 0x8e0400;
+ page_size = 0x200;
+ readsize = 0x100;
+ ;
+
+ memory "fuse0"
+ size = 1;
+ offset = 0x8f0020;
+ ;
+;
+
+#------------------------------------------------------------
+# ATxmega128A4U
+#------------------------------------------------------------
+
+part parent ".xmega"
+ id = "x128a4u";
+ desc = "ATxmega128A4U";
+ signature = 0x1e 0x97 0x46;
+ usbpid = 0x2fde;
+
+ memory "eeprom"
+ size = 0x800;
+ offset = 0x8c0000;
+ page_size = 0x20;
+ readsize = 0x100;
+ ;
+
+ memory "application"
+ size = 0x20000;
+ offset = 0x800000;
+ page_size = 0x100;
+ readsize = 0x100;
+ ;
+
+ memory "apptable"
+ size = 0x1000;
+ offset = 0x81f000;
+ page_size = 0x100;
+ readsize = 0x100;
+ ;
+
+ memory "boot"
+ size = 0x2000;
+ offset = 0x820000;
+ page_size = 0x100;
+ readsize = 0x100;
+ ;
+
+ memory "flash"
+ size = 0x22000;
+ offset = 0x800000;
+ page_size = 0x100;
+ readsize = 0x100;
+ ;
+
+ memory "usersig"
+ size = 0x100;
+ offset = 0x8e0400;
+ page_size = 0x100;
+ readsize = 0x100;
+ ;
+;
+
+#------------------------------------------------------------
+# ATxmega128B1
+#------------------------------------------------------------
+
+part parent ".xmega"
+ id = "x128b1";
+ desc = "ATxmega128B1";
+ signature = 0x1e 0x97 0x4d;
+ usbpid = 0x2fea;
+ has_jtag = yes;
+
+ memory "eeprom"
+ size = 0x800;
+ offset = 0x8c0000;
+ page_size = 0x20;
+ readsize = 0x100;
+ ;
+
+ memory "application"
+ size = 0x20000;
+ offset = 0x800000;
+ page_size = 0x100;
+ readsize = 0x100;
+ ;
+
+ memory "apptable"
+ size = 0x2000;
+ offset = 0x81e000;
+ page_size = 0x100;
+ readsize = 0x100;
+ ;
+
+ memory "boot"
+ size = 0x2000;
+ offset = 0x820000;
+ page_size = 0x100;
+ readsize = 0x100;
+ ;
+
+ memory "flash"
+ size = 0x22000;
+ offset = 0x800000;
+ page_size = 0x100;
+ readsize = 0x100;
+ ;
+
+ memory "usersig"
+ size = 0x100;
+ offset = 0x8e0400;
+ page_size = 0x100;
+ readsize = 0x100;
+ ;
+
+ memory "fuse0"
+ size = 1;
+ offset = 0x8f0020;
+ ;
+;
+
+#------------------------------------------------------------
+# ATxmega128B3
+#------------------------------------------------------------
+
+part parent "x128b1"
+ id = "x128b3";
+ desc = "ATxmega128B3";
+ signature = 0x1e 0x97 0x4b;
+ usbpid = 0x2fe0;
+;
+
+#------------------------------------------------------------
+# ATxmega192C3
+#------------------------------------------------------------
+
+part parent ".xmega"
+ id = "x192c3";
+ desc = "ATxmega192C3";
+ signature = 0x1e 0x97 0x51;
+ # usbpid = 0x2f??;
+
+ memory "eeprom"
+ size = 0x800;
+ offset = 0x8c0000;
+ page_size = 0x20;
+ readsize = 0x100;
+ ;
+
+ memory "application"
+ size = 0x30000;
+ offset = 0x800000;
+ page_size = 0x200;
+ readsize = 0x100;
+ ;
+
+ memory "apptable"
+ size = 0x2000;
+ offset = 0x82e000;
+ page_size = 0x200;
+ readsize = 0x100;
+ ;
+
+ memory "boot"
+ size = 0x2000;
+ offset = 0x830000;
+ page_size = 0x200;
+ readsize = 0x100;
+ ;
+
+ memory "flash"
+ size = 0x32000;
+ offset = 0x800000;
+ page_size = 0x200;
+ readsize = 0x100;
+ ;
+
+ memory "usersig"
+ size = 0x200;
+ offset = 0x8e0400;
+ page_size = 0x200;
+ readsize = 0x100;
+ ;
+;
+
+#------------------------------------------------------------
+# ATxmega192D3
+#------------------------------------------------------------
+
+part parent "x192c3"
+ id = "x192d3";
+ desc = "ATxmega192D3";
+ signature = 0x1e 0x97 0x49;
+;
+
+#------------------------------------------------------------
+# ATxmega192A1
+#------------------------------------------------------------
+
+part parent "x192c3"
+ id = "x192a1";
+ desc = "ATxmega192A1";
+ signature = 0x1e 0x97 0x4e;
+ has_jtag = yes;
+
+ memory "fuse0"
+ size = 1;
+ offset = 0x8f0020;
+ ;
+;
+
+#------------------------------------------------------------
+# ATxmega192A3
+#------------------------------------------------------------
+
+part parent "x192a1"
+ id = "x192a3";
+ desc = "ATxmega192A3";
+ signature = 0x1e 0x97 0x44;
+;
+
+#------------------------------------------------------------
+# ATxmega192A3U
+#------------------------------------------------------------
+
+part parent "x192a1"
+ id = "x192a3u";
+ desc = "ATxmega192A3U";
+ signature = 0x1e 0x97 0x44;
+ usbpid = 0x2fe7;
+;
+
+#------------------------------------------------------------
+# ATxmega256C3
+#------------------------------------------------------------
+
+part parent ".xmega"
+ id = "x256c3";
+ desc = "ATxmega256C3";
+ signature = 0x1e 0x98 0x46;
+ usbpid = 0x2fda;
+
+ memory "eeprom"
+ size = 0x1000;
+ offset = 0x8c0000;
+ page_size = 0x20;
+ readsize = 0x100;
+ ;
+
+ memory "application"
+ size = 0x40000;
+ offset = 0x800000;
+ page_size = 0x200;
+ readsize = 0x100;
+ ;
+
+ memory "apptable"
+ size = 0x2000;
+ offset = 0x83e000;
+ page_size = 0x200;
+ readsize = 0x100;
+ ;
+
+ memory "boot"
+ size = 0x2000;
+ offset = 0x840000;
+ page_size = 0x200;
+ readsize = 0x100;
+ ;
+
+ memory "flash"
+ size = 0x42000;
+ offset = 0x800000;
+ page_size = 0x200;
+ readsize = 0x100;
+ ;
+
+ memory "usersig"
+ size = 0x200;
+ offset = 0x8e0400;
+ page_size = 0x200;
+ readsize = 0x100;
+ ;
+;
+
+#------------------------------------------------------------
+# ATxmega256D3
+#------------------------------------------------------------
+
+part parent "x256c3"
+ id = "x256d3";
+ desc = "ATxmega256D3";
+ signature = 0x1e 0x98 0x44;
+;
+
+#------------------------------------------------------------
+# ATxmega256A1
+#------------------------------------------------------------
+
+part parent "x256c3"
+ id = "x256a1";
+ desc = "ATxmega256A1";
+ signature = 0x1e 0x98 0x46;
+ has_jtag = yes;
+
+ memory "fuse0"
+ size = 1;
+ offset = 0x8f0020;
+ ;
+;
+
+#------------------------------------------------------------
+# ATxmega256A3
+#------------------------------------------------------------
+
+part parent "x256a1"
+ id = "x256a3";
+ desc = "ATxmega256A3";
+ signature = 0x1e 0x98 0x42;
+;
+
+#------------------------------------------------------------
+# ATxmega256A3U
+#------------------------------------------------------------
+
+part parent "x256a1"
+ id = "x256a3u";
+ desc = "ATxmega256A3U";
+ signature = 0x1e 0x98 0x42;
+ usbpid = 0x2fec;
+;
+
+#------------------------------------------------------------
+# ATxmega256A3B
+#------------------------------------------------------------
+
+part parent "x256a1"
+ id = "x256a3b";
+ desc = "ATxmega256A3B";
+ signature = 0x1e 0x98 0x43;
+;
+
+#------------------------------------------------------------
+# ATxmega256A3BU
+#------------------------------------------------------------
+
+part parent "x256a1"
+ id = "x256a3bu";
+ desc = "ATxmega256A3BU";
+ signature = 0x1e 0x98 0x43;
+ usbpid = 0x2fe2;
+;
+
+#------------------------------------------------------------
+# ATxmega384C3
+#------------------------------------------------------------
+
+part parent ".xmega"
+ id = "x384c3";
+ desc = "ATxmega384C3";
+ signature = 0x1e 0x98 0x45;
+ usbpid = 0x2fdb;
+
+ memory "eeprom"
+ size = 0x1000;
+ offset = 0x8c0000;
+ page_size = 0x20;
+ readsize = 0x100;
+ ;
+
+ memory "application"
+ size = 0x60000;
+ offset = 0x800000;
+ page_size = 0x200;
+ readsize = 0x100;
+ ;
+
+ memory "apptable"
+ size = 0x2000;
+ offset = 0x85e000;
+ page_size = 0x200;
+ readsize = 0x100;
+ ;
+
+ memory "boot"
+ size = 0x2000;
+ offset = 0x860000;
+ page_size = 0x200;
+ readsize = 0x100;
+ ;
+
+ memory "flash"
+ size = 0x62000;
+ offset = 0x800000;
+ page_size = 0x200;
+ readsize = 0x100;
+ ;
+
+ memory "usersig"
+ size = 0x200;
+ offset = 0x8e0400;
+ page_size = 0x200;
+ readsize = 0x100;
+ ;
+;
+
+#------------------------------------------------------------
+# ATxmega384D3
+#------------------------------------------------------------
+
+part parent "x384c3"
+ id = "x384d3";
+ desc = "ATxmega384D3";
+ signature = 0x1e 0x98 0x47;
+;
+
+#------------------------------------------------------------
+# ATxmega8E5
+#------------------------------------------------------------
+
+part parent ".xmega"
+ id = "x8e5";
+ desc = "ATxmega8E5";
+ signature = 0x1e 0x93 0x41;
+
+ memory "eeprom"
+ size = 0x0200;
+ offset = 0x08c0000;
+ page_size = 0x20;
+ readsize = 0x100;
+ ;
+
+ memory "application"
+ size = 0x2000;
+ offset = 0x0800000;
+ page_size = 0x80;
+ readsize = 0x100;
+ ;
+
+ memory "apptable"
+ size = 0x800;
+ offset = 0x00801800;
+ page_size = 0x80;
+ readsize = 0x100;
+ ;
+
+ memory "boot"
+ size = 0x800;
+ offset = 0x00802000;
+ page_size = 0x80;
+ readsize = 0x100;
+ ;
+
+ memory "flash"
+ size = 0x2800;
+ offset = 0x0800000;
+ page_size = 0x80;
+ readsize = 0x100;
+ ;
+
+ memory "usersig"
+ size = 0x80;
+ offset = 0x8e0400;
+ page_size = 0x80;
+ readsize = 0x100;
+ ;
+;
+
+#------------------------------------------------------------
+# ATxmega16E5
+#------------------------------------------------------------
+
+part parent ".xmega"
+ id = "x16e5";
+ desc = "ATxmega16E5";
+ signature = 0x1e 0x94 0x45;
+
+ memory "eeprom"
+ size = 0x0200;
+ offset = 0x08c0000;
+ page_size = 0x20;
+ readsize = 0x100;
+ ;
+
+ memory "application"
+ size = 0x4000;
+ offset = 0x0800000;
+ page_size = 0x80;
+ readsize = 0x100;
+ ;
+
+ memory "apptable"
+ size = 0x1000;
+ offset = 0x00803000;
+ page_size = 0x80;
+ readsize = 0x100;
+ ;
+
+ memory "boot"
+ size = 0x1000;
+ offset = 0x00804000;
+ page_size = 0x80;
+ readsize = 0x100;
+ ;
+
+ memory "flash"
+ size = 0x5000;
+ offset = 0x0800000;
+ page_size = 0x80;
+ readsize = 0x100;
+ ;
+
+ memory "usersig"
+ size = 0x80;
+ offset = 0x8e0400;
+ page_size = 0x80;
+ readsize = 0x100;
+ ;
+;
+
+#------------------------------------------------------------
+# ATxmega32E5
+#------------------------------------------------------------
+
+part parent ".xmega"
+ id = "x32e5";
+ desc = "ATxmega32E5";
+ signature = 0x1e 0x95 0x4c;
+
+ memory "eeprom"
+ size = 0x0400;
+ offset = 0x08c0000;
+ page_size = 0x20;
+ readsize = 0x100;
+ ;
+
+ memory "application"
+ size = 0x8000;
+ offset = 0x0800000;
+ page_size = 0x80;
+ readsize = 0x100;
+ ;
+
+ memory "apptable"
+ size = 0x1000;
+ offset = 0x00807000;
+ page_size = 0x80;
+ readsize = 0x100;
+ ;
+
+ memory "boot"
+ size = 0x1000;
+ offset = 0x00808000;
+ page_size = 0x80;
+ readsize = 0x100;
+ ;
+
+ memory "flash"
+ size = 0x9000;
+ offset = 0x0800000;
+ page_size = 0x80;
+ readsize = 0x100;
+ ;
+
+ memory "usersig"
+ size = 0x80;
+ offset = 0x8e0400;
+ page_size = 0x80;
+ readsize = 0x100;
+ ;
+;
+
+#------------------------------------------------------------
+# AVR32UC3A0512
+#------------------------------------------------------------
+
+part
+ id = "uc3a0512";
+ desc = "AT32UC3A0512";
+ signature = 0xED 0xC0 0x3F;
+ has_jtag = yes;
+ is_avr32 = yes;
+
+ memory "flash"
+ paged = yes;
+ page_size = 512; # bytes
+ readsize = 512; # bytes
+ num_pages = 1024; # could be set dynamicly
+ size = 0x00080000; # could be set dynamicly
+ offset = 0x80000000;
+ ;
+;
+
+part parent "uc3a0512"
+ id = "ucr2";
+ desc = "deprecated, use 'uc3a0512'";
+;
+
+#------------------------------------------------------------
+# ATtiny1634.
+#------------------------------------------------------------
+
+part
+ id = "t1634";
+ desc = "ATtiny1634";
+ has_debugwire = yes;
+ flash_instr = 0xB6, 0x01, 0x11;
+ eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
+ 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
+ 0x99, 0xF9, 0xBB, 0xAF;
+ stk500_devcode = 0x86;
+ # avr910_devcode = 0x;
+ signature = 0x1e 0x94 0x12;
+ pagel = 0xB3;
+ bs2 = 0xB1;
+ reset = io;
+ chip_erase_delay = 9000;
+ pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
+ "x x x x x x x x x x x x x x x x";
+
+ chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
+ "x x x x x x x x x x x x x x x x";
+
+ timeout = 200;
+ stabdelay = 100;
+ cmdexedelay = 25;
+ synchloops = 32;
+ bytedelay = 0;
+ pollindex = 3;
+ pollvalue = 0x53;
+ predelay = 1;
+ postdelay = 1;
+ pollmethod = 1;
+
+ pp_controlstack =
+ 0x0E, 0x1E, 0x0E, 0x1E, 0x2E, 0x3E, 0x2E, 0x3E,
+ 0x4E, 0x5E, 0x4E, 0x5E, 0x6E, 0x7E, 0x6E, 0x7E,
+ 0x26, 0x36, 0x66, 0x76, 0x2A, 0x3A, 0x6A, 0x7A,
+ 0x2E, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+ hventerstabdelay = 100;
+ progmodedelay = 0;
+ latchcycles = 0;
+ togglevtg = 1;
+ poweroffdelay = 15;
+ resetdelayms = 1;
+ resetdelayus = 0;
+ hvleavestabdelay = 15;
+ resetdelay = 15;
+ chiperasepulsewidth = 0;
+ chiperasepolltimeout = 10;
+ programfusepulsewidth = 0;
+ programfusepolltimeout = 5;
+ programlockpulsewidth = 0;
+ programlockpolltimeout = 5;
+
+ memory "eeprom"
+ paged = no;
+ page_size = 4;
+ size = 256;
+ min_write_delay = 3600;
+ max_write_delay = 3600;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read = " 1 0 1 0 0 0 0 0",
+ " 0 0 0 x x x x a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ write = " 1 1 0 0 0 0 0 0",
+ " 0 0 0 x x x x a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_lo = " 1 1 0 0 0 0 0 1",
+ " 0 0 0 0 0 0 0 0",
+ " 0 0 0 0 0 0 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 1 1 0 0 0 0 1 0",
+ " 0 0 x x x x x a8",
+ " a7 a6 a5 a4 a3 a2 0 0",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 5;
+ blocksize = 4;
+ readsize = 256;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 16384;
+ page_size = 32;
+ num_pages = 512;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ readback_p1 = 0xff;
+ readback_p2 = 0xff;
+ read_lo = " 0 0 1 0 0 0 0 0",
+ " 0 0 0 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ read_hi = " 0 0 1 0 1 0 0 0",
+ " 0 0 0 a12 a11 a10 a9 a8",
+ " a7 a6 a5 a4 a3 a2 a1 a0",
+ " o o o o o o o o";
+
+ loadpage_lo = " 0 1 0 0 0 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ loadpage_hi = " 0 1 0 0 1 0 0 0",
+ " 0 0 0 x x x x x",
+ " x x a5 a4 a3 a2 a1 a0",
+ " i i i i i i i i";
+
+ writepage = " 0 1 0 0 1 1 0 0",
+ " 0 0 0 a12 a11 a10 a9 a8",
+ " a7 a6 x x x x x x",
+ " x x x x x x x x";
+
+ mode = 0x41;
+ delay = 6;
+ blocksize = 128;
+ readsize = 256;
+
+ ;
+
+ memory "lfuse"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ ;
+
+ memory "hfuse"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
+ "x x x x x x x x i i i i i i i i";
+ ;
+
+ memory "efuse"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
+ "x x x x x x x x o o o o o o o o";
+
+ write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
+ "x x x x x x x x x x x i i i i i";
+ ;
+
+ memory "lock"
+ size = 1;
+ min_write_delay = 4500;
+ max_write_delay = 4500;
+ read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
+ "x x x x x x x x x x x x x x o o";
+
+ write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
+ "x x x x x x x x 1 1 1 1 1 1 i i";
+ ;
+
+ memory "calibration"
+ size = 1;
+ read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
+ "0 0 0 0 0 0 0 0 o o o o o o o o";
+ ;
+
+ memory "signature"
+ size = 3;
+ read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
+ "x x x x x x a1 a0 o o o o o o o o";
+ ;
+;
+
+#------------------------------------------------------------
+# Common values for reduced core tinys (4/5/9/10/20/40)
+#------------------------------------------------------------
+
+part
+ id = ".reduced_core_tiny";
+ desc = "Common values for reduced core tinys";
+ has_tpi = yes;
+
+ memory "signature"
+ size = 3;
+ offset = 0x3fc0;
+ page_size = 16;
+ ;
+
+ memory "fuse"
+ size = 1;
+ offset = 0x3f40;
+ page_size = 16;
+ blocksize = 4;
+ ;
+
+ memory "calibration"
+ size = 1;
+ offset = 0x3f80;
+ page_size = 16;
+ ;
+
+ memory "lockbits"
+ size = 1;
+ offset = 0x3f00;
+ page_size = 16;
+ ;
+;
+
+#------------------------------------------------------------
+# ATtiny4
+#------------------------------------------------------------
+
+part parent ".reduced_core_tiny"
+ id = "t4";
+ desc = "ATtiny4";
+ signature = 0x1e 0x8f 0x0a;
+
+ memory "flash"
+ size = 512;
+ offset = 0x4000;
+ page_size = 16;
+ blocksize = 128;
+ ;
+;
+
+#------------------------------------------------------------
+# ATtiny5
+#------------------------------------------------------------
+
+part parent "t4"
+ id = "t5";
+ desc = "ATtiny5";
+ signature = 0x1e 0x8f 0x09;
+;
+
+#------------------------------------------------------------
+# ATtiny9
+#------------------------------------------------------------
+
+part parent ".reduced_core_tiny"
+ id = "t9";
+ desc = "ATtiny9";
+ signature = 0x1e 0x90 0x08;
+
+ memory "flash"
+ size = 1024;
+ offset = 0x4000;
+ page_size = 16;
+ blocksize = 128;
+ ;
+;
+
+#------------------------------------------------------------
+# ATtiny10
+#------------------------------------------------------------
+
+part parent "t9"
+ id = "t10";
+ desc = "ATtiny10";
+ signature = 0x1e 0x90 0x03;
+;
+
+#------------------------------------------------------------
+# ATtiny20
+#------------------------------------------------------------
+
+part parent ".reduced_core_tiny"
+ id = "t20";
+ desc = "ATtiny20";
+ signature = 0x1e 0x91 0x0F;
+
+ memory "flash"
+ size = 2048;
+ offset = 0x4000;
+ page_size = 16;
+ blocksize = 128;
+ ;
+;
+
+#------------------------------------------------------------
+# ATtiny40
+#------------------------------------------------------------
+
+part parent ".reduced_core_tiny"
+ id = "t40";
+ desc = "ATtiny40";
+ signature = 0x1e 0x92 0x0E;
+
+ memory "flash"
+ size = 4096;
+ offset = 0x4000;
+ page_size = 64;
+ blocksize = 128;
+ ;
+;
+
+#------------------------------------------------------------
+# ATmega406
+#------------------------------------------------------------
+
+part
+ id = "m406";
+ desc = "ATMEGA406";
+ has_jtag = yes;
+ signature = 0x1e 0x95 0x07;
+
+ # STK500 parameters (parallel programming IO lines)
+ pagel = 0xa7;
+ bs2 = 0xa0;
+ serial = no;
+ parallel = yes;
+
+ # STK500v2 HV programming parameters, from XML
+ pp_controlstack = 0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
+ 0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
+ 0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
+ 0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
+
+ # JTAG ICE mkII parameters, also from XML files
+ allowfullpagebitstream = no;
+ enablepageprogramming = yes;
+ idr = 0x51;
+ rampz = 0x00;
+ spmcr = 0x57;
+ eecr = 0x3f;
+
+ memory "eeprom"
+ paged = no;
+ size = 512;
+ page_size = 4;
+ blocksize = 4;
+ readsize = 4;
+ num_pages = 128;
+ ;
+
+ memory "flash"
+ paged = yes;
+ size = 40960;
+ page_size = 128;
+ blocksize = 128;
+ readsize = 128;
+ num_pages = 320;
+ ;
+
+ memory "hfuse"
+ size = 1;
+ ;
+
+ memory "lfuse"
+ size = 1;
+ ;
+
+ memory "lockbits"
+ size = 1;
+ ;
+
+ memory "signature"
+ size = 3;
+ ;
+;
+
+
diff --git a/code/blink/main.c b/code/blink/main.c
new file mode 100755
index 0000000..af627b6
--- /dev/null
+++ b/code/blink/main.c
@@ -0,0 +1,87 @@
+/* Name: main.c
+ * This is just an example for AVR-C with ATtiny microcontrollers. The code
+ * implements digital switching of two pins, letting two connected LEDs blink.
+ * It is part of the following instructable:
+ *
+ * Author: Markus Konrad
+ * Copyright 2013. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification,are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * Neither the name of the mkonrad.net nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include
+#include
+
+// Define pins
+
+#define PIN_LED1 PB0
+#define PIN_LED2 PB1
+
+// Define the delay time in ms
+
+#define DELAY_MS 500
+
+// Define helper macros
+
+// write digital "high" to pin on port
+#define DIGIWRITE_H(prt, pn) prt |= (1< on port
+#define DIGIWRITE_L(prt, pn) prt &= ~(1<0; ms--) _delay_ms(10);
+}
+
+// program entry point
+int main(void) {
+ // DDRB is the "data direction register" for port B
+ // the ATtinyX5 only has port B with usable pins
+ // we set both LED pins to "output"
+ DDRB |= (1 << PIN_LED1) | (1 << PIN_LED2);
+
+ // initially set the pins to "low"
+ DIGIWRITE_L(PORTB, PIN_LED1);
+ DIGIWRITE_L(PORTB, PIN_LED2);
+
+ // main loop
+ uint8_t toggle = 0;
+ for(;;){
+ // alternate between the LEDs to let them blink
+ DIGIWRITE_L(PORTB, (toggle == 0 ? PIN_LED1 : PIN_LED2));
+ DIGIWRITE_H(PORTB, (toggle == 0 ? PIN_LED2 : PIN_LED1));
+
+ // alternave the toggle variable
+ toggle = !toggle;
+
+ // make a long delay
+ long_delay_ms(DELAY_MS);
+ }
+
+ return 0; /* never reached */
+}
diff --git a/code/blink/main.elf b/code/blink/main.elf
new file mode 100755
index 0000000..dadb3cb
Binary files /dev/null and b/code/blink/main.elf differ
diff --git a/code/blink/main.o b/code/blink/main.o
new file mode 100644
index 0000000..eb5af38
Binary files /dev/null and b/code/blink/main.o differ
diff --git a/howto.txt b/howto.txt
new file mode 100644
index 0000000..1723d14
--- /dev/null
+++ b/howto.txt
@@ -0,0 +1,223 @@
+
+
+ _ _ _____ _______ ___
+| | | |/ _ \ \ / /_ _/ _ \
+| |_| | | | \ \ /\ / / | || | | |
+| _ | |_| |\ V V / | || |_| |
+|_| |_|\___/ \_/\_/ |_| \___/
+
+FLASHING (PUTTING .HEX Files on your ATtiny)
+
+-needed-
+*Arduino Uno or Duemilanove (w/ an ATmega328, not an older board with an ATmega168)
+*ATtiny45 or ATtiny85 (8-pin DIP package)
+*a 10 uF capacitor
+*a breadboard
+*8x jumper wires
+*Arduino IDE
+
+-flashing the arduino to act as programmer-
+*Open Arduino, add ATTiny support > http://highlowtech.org/?p=1695
+*Load: File>Examples>11.ArduinoISP
+*Connect arduino to computer and select the right board, and port from the Tools menu (aka arduino Uno)
+*Upload the sketch to the arduino board
+*Disconnect arduino
+
+
+-wiring-
+*wire up the arduino to the attiny, see schematic arduino-to-attiny-wiring.png or http://highlowtech.org/wp-content/uploads/2011/06/Screen-shot-2011-06-06-at-1.46.39-PM.png
+Pin connections:
+ ATtiny Pin 2 to Arduino Pin 13 (or SCK of another programmer)
+ ATtiny Pin 1 to Arduino Pin 12 (or MISO of another programmer)
+ ATtiny Pin 0 to Arduino Pin 11 (or MOSI of another programmer)
+ ATtiny Reset Pin to Arduino Pin 10 (or RESET of another programmer)
+
+(ATtiny pinout refer to schematic: https://cdn.sparkfun.com/assets/f/8/f/d/9/52713d5b757b7fc0658b4567.png )
+
+NOTE REPEAT THE STEPS BELOW FOR EVERY ATTINY CHIP YOUR PLANNING TO USE/PROGRAM:x
+
+*Connect arduino to computer again
+*In arduino ide select:
+ Tools – Board – Attiny85 @ 8Mhz (internal oscillator; BOD disabled)
+ Tools – Programmer – Arduino as ISP
+ Tools – Serial Port – COMx (x being the com port that your arduino is connected to)
+
+*Finally:
+ Tools – Burn Bootloader
+
+To clarify, you are not burning a bootloader here. You are resetting the fuses in the Attiny to clock it at 8Mhz (normally runs at 1Mhz).
+Next, get the firmware into the chip. With that I mean the hex file you want in your chip
+
+
+-flashing the firmware with avrdude (bundled with arduino on OSX)-
+*On osx, open a Terminal and type: cd /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/
+*Press enter ;)
+*Youre now in the folder with all the avr stuff.
+
+The commands ater the dollarsign below are all executed from this folder aka typed in the terminal followed by the ENTER key.
+(so dont type the dollar sign)
+
+$ ./avrdude (lists available commands)
+
+-create makefile-
+*to compile code (.c) to binary .hex using a 'makefile', create a new one or modify an exiting one (see led example)
+*make sure all the paths are correct! (on osx avrdude etc is not in your 'path', or /usr/bin/, so you need full paths to these apps!)
+(ref: http://www.instructables.com/id/Honey-I-Shrunk-the-Arduino-Moving-from-Arduino-t/
+and: https://github.com/internaut/attiny-instructable)
+
+type: $ make
+
+Now you have a main.hex
+
+
+-flashing hex-
+
+
+$ cd /Applications/Arduino.app/Contents/Java/hardware/tools/avr
+
+$ ./bin/avrdude -C etc/avrdude.conf -c avrisp -P /dev/cu.usbmodem1421 -b 19200 -p attiny85 -U flash:w:/Users/then/ownCloud/space/linuxpresday/attiny-instructable-master/1_leds/main.hex:i
+
+
+BOOM!
+
+To test, just need to connect pin 5 (PB0) and/or 6 (PB1) of your ATtiny with an LED respectively (of course you need to add a resistor with at least 150 Ohm before). (http://www.instructables.com/id/Honey-I-Shrunk-the-Arduino-Moving-from-Arduino-t/)
+
+
+
+
+-flash SDCARD CODE-
+
+$ ./bin/avrdude -C etc/avrdude.conf -c avrisp -P /dev/cu.usbmodem1421 -b 19200 -p attiny85 -U flash:w:/Users/then/ownCloud/space/linuxpresday/attinydj/install/tiny.hex:i
+
+
+-put content on sd card-
+place (48 kHz, 8-bit, mono) wav files in an FAT (32) formatted sd card folder called "wav".
+(ref:http://www.instructables.com/id/Attiny85-Sd-Wav-Player/)
+
+>> oef check this>> http://elm-chan.org/works/sd20p/report.html (put 001.wav file in root)
+
+CONNECTING micro SD CARD TO ATTINY85
+ see: schemasd8p_mo.png
+ and: sdcard-pinout.png
+
+
+-soldering to the SD CARD (not micro sd)
+ vss1 and vss2 are GND (can be connected together)
+ see: sdcard-pinout.png
+
+
+Sprites mod has an excellent schematic: http://spritesmods.com/?art=doorbell&page=2
+(schema.png)
+
+
+ref:
+ http://www.sonsivri.to/forum/index.php?topic=7156.0
+ https://www.esp32.com/viewtopic.php?t=2272
+ http://spritesmods.com/?art=doorbell&page=2
+
+
+
+
+FURTHER READING AND CREDITS:
+http://elm-chan.org/works/sd8p/report.html -- original creator, great site!
+http://www.instructables.com/id/Attiny85-Sd-Wav-Player/ -- tut for raspberry pi as programmer
+
+
+
+
+
+---
+attiny sd player... attiny soldered directly on cheap sdcard
+
+diy programming shield:
+https://www.youtube.com/watch?v=9LjfkjwMqXI
+
+better> https://www.youtube.com/watch?v=BexXvxmOGN8
+
+
+brogramming the chip
+http://highlowtech.org/?p=1695
+
+
+smart sdcard microsd adaptor hack:
+https://www.youtube.com/watch?v=RVC_nLZy-T8
+
+
+
+uiteindelijk:
+http://www.instructables.com/id/Attiny85-Sd-Wav-Player/
+http://elm-chan.org/works/sd8p/report.html (fuses not needed rite? see: https://www.youtube.com/watch?v=RVC_nLZy-T8 )
+
+harde site http://elm-chan.org/
+
+
+interesting audacity tut halfway:
+https://www.youtube.com/watch?v=tUapZ_JdHLE
+
+
+hard:
+http://txyzinfo.blogspot.nl/2012/11/AVR-attiny2313-wav-music-player-from-SD-card-microSD-MMC.html
+https://www.youtube.com/watch?v=CDRRwNkzasQ
+
+more advanced, with pcb etcahble:
+http://paja-trb.cz/konstrukce/wav_player.html
+
+
+__ _____ ____ _ ______ _ _ ___ ____
+\ \ / / _ \| _ \| |/ / ___|| | | |/ _ \| _ \
+ \ \ /\ / / | | | |_) | ' /\___ \| |_| | | | | |_) |
+ \ V V /| |_| | _ <| . \ ___) | _ | |_| | __/
+ \_/\_/ \___/|_| \_\_|\_\____/|_| |_|\___/|_|
+
+
+musical keycord
+
+PARTS NEEDED
+
+
+ (micro) SD CARDS (ebay) <1eur
+ https://www.ebay.nl/itm/Job-lot-of-44-Used-Micro-SD-Memory-Cards-All-2GB-Various/253593350905?hash=item3b0b5772f9:g:rsEAAOSwyi1a5s7G&autorefresh=true
+
+per unit:
+1x atttiny85 (farnell)
+1x speaker (eculit?)
+1x cr2032 (3v lithium cell)
+1x (micro)sdcard
+
+
+BATTERY
+the circuit draws 0.03A the cr2032 lithium battery delivers about 200 mah, so battery life is 200/3 = 66 hours, almost 3 days of operation time.
+
+SOUNDS
+According to ELM CHang: “The SD audio player supports only RIFF-WAVE format sound files known as Microsoft wave file in LPCM, 8/16-bit, mono/stereo and upto 48kHz sampling rate”.
+(http://elm-chan.org/works/sd8p/report.html)
+
+
+But this is not the case…..
+
+workflow: convert mp3 to wav, convert wav to speed it up 2x
+$ ffmpeg -i input.mp3 output.wav
+$ sox output.wav -r 48000 -c 1 -b 8 short2x48-8.wav speed 2
+
+To convert a whole folder (zhell, osx, etc..):
+$ for i in *.mp3; do ffmpeg -i "$i" ${i%.*}.wav; done
+$ for i in *wav; do sox "$i" -r 48000 -c 1 -b 8 ${i%.*}-conv.wav speed 2; done
+
+
+
+
+
+
+
+ref:
+http://stefaanlippens.net/audio_conversion_cheat_sheet/
+http://elm-chan.org/works/sd8p/report.html
+
+
+COSTS
+6x sdcards (marktplaats) 6,50+5,85 … = 12,35
+6x attiny a 1,08 = 6,36
+6x CR 2032 a 0,884 = 5,404
+6x speaker…
+
+
diff --git a/wiring-diagrams/arduino-to-attiny-wiring.png b/wiring-diagrams/arduino-to-attiny-wiring.png
new file mode 100644
index 0000000..51bb123
Binary files /dev/null and b/wiring-diagrams/arduino-to-attiny-wiring.png differ
diff --git a/wiring-diagrams/attiny-pinout.png b/wiring-diagrams/attiny-pinout.png
new file mode 100644
index 0000000..a4725b9
Binary files /dev/null and b/wiring-diagrams/attiny-pinout.png differ
diff --git a/wiring-diagrams/attiny-to-microsd.png b/wiring-diagrams/attiny-to-microsd.png
new file mode 100644
index 0000000..00ac25e
Binary files /dev/null and b/wiring-diagrams/attiny-to-microsd.png differ
diff --git a/wiring-diagrams/attiny-to-sdcard.png b/wiring-diagrams/attiny-to-sdcard.png
new file mode 100644
index 0000000..86ee21e
Binary files /dev/null and b/wiring-diagrams/attiny-to-sdcard.png differ
diff --git a/wiring-diagrams/sdcard-pinout.png b/wiring-diagrams/sdcard-pinout.png
new file mode 100644
index 0000000..eff9cae
Binary files /dev/null and b/wiring-diagrams/sdcard-pinout.png differ
diff --git a/wiring-diagrams/test-sd-card.jpg b/wiring-diagrams/test-sd-card.jpg
new file mode 100644
index 0000000..6f0714c
Binary files /dev/null and b/wiring-diagrams/test-sd-card.jpg differ