{"id":257,"date":"2012-01-16T19:18:14","date_gmt":"2012-01-16T19:18:14","guid":{"rendered":"http:\/\/blog.bachi.net\/?p=257"},"modified":"2012-01-16T19:45:23","modified_gmt":"2012-01-16T19:45:23","slug":"257","status":"publish","type":"post","link":"https:\/\/blog.bachi.net\/?p=257","title":{"rendered":"ATmega48PA programmieren und flashen"},"content":{"rendered":"<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\navr-gcc -Wall -Os -DF_CPU=8000000  -mmcu=atmega48pa -c main.c -o main.o\r\nunknown MCU 'atmega48pa' specified\r\n<\/pre>\n<p>atmega48pa ist aber kompatibel mit atmega48p:<br \/>\n<a href=\"http:\/\/www.avrfreaks.net\/index.php?name=PNphpBB2&#038;file=viewtopic&#038;p=625346\">ATmega48PA and avr-gcc<\/a><br \/>\n<a href=\"http:\/\/stackoverflow.com\/questions\/3338285\/avrdude-and-atmega48pa\">avrdude and atmega48pa<\/a><\/p>\n<pre class=\"brush: plain; collapse: true; light: false; title: avrdude.conf; toolbar: true; notranslate\" title=\"avrdude.conf\">\r\n#------------------------------------------------------------\r\n# ATmega48P\r\n#------------------------------------------------------------\r\n\r\npart\r\n    id               = &quot;m48p&quot;;\r\n    desc             = &quot;ATMEGA48P&quot;;\r\n     has_debugwire = yes;\r\n     flash_instr   = 0xB6, 0x01, 0x11;\r\n     eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,\r\n                     0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,\r\n                     0x99, 0xF9, 0xBB, 0xAF;\r\n    stk500_devcode   = 0x59;\r\n    signature        = 0x1e 0x92 0x0a;\r\n    \r\n    pagel            = 0xd7;\r\n    bs2              = 0xc2;\r\n    chip_erase_delay = 45000;\r\n    pgm_enable       = &quot;1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1&quot;,\r\n                       &quot;x x x x  x x x x    x x x x  x x x x&quot;;\r\n\r\n    chip_erase       = &quot;1 0 1 0  1 1 0 0    1 0 0 x  x x x x&quot;,\r\n                       &quot;x x x x  x x x x    x x x x  x x x x&quot;;\r\n\r\n    timeout\t\t= 200;\r\n    stabdelay\t\t= 100;\r\n    cmdexedelay\t\t= 25;\r\n    synchloops\t\t= 32;\r\n    bytedelay\t\t= 0;\r\n    pollindex\t\t= 3;\r\n    pollvalue\t\t= 0x53;\r\n    predelay\t\t= 1;\r\n    postdelay\t\t= 1;\r\n    pollmethod\t\t= 1;\r\n\r\n    pp_controlstack     =\r\n\t0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,\r\n\t0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,\r\n\t0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,\r\n\t0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;\r\n    hventerstabdelay    = 100;\r\n    progmodedelay       = 0;\r\n    latchcycles         = 5;\r\n    togglevtg           = 1;\r\n    poweroffdelay       = 15;\r\n    resetdelayms        = 1;\r\n    resetdelayus        = 0;\r\n    hvleavestabdelay    = 15;\r\n    resetdelay          = 15;\r\n    chiperasepulsewidth = 0;\r\n    chiperasepolltimeout = 10;\r\n    programfusepulsewidth = 0;\r\n    programfusepolltimeout = 5;\r\n    programlockpulsewidth = 0;\r\n    programlockpolltimeout = 5;\r\n\r\n    memory &quot;eeprom&quot;\r\n        paged           = no;\r\n        page_size       = 4;\r\n        size            = 256;\r\n        min_write_delay = 3600;\r\n        max_write_delay = 3600;\r\n        readback_p1     = 0xff;\r\n        readback_p2     = 0xff;\r\n\tread            = &quot;  1   0   1   0      0   0   0   0&quot;,\r\n                          &quot;  0   0   0   x      x   x   x   x&quot;,\r\n                          &quot; a7  a6  a5  a4     a3  a2  a1  a0&quot;,\r\n                          &quot;  o   o   o   o      o   o   o   o&quot;;\r\n\r\n\twrite           = &quot;  1   1   0   0      0   0   0   0&quot;,\r\n                          &quot;  0   0   0   x      x   x   x   x&quot;,\r\n                          &quot; a7  a6  a5  a4     a3  a2  a1  a0&quot;, \r\n                          &quot;  i   i   i   i      i   i   i   i&quot;;\r\n\r\n\tloadpage_lo\t= &quot;  1   1   0   0      0   0   0   1&quot;,\r\n\t\t\t  &quot;  0   0   0   0      0   0   0   0&quot;,\r\n\t\t\t  &quot;  0   0   0   0      0   0  a1  a0&quot;,\r\n\t\t\t  &quot;  i   i   i   i      i   i   i   i&quot;;\r\n\r\n\twritepage\t= &quot;  1   1   0   0      0   0   1   0&quot;,\r\n\t\t\t  &quot;  0   0   x   x      x   x   x   x&quot;,\r\n\t\t\t  &quot; a7  a6  a5  a4     a3  a2   0   0&quot;,\r\n\t\t\t  &quot;  x   x   x   x      x   x   x   x&quot;;\r\n\r\n\tmode\t\t= 0x41;\r\n\tdelay\t\t= 20;\r\n\tblocksize\t= 4;\r\n\treadsize\t= 256;\r\n      ;\r\n    memory &quot;flash&quot;\r\n        paged           = yes;\r\n        size            = 4096;\r\n        page_size       = 64;\r\n        num_pages       = 64;\r\n        min_write_delay = 4500;\r\n        max_write_delay = 4500;\r\n        readback_p1     = 0x00;\r\n        readback_p2     = 0x00;\r\n        read_lo         = &quot;  0   0   1   0    0   0   0   0&quot;,\r\n                          &quot;  0   0   0   0    0 a10  a9  a8&quot;,\r\n                          &quot; a7  a6  a5  a4   a3  a2  a1  a0&quot;,\r\n                          &quot;  o   o   o   o    o   o   o   o&quot;;\r\n\r\n        read_hi         = &quot;  0   0   1   0    1   0   0   0&quot;,\r\n                          &quot;  0   0   0   0    0 a10  a9  a8&quot;,\r\n                          &quot; a7  a6  a5  a4   a3  a2  a1  a0&quot;,\r\n                          &quot;  o   o   o   o    o   o   o   o&quot;;\r\n\r\n        loadpage_lo     = &quot;  0   1   0   0      0   0   0   0&quot;,\r\n                          &quot;  0   0   0   x      x   x   x   x&quot;,\r\n                          &quot;  x   x   x  a4     a3  a2  a1  a0&quot;,\r\n                          &quot;  i   i   i   i      i   i   i   i&quot;;\r\n\r\n        loadpage_hi     = &quot;  0   1   0   0      1   0   0   0&quot;,\r\n                          &quot;  0   0   0   x      x   x   x   x&quot;,\r\n                          &quot;  x   x   x  a4     a3  a2  a1  a0&quot;,\r\n                          &quot;  i   i   i   i      i   i   i   i&quot;;\r\n\r\n        writepage       = &quot;  0   1   0   0      1   1   0   0&quot;,\r\n                          &quot;  0   0   0   0      0 a10  a9  a8&quot;,\r\n                          &quot; a7  a6  a5   x      x   x   x   x&quot;,\r\n                          &quot;  x   x   x   x      x   x   x   x&quot;;\r\n\r\n\tmode\t\t= 0x41;\r\n\tdelay\t\t= 6;\r\n\tblocksize\t= 64;\r\n\treadsize\t= 256;\r\n      ;\r\n\r\n    memory &quot;lfuse&quot;\r\n        size            = 1;\r\n        min_write_delay = 4500;\r\n        max_write_delay = 4500;\r\n        read            = &quot;0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0&quot;,\r\n                          &quot;x x x x  x x x x   o o o o  o o o o&quot;;\r\n\r\n        write           = &quot;1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0&quot;,\r\n                          &quot;x x x x  x x x x   i i i i  i i i i&quot;;\r\n      ;\r\n\r\n    memory &quot;hfuse&quot;\r\n        size            = 1;\r\n        min_write_delay = 4500;\r\n        max_write_delay = 4500;\r\n        read            = &quot;0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0&quot;,\r\n                          &quot;x x x x  x x x x   o o o o  o o o o&quot;;\r\n\r\n        write           = &quot;1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0&quot;,\r\n                          &quot;x x x x  x x x x   i i i i  i i i i&quot;;\r\n      ;\r\n\r\n    memory &quot;efuse&quot;\r\n        size            = 1;\r\n        min_write_delay = 4500;\r\n        max_write_delay = 4500;\r\n        read            = &quot;0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0&quot;,\r\n                          &quot;x x x x  x x x x   x x x x  x x x o&quot;;\r\n\r\n        write           = &quot;1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0&quot;,\r\n                          &quot;x x x x  x x x x   x x x x  x x x i&quot;;\r\n      ;\r\n\r\n    memory &quot;lock&quot;\r\n        size            = 1;\r\n        min_write_delay = 4500;\r\n        max_write_delay = 4500;\r\n        read            = &quot;0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0&quot;,\r\n                          &quot;x x x x  x x x x   x x o o  o o o o&quot;;\r\n\r\n        write           = &quot;1 0 1 0  1 1 0 0   1 1 1 x  x x x x&quot;,\r\n                          &quot;x x x x  x x x x   1 1 i i  i i i i&quot;;\r\n      ;\r\n\r\n    memory &quot;calibration&quot;\r\n        size            = 1;\r\n        read            = &quot;0  0  1  1   1  0  0  0   0  0  0  x   x  x  x  x&quot;,\r\n                          &quot;0  0  0  0   0  0  0  0   o  o  o  o   o  o  o  o&quot;;\r\n      ;\r\n\r\n    memory &quot;signature&quot;\r\n        size            = 3;\r\n        read            = &quot;0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x&quot;,\r\n                          &quot;x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o&quot;;\r\n      ;\r\n  ;\r\n<\/pre>\n<pre class=\"brush: plain; title: Makefile; notranslate\" title=\"Makefile\">\r\nDEVICE  = atmega48p\r\nDEV_CODE = 0x31\r\nAVRDUDE  = avrdude -C avrdude.conf -c avr910 -vvv -P com4 -x devcode=$(DEV_CODE) -b 115200 -p $(DEVICE)\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>avr-gcc -Wall -Os -DF_CPU=8000000 -mmcu=atmega48pa -c main.c -o main.o unknown MCU &#8216;atmega48pa&#8217; specified atmega48pa ist aber kompatibel mit atmega48p: ATmega48PA and avr-gcc avrdude and atmega48pa #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; # ATmega48P #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; part id = &quot;m48p&quot;; desc = &quot;ATMEGA48P&quot;; has_debugwire = yes; flash_instr = 0xB6, 0x01, 0x11; eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, 0xBE, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,5],"tags":[],"class_list":["post-257","post","type-post","status-publish","format-standard","hentry","category-avr","category-elektronik"],"_links":{"self":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/257","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=257"}],"version-history":[{"count":8,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/257\/revisions"}],"predecessor-version":[{"id":265,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/257\/revisions\/265"}],"wp:attachment":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}