element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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 & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • 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
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • 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 - #5
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: andrewsays
  • Date Created: 6 Jul 2019 6:35 AM Date Created
  • Views 973 views
  • Likes 4 likes
  • Comments 0 comments
  • avr
  • atmega
  • programming
  • attiny
  • shield
  • arduino as isp
  • programmer
Related
Recommended

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

andrewsays
andrewsays
6 Jul 2019

This will be the last posting about R2.

 

1. Limitations of R2 and the ideas for the enhancement.

 

a. R2 doesn’t support ATtiny with external clock.

I decided not to make R2 support ATtiny with external clock because I don’t use this combination. I normally use ATtiny when I need to make something tiny or simple and I don’t want to add any component not necessary.

Anyway, you may slightly modify the schematic to make the external clock supported. Please find ORANGE part of the schematic at the bottom of this posting. You may also notice that TEST LED may not work for DIP8(N) ATtiny25/45/85 and DIP10(N) ATtiny2323/4313 if they are set to use external clock.

 

b. Only 16MHz external clock is supported.

This can be resolved by making the crystal replaceable using a socket. I normally use a 3pin SIP Socket (2.54mm, through hole) even if it doesn’t look nice.

As R2 is just a tool to program microcontroller but the final product to be delivered to customers, the oscillation frequency doesn’t have to be very accurate. You may use any crystal with its CL around 15pF~20pF.

 

c. TEST LED doesn’t work with alternative pinouts.

MCUdude’s MightyCore boards manager and SpenceKonde’s ATTinyCore boards manager support alternative pinouts for ATtiny24/44/84 and ATmega8535/16/32/164/324/644/1284. TEST LED is connected to the pin where D03(Arduino Digital IO Pin #3) should be mapped to. If you burn bootloader - I actually
mean “set fuses” - with any of those alternative pinouts or your custom pinout, the pin connected to the LED is not D03 anymore!

You may just modify the source code of Blink sketch to test the alternative pinouts as shown below.

- ATtiny24/44/84

This microcontroller’s default pinout is Clockwise but you may also choose Counterclockwise when you burn bootloader.

image

In this case, you should change the pin numbers in the sketch from 3 to 7.

image

- ATmega8535/16/32/164/324/644/1284

You can choose other pinouts than Standard pinout for this microcontroller. Standard pinout’s and Sanguino pinout’s D03 are mapped to the same physical pin #4 of the microcontroller but Bobuino pinout’s D03 is mapped to pin #17 where D11 of other pinouts are mapped to.

image

You should change the pin numbers in the sketch to 11 In this case.

image

You can also make change to the circuit if you need to use alternative pinouts often and too lazy to modify sketch. Please find PURPLE part of the schematic at the bottom of this posting.

 

 

2. Other topics

 

a. Protecting ArduinoISP sketch loaded to my Arduino.

I sometimes overwrite ArduinoISP sketch loaded to my Arduino with another sketch by mistake. I have an Arduino dedicated to programming with Arduino As ISP + R2. I sometimes forget to set Programmer to Arduino as ISP and forget to press SHIFT key down when I try to upload a sketch using Arduino IDE.

It turns my Arduino As ISP back to a normal Arduino. This is quite frustrating especially when it happens a couple of times or more even if it is not a big deal as I can fix this by reloading ArduinoISP sketch.

 

Is there a way to prevent it from happening? YES!!!

 

There is a built-in USB to Serial(TTL) converter on Arduino board. The microcontroller (ATmega328P) has its bootloader loaded and the bootloader loads program coming through the serial channel on top of the bootloader itself without getting overwritten.

It means the sketch won’t be loaded in this way if there is no bootloader.

Do you remember that loading a sketch with Arduino As ISP + R2 overwrites bootloader? Please see ATmega/ATtiny Microcontroller Programming Shield for Arduino As ISP R2 - #4 for detail.

That’s right. You can load ArduinoISP sketch to an ATmega328P microcontroller using Arduino As ISP + R2 to get rid of the bootloader and replace the microcontroller on your Arduino with it.

 

Done!!

 

b. Programming microcontrollers without getting bootloader overwritten.

There is no such way as long as you are using Arduino As ISP. Use a USB to Serial converter or other serial programmers in
the market. You can also use the built-in USB to Serial converter of your Arduino but you need to remove the microcontroller from your Arduino to do it.

 

3. ATmega/ATtiny Microcontroller Programming Shield for Arduino As ISP R2.1

 

Please find the modified schematic.

image

 

 

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

  • 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