Go Down

Topic: Atmel ATmega16l8 as arduino (Read 398 times) previous topic - next topic


Retrieved a atmel atmega 16l8pu, im trying to burn bootloader onto it using with my Mega 2560 but im having no success at the moment, any ideas? i hooked up MISO, SCK, SS, MOSI top the 16l8pu correctly. I even tried RX and TX but that did nothing either.


Aug 10, 2017, 11:37 pm Last Edit: Aug 10, 2017, 11:41 pm by hansibull
You got an ATmega16L-8PU right? You can use it with Arduino using MightyCore. You can also use your Arduino MEGA as ISP

If you're having trouble, you should post the complete error log (turn on verbose upload under the IDE settings) and a post a picture of your setup
MightyCore -  ATmega1284, mega644, mega324, mega164, mega32, mega16, mega8535

MiniCore - ATmega8, mega48, mega88, mega168, mega328


thats what im using and trying, noting is working


thats what im using and trying, noting is working
OK, he told you what to do.  Why are you ignoring that advice?
|| | ||| | || | ||  ~Woodstock


Aug 10, 2017, 11:50 pm Last Edit: Aug 10, 2017, 11:55 pm by Arduino99
OK, he told you what to do.  Why are you ignoring that advice?
because the arduino forums are limiting me for 1 reply every 5 minutes for some stupid reason so he edited the post before i finished replying to him.

This is the error im getting.

stk500_recv(): Programmer is not responding
stk500_getsync() Attempt 1 of 10:not in sync: resp=0x03

this repeats for 10 times


There was more.  And it was definitely there before you posted this last time. 
|| | ||| | || | ||  ~Woodstock


Did you burn a bootloader?  Do you have auto-reset circuitry properly wired?


Did you burn a bootloader?  Do you have auto-reset circuitry properly wired?

im trying to burn the bootloader, keeps coming up withthat error

Heres the link to my(crappy) setup, let me know if im missing anything because im following on what you would do if your programming a Atmega328 just obviously for the atmega16l8



Aug 11, 2017, 12:35 am Last Edit: Aug 11, 2017, 12:39 am by westfw
You have to connect RESET on your target to some GPIO pin on the arduino you're using as a programmer, NOT to the RESET pin on the programmer ISP connection.  (probably pin 10.)

You may need to do something on the mega side to prevent autoreset from messing up the arduinoISP sketch.   a 10uF cap connected from reset to GND is "traditional."


Aug 11, 2017, 12:41 am Last Edit: Aug 11, 2017, 12:48 am by Arduino99
on a the Arduino uno it would be pin 10 right? Looking at the Pinouts its also marked as SS, SS on the mega is pin 53 according to its pinouts, ill give that a try.

Edit : Just tried both methods, i put a 10uf cap between Ground and reset, neither pin 53 or 10 worked. i am using MightyCore if that helps.


I just looked at the source:  ArduinoISP uses pin10, not SS, so you want pin10 even if you're using a MEGA.
10uF between gnd and reset on the MEGA side, right?

You should have some bypass caps near the 16L, and a current-limiting resistor for the green LED.

Can you run avrdude from the command line?   My next step would be to ensure that avrdude is talking to the ArduinoISP program. separately from whether the MEGA can talk to the 16L...  (which you can get by looking at the "very verbose" debugging that you get by adding "-v -v -v -v" to the avrdude line.)


ummm, i haven't used the command line before, care to go through it with me please? :-\


Aug 11, 2017, 02:03 am Last Edit: Aug 11, 2017, 02:04 am by westfw
It's pretty obnoxious.   Since the arduino IDE installs it in a private directory invoking it involves a bunch of extra options to tell it where its config files live, and so on.   Best to copy from an Arduino attempt (with "verbose upload" already configured), and just add the "-v -v -v -v"

Code: [Select]
C:\Program Files\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega16l -cstk500v1 -PCOM1 -b19200 -v -v -v -v -t


Aug 11, 2017, 02:18 am Last Edit: Aug 11, 2017, 02:28 am by Arduino99
cant even get it to open, invalid argument and Error reading system wide configuration file

Edit: No such file or directory & error reading config.....


Might need quotes in various places, to handle the filenames with spaces...

Here's what I get with an ArduinoISP board, connected to nothing...

C:\Users\billw>"C:\Program Files\Arduino\hardware\tools\avr/bin/avrdude" -C"C:\Program Files\Arduino\hardware\tools\avr/etc/avrdude.conf" -v -patmega328p -cstk500v1 -PCOM4 -b19200 -t

avrdude: Version 6.3, compiled on Sep 12 2016 at 17:24:16
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Program Files\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM4
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.22s

avrdude: Device signature = 0x000000 (retrying)

Go Up