Using Arduino Uno R3 to bootload the atmega328-PU (non pico)


hi everybody,

i have purchased arduino uno r3 in south africa , don't have stores sell isp programmer, , make things worse no sparkfun or adafruit products sold in city don't have many options (not helpful know).

now here's dilemma, constructing 2 barebones arduino's based on rbbb (really bare bones board) design (which don't here either resorted constructing them myself). hold of blank atmega328-pu chips not pico power version!

so in desperate need of bootloading these chips uno bootloader, aware (after reading through forums) of fact signatures atmega328-pu , atmega328p-pu different. have followed several tutorials using arduino isp programmer no success. followed tutorial http://www.gammon.com.au/forum/?id=11635 hoping work atmega328-pu assuming works atmega328p-pu chip.

i tried altering avrdude.conf , boards.txt suggested in thread http://arduino.cc/forum/index.php?topic=58670.0:

avrdude.conf

code: [select]

#------------------------------------------------------------
# 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;

    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";

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";

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";

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";

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";
    ;

    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";
    ;

    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 x x x x x 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";
    ;

    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";
    ;

    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";
    ;
;


boards.txt

code: [select]

##############################################################

uno328.name=arduino uno w/ atmega328 (non-p)
uno328.upload.protocol=arduino
uno328.upload.maximum_size=32256
uno328.upload.speed=115200
uno328.bootloader.low_fuses=0xff
uno328.bootloader.high_fuses=0xde
uno328.bootloader.extended_fuses=0x05
uno328.bootloader.path=optiboot
uno328.bootloader.file=optiboot_atmega328.hex
uno328.bootloader.unlock_bits=0x3f
uno328.bootloader.lock_bits=0x0f
uno328.build.mcu=atmega328
uno328.build.f_cpu=16000000l
uno328.build.core=arduino
uno328.build.variant=standard


i proceeded unzip , upload sketch: atmega_board_programmer.zip uno r3 (the programmer), found in tutorial http://www.gammon.com.au/forum/?id=11635, hooked pins shown in image (programming rbb (really bare bones board)).



i built , wired simplified breadboarded version setup of choice seen below:



then in arduino 1.0.2, selected tools->board->arduino uno w/ atmega328 (non-p), next selected serial port uno r3 connected , selected programmer arduino isp , tried burn bootloader received following error:

code: [select]

avrdude: stk500_getsync(): not in sync: resp=0x00


so checking through code atmega_board_programmer sketch, don't see support atmega328-pu


i tried arduinoisp sketch , followed tutorial here: http://arduino.cc/en/tutorial/arduinotobreadboard knowing should using arduino duemilanove or nano w/ atmega328, gave bash anyway selecting tools->board->arduino uno w/ atmega328 (non-p), setting serial port uno r3 , selecting programmer arduino isp, tried burn bootloader , received following error:

code: [select]

avrdude.exe: stk500_program_enable(): protocol error, expect=0x14, resp=0x50
avrdude.exe: initialization failed, rc=-1;
                   double check connections , try again, or use -f ...
avrdude.exe: stk500_disable(): protocol error, expect=0x14, resp=0x51


i really new of , learn, , attempts bootload breadboarded atmega328-pu, guess have figured out chip cannot bootloaded these methods (but hope can done, be  doing wrong).

can please explain how bootload atmega328-pu (non-p)  using uno r3 isp or point me sketch support atmega328-pu using uno r3. have been reading forums , other sites days , getting fast.

regards
grant

quote

i proceeded unzip , upload sketch: atmega_board_programmer.zip uno r3 (the programmer), found in tutorial http://www.gammon.com.au/forum/?id=11635, hooked pins shown in image (programming rbb (really bare bones board)).


you seem combining couple of approaches here. programmer sketch should work, possibly signature different, easy change.

if connect boards per photo above, should able upload atmega_board_programmer sketch uno. use serial monitor "talk" uno. should see signature, , offer upload bootloader if recognized.

can please post see in serial monitor when that?


Arduino Forum > Using Arduino > Programming Questions > Using Arduino Uno R3 to bootload the atmega328-PU (non pico)


arduino

Comments

Popular posts from this blog

localhost/joomla15/administrator doesnt work - Joomla! Forum - community, help and support

cf_sql_integer vs cf_sql_bigint vs cf_sql_int??