{"id":2381,"date":"2022-12-20T08:17:33","date_gmt":"2022-12-20T07:17:33","guid":{"rendered":"https:\/\/fotografeer.nl\/?p=2381"},"modified":"2025-10-07T22:15:01","modified_gmt":"2025-10-07T20:15:01","slug":"programming-attiny85-from-arduino-nano-the-design","status":"publish","type":"post","link":"https:\/\/fotografeer.nl\/?p=2381","title":{"rendered":"Programming ATtiny85 from Arduino Nano &#8211; The Design"},"content":{"rendered":"<style>.kb-table-of-content-nav.kb-table-of-content-id2381_fb54ab-1d .kb-table-of-content-wrap{padding-top:var(--global-kb-spacing-sm, 1.5rem);padding-right:var(--global-kb-spacing-sm, 1.5rem);padding-bottom:var(--global-kb-spacing-sm, 1.5rem);padding-left:var(--global-kb-spacing-sm, 1.5rem);}.kb-table-of-content-nav.kb-table-of-content-id2381_fb54ab-1d .kb-table-of-contents-title-wrap{padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.kb-table-of-content-nav.kb-table-of-content-id2381_fb54ab-1d .kb-table-of-contents-title{font-weight:regular;font-style:normal;}.kb-table-of-content-nav.kb-table-of-content-id2381_fb54ab-1d .kb-table-of-content-wrap .kb-table-of-content-list{font-weight:regular;font-style:normal;margin-top:var(--global-kb-spacing-sm, 1.5rem);margin-right:0px;margin-bottom:0px;margin-left:0px;}<\/style>\n\n\n<h2 class=\"wp-block-heading\">Use Findings to Create Design<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In the previous blog post in this <a href=\"?s=Arduino%2CATtiny85%2CNano&amp;lang=en\">series of blog posts<\/a>, we did the research on all the <a href=\"https:\/\/en.wiktionary.org\/wiki\/prerequisite\" target=\"_blank\" rel=\"noreferrer noopener\">prerequiste<\/a>s and r<a href=\"https:\/\/en.wikipedia.org\/wiki\/Requirement\" target=\"_blank\" rel=\"noreferrer noopener\">equirement<\/a>s for uploading <a href=\"https:\/\/stackoverflow.com\/questions\/16017875\/why-is-an-arduino-program-called-a-sketch\" target=\"_blank\" rel=\"noreferrer noopener\">sketches<\/a> via the programmer <a href=\"https:\/\/en.wikipedia.org\/wiki\/Arduino_Nano\" target=\"_blank\" rel=\"noreferrer noopener\">Arduino Nano<\/a> to the target <a href=\"https:\/\/en.wikipedia.org\/wiki\/ATtiny_microcontroller_comparison_chart\" target=\"_blank\" rel=\"noreferrer noopener\">ATtiny<\/a>85. Now it is time to apply the findings and turn them into a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Breadboard\" target=\"_blank\" rel=\"noreferrer noopener\">breadboard<\/a> <a href=\"https:\/\/en.wikipedia.org\/wiki\/Design\" target=\"_blank\" rel=\"noreferrer noopener\">design<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note that my electronics knowledge is limited. Please post any doubts, concerns or remarks on <a href=\"https:\/\/www.facebook.com\/fotografeer.nl\/\" target=\"_blank\" rel=\"noreferrer noopener\">our social media page<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Design<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">All the research led to this design for the programmer.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"830\" src=\"https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/design-1024x830.png\" alt=\"Breadboard Design\" class=\"wp-image-2398\" srcset=\"https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/design-1024x830.png 1024w, https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/design-300x243.png 300w, https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/design-768x623.png 768w, https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/design-1536x1246.png 1536w, https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/design-2048x1661.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Image created with <a href=\"https:\/\/fritzing.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">Fritzing<\/a><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"540\" src=\"https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/0013a-Nano-Programmer-for-ATTiny85-bb-1024x540.png\" alt=\"Breadboard Design with Text\" class=\"wp-image-2400\" srcset=\"https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/0013a-Nano-Programmer-for-ATTiny85-bb-1024x540.png 1024w, https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/0013a-Nano-Programmer-for-ATTiny85-bb-300x158.png 300w, https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/0013a-Nano-Programmer-for-ATTiny85-bb-768x405.png 768w, https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/0013a-Nano-Programmer-for-ATTiny85-bb-1536x810.png 1536w, https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/0013a-Nano-Programmer-for-ATTiny85-bb-2048x1080.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Image created with <a href=\"https:\/\/fritzing.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">Fritzing<\/a><\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This design features the use of the <a href=\"https:\/\/en.wikipedia.org\/wiki\/In-system_programming\" target=\"_blank\" rel=\"noreferrer noopener\">ICSP<\/a> header and <a href=\"https:\/\/en.wikipedia.org\/wiki\/Light-emitting_diode\" target=\"_blank\" rel=\"noreferrer noopener\">LED<\/a> indicators as described in ArduinoISP.ino.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Put an LED (with resistor) on the following pins:\n\/\/ 9: Heartbeat   - shows the programmer is running\n\/\/ 8: Error       - Lights up if something goes wrong (use red if that makes sense)\n\/\/ 7: Programming - In communication with the target<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Schema<\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"690\" src=\"https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/0013a-Nano-Programmer-for-ATTiny85-schema-1-1024x690.png\" alt=\"Schema\" class=\"wp-image-2403\" srcset=\"https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/0013a-Nano-Programmer-for-ATTiny85-schema-1-1024x690.png 1024w, https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/0013a-Nano-Programmer-for-ATTiny85-schema-1-300x202.png 300w, https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/0013a-Nano-Programmer-for-ATTiny85-schema-1-768x517.png 768w, https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/0013a-Nano-Programmer-for-ATTiny85-schema-1.png 1522w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Image created with <a href=\"https:\/\/fritzing.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">Fritzing<\/a><\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Test boards<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The design leaves little room for blink test leds on the programmer <a href=\"https:\/\/en.wikipedia.org\/wiki\/Breadboard\" target=\"_blank\" rel=\"noreferrer noopener\">breadboard<\/a>. And we are trying to implement the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Separation_of_concerns\" target=\"_blank\" rel=\"noreferrer noopener\">separation of concerns<\/a> principles and want to keep the programmer and the test setup separate.<br>To be able to verify the correct upload of Blink.ino onto the ATtiny85, one of these test boards must be prepared, according to this design.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"518\" src=\"https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/0014-Test-ATTiny85-bb-1024x518.png\" alt=\"Test Design powered by a battery\" class=\"wp-image-2407\" srcset=\"https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/0014-Test-ATTiny85-bb-1024x518.png 1024w, https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/0014-Test-ATTiny85-bb-300x152.png 300w, https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/0014-Test-ATTiny85-bb-768x388.png 768w, https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/0014-Test-ATTiny85-bb.png 1274w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Image created with <a href=\"https:\/\/fritzing.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">Fritzing<\/a><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"497\" src=\"https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/0014b-Test-ATTiny85-bb-1024x497.png\" alt=\"Test Design powered by 240V AC socket\" class=\"wp-image-2408\" srcset=\"https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/0014b-Test-ATTiny85-bb-1024x497.png 1024w, https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/0014b-Test-ATTiny85-bb-300x146.png 300w, https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/0014b-Test-ATTiny85-bb-768x373.png 768w, https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/0014b-Test-ATTiny85-bb.png 1441w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Image created with <a href=\"https:\/\/fritzing.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">Fritzing<\/a><\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In the next blog post in this series, we will turn the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Design\" target=\"_blank\" rel=\"noreferrer noopener\">design<\/a> into a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Prototype\" target=\"_blank\" rel=\"noreferrer noopener\">prototype<\/a>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><em>Sidenote<\/em><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">You might argue, why not also use the RST of the <a href=\"https:\/\/en.wikipedia.org\/wiki\/In-system_programming\" target=\"_blank\" rel=\"noreferrer noopener\">ICSP<\/a> header? At least, I did. Then all connections towards the <a href=\"https:\/\/en.wikipedia.org\/wiki\/ATtiny_microcontroller_comparison_chart\" target=\"_blank\" rel=\"noreferrer noopener\">ATtiny<\/a>85 would be on the <a href=\"https:\/\/en.wikipedia.org\/wiki\/In-system_programming\" target=\"_blank\" rel=\"noreferrer noopener\">ICSP<\/a> header. This is most likely by design and set in ArduinoISP.ino, where it states: &#8220;Pin 10 is used to reset the target microcontroller.&#8221; It is clearly the intention that this should be used. The pin number for RESET is specifically set:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#define RESET 10  \/\/ Use pin 10 to reset the target rather than SS\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">I actually tried to use the RST on the ICSP header, but then burning the bootloader fails with these messages:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">avrdude: Device signature = 0x000000\navrdude: Yikes!  Invalid device signature.\n         Double check connections and try again, or use -F to override\n         this check.\nFailed chip erase: uploading error: exit status 1\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Cleary not the way to go. This is probably also what you see when any of the other connections are not setup properly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;m assuming the RST on the <a href=\"https:\/\/en.wikipedia.org\/wiki\/In-system_programming\" target=\"_blank\" rel=\"noreferrer noopener\">ICSP<\/a> header is connected through with the other RST pins. At least that is what <a href=\"https:\/\/fritzing.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">Fritzing<\/a> shows me when I click and hold the RST pin on the <a href=\"https:\/\/en.wikipedia.org\/wiki\/In-system_programming\" target=\"_blank\" rel=\"noreferrer noopener\">ICSP<\/a> header. All RST pins turn yellow, indicating that they are somehow connected. I&#8217;m guessing these can&#8217;t be used, because there is a capacitor over RST and GND, to allow the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Arduino_Nano\" target=\"_blank\" rel=\"noreferrer noopener\">Nano<\/a> to act as the programmer.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"820\" height=\"1024\" src=\"https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/RST-through-820x1024.png\" alt=\"RST pin on ICSP\" class=\"wp-image-2411\" srcset=\"https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/RST-through-820x1024.png 820w, https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/RST-through-240x300.png 240w, https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/RST-through-768x959.png 768w, https:\/\/fotografeer.nl\/wp-content\/uploads\/2022\/12\/RST-through.png 1216w\" sizes=\"auto, (max-width: 820px) 100vw, 820px\" \/><figcaption class=\"wp-element-caption\">Image created with <a href=\"https:\/\/fritzing.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">Fritzing<\/a><\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">With pin 10 of Nano connected to pin 1 (RESET) on ATtiny85, the bootloader burn ends with this success message:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">avrdude: verifying ...\navrdude: 2 bytes of flash verified\navrdude done.  Thank you.\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">More on the bootloader and upload process later in this <a href=\"\/?page_id=2414\">series of blog posts<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">DISCLAIMER<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">THIS BLOG POST IS PROVIDED &#8220;AS IS&#8221;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THIS HOWTO OR SOFTWARE OR THE USE OR OTHER DEALINGS IN THIS BLOG POST.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to program an ATtiny85 chip from a Arduino Nano 2\/8<\/p>\n","protected":false},"author":2,"featured_media":2607,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[69],"tags":[102,104,106,138],"class_list":["post-2381","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog___en","tag-arduino___en","tag-attiny85___en","tag-nano___en","tag-programming___en"],"lang":"en","translations":{"en":2381,"nl":2466},"pll_sync_post":{},"_links":{"self":[{"href":"https:\/\/fotografeer.nl\/index.php?rest_route=\/wp\/v2\/posts\/2381","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fotografeer.nl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fotografeer.nl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fotografeer.nl\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/fotografeer.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2381"}],"version-history":[{"count":25,"href":"https:\/\/fotografeer.nl\/index.php?rest_route=\/wp\/v2\/posts\/2381\/revisions"}],"predecessor-version":[{"id":2766,"href":"https:\/\/fotografeer.nl\/index.php?rest_route=\/wp\/v2\/posts\/2381\/revisions\/2766"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fotografeer.nl\/index.php?rest_route=\/wp\/v2\/media\/2607"}],"wp:attachment":[{"href":"https:\/\/fotografeer.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2381"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fotografeer.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2381"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fotografeer.nl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}