element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Legacy Personal Blogs ATmega/ATtiny Microcontroller Programming Shield for Arduino As ISP R2 - #4
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: andrewsays
  • Date Created: 25 Jun 2019 1:28 PM Date Created
  • Views 707 views
  • Likes 5 likes
  • Comments 0 comments
  • avr
  • atmega
  • programming
  • microcontroller
  • attiny
  • shield
  • arduino as isp
  • programmer
Related
Recommended

ATmega/ATtiny Microcontroller Programming Shield for Arduino As ISP R2 - #4

andrewsays
andrewsays
25 Jun 2019

This is the second part of R2 User Guide.

 

Programming

 

1) Placing the target microcontroller

  • Make sure the power switch of R2 is off, set the voltage selection jumper to the voltage you want and put your microcontroller in its socket at the right position as shown below.

* Place only 1 microcontroller at a time and the power switch should always be off when placing or removing microcontrollers.

image

  • Please be noticed that the pin number 1 starts from the bottom left corner where the power switch is.
  • Turn the switch on the R2 and check the heartbeat(Green) LED. Push the reset button of your Arduino if doesn’t heartbeat.

 

2) Burn Bootloader / Set Fuses

  • Before loading your program, you need to configure your microcontroller by setting fuses and burning bootloader. It should only be done once for each microcontroller if you don’t need to change the configuration.
  • Select your target microcontroller from the list under Tools > Board: of the Arduino IDE and set the option values such as Chip, Clock, B.O.D. Level and etc.
  • If you are using SpenceKonde’s ATTinyCore as the Boards Manager to program ATtiny series, you can choose not to load bootloader. The board name with “Optiboot” loads the bootloader after setting fuses. All MCUdude’s Boards Managers but MicroCore normally load bootloader by default.

image

* The main function of the bootloader is making the microcontroller programmable via serial (TTL Level) interface. I normally choose not to load bootloader and save the memory.

* R2 doesn’t support external clock for ATtiny series while it supports all internal clocks and 16MHz external clock for ATmega series. Selecting unsupported clock may brick your microcontroller.

  • Run Tools > Burn Bootloader to set fuses and load bootloader.

image

3) Uploading Sketch

  • Open(or write) a sketch. You can browse and open an existing sketch from File > Open.

image

* If you don’t press shift key down when you click on Upload button, you will sometimes get errors especially when you program ATmega series.

* Bootloader will be overwritten by your sketch if you upload a sketch via Arduino as ISP. You should use USB to Serial/TTL converter or other similar tools to upload sketch if you don’t want to get the bootloader overwritten. That’s why many people are using Arduino with no microcontroller to program theirs after burning bootloader.

  • You will see “Compiling sketch”, “Uploading” and then “Done uploading” if nothing goes wrong.

image

  • Your sketch will automatically be executed if it is uploaded properly.

 

4) Test(Optional)

  • There is a built-in Test(Blue) LED on R2 and you can use it to see if your microcontroller is damaged, bricked or with error, especially after setting fuses.

* You shouldn’t do this test if you’ve already uploaded your sketch successfully otherwise you will have to upload it again as it is overwritten by the sketch for the test.

  • Open Blink sketch under File > Examples > 01.Basics > Blink.

image

  • Look for find all 3 ‘LED_BUILTIN’s from the source code and replace them with ‘3’ and upload the modified sketch to the target device. You can just use the attached ‘Blink_PIN3.ino’ sketch file instead of modifying the sketch by yourself as well.

image

  • Your microcontroller is healthy and its clock frequency is correctly fused in most cases if the Test LED blinks in correct interval – ON for a second and OFF for another second.

 

Done! Have fun with your microcontrollers!!

 

Please see my other postings for more information.

ATmega/ATtiny Microcontroller Programming Shield for Arduino As ISP R1

ATmega/ATtiny Microcontroller Programming Shield for Arduino As ISP R2 - #1

ATmega/ATtiny Microcontroller Programming Shield for Arduino As ISP R2 - #2

ATmega/ATtiny Microcontroller Programming Shield for Arduino As ISP R2 - #3

ATmega/ATtiny Microcontroller Programming Shield for Arduino As ISP R2 - #5

 

FYI, this is not the last posting about R2.

Attachments:
Blink_PIN3.zip
  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube