{"id":294,"date":"2008-09-24T18:08:30","date_gmt":"2008-09-25T01:08:30","guid":{"rendered":"http:\/\/mightyohm.com\/blog\/?p=294"},"modified":"2022-12-27T18:04:41","modified_gmt":"2022-12-28T02:04:41","slug":"arduino-based-avr-high-voltage-programmer","status":"publish","type":"post","link":"https:\/\/mightyohm.com\/blog\/2008\/09\/arduino-based-avr-high-voltage-programmer\/","title":{"rendered":"Arduino-based AVR High Voltage Programmer"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"http:\/\/mightyohm.com\/files\/flickr\/2885607891_01e915c419.jpg?v=1222380712\" alt=\"Arduino-based AVR High Voltage Programmer\" width=\"500\" height=\"375\" \/><\/p>\n<p><strong>Update 01\/02\/09: <\/strong>A PCB version of this circuit is in the design stages &#8211; <a href=\"http:\/\/mightyohm.com\/blog\/2009\/01\/avr-hv-programmer-shield-in-the-works\/\">some preliminary information is here<\/a>.<\/p>\n<p><strong>Update 03\/11\/09:<\/strong> Kits based on this design are <a href=\"http:\/\/mightyohm.com\/blog\/products\/avr-hv-rescue-shield\/\">now for sale<\/a>!<\/p>\n<p><strong>Update 12\/14\/10:<\/strong> The original AVR HV Rescue Shield kit has been replaced by the new and improved HV Rescue Shield 2. \u00a0Visit the\u00a0<a href=\"http:\/\/mightyohm.com\/hvrescue2\">HV Rescue Shield 2 product page<\/a> for information about the new kit!<\/p>\n<p><a href=\"http:\/\/mightyohm.com\/blog\/2008\/09\/i-programmed-the-rstdisbl-fuse\/\">As I mentioned earlier this week<\/a>, I recently &#8220;lost&#8221; an <a href=\"http:\/\/www.atmel.com\/dyn\/products\/Product_card.asp?part_id=3303\">ATmega168<\/a> due to flashing the configuration fuses to disable the RESET pin, without realizing that this makes the device <a href=\"http:\/\/support.atmel.no\/bin\/customer?=&amp;action=viewKbEntry&amp;id=13\">impossible to reflash with SPI<\/a>.\u00a0 This is particularly frustrating because the device is still 100% functional, just completely deaf to ordinary serial programmers.\u00a0 The only way to recover the device is using what Atmel calls &#8220;High Voltage Parallel Programming Mode&#8221; which very few programmers support, most importantly, not the <a href=\"http:\/\/ladyada.net\/make\/usbtinyisp\/\">USBtinyISP<\/a> I otherwise love.<\/p>\n<p>Fortunately, my trusty <a href=\"http:\/\/www.arduino.cc\">Arduino<\/a> came to the rescue &#8211; I created an Arduino-based AVR programmer that uses the high voltage programming mode and can fix pesky fuses like RSTDISBL.<\/p>\n<p>The Arduino has just enough IO to implement the entire HV protocol plus a &#8220;go&#8221; button.\u00a0 So far I have only implemented setting LFUSE and HFUSE in software, but there is no reason why the code couldn&#8217;t be extended to support chip erase and programming the entire flash as well.<\/p>\n<p><strong>Overview:<\/strong><\/p>\n<p>The fuse programming process is simple:<\/p>\n<ul>\n<li>Upload the HVFuse sketch to the Arduino, available for download here: <a href=\"http:\/\/mightyohm.com\/blog\/wp-content\/uploads\/2008\/09\/hvfuse.pde\">HVFuse.pde<\/a><\/li>\n<li>Install the shield and apply +12VDC to the terminals on the left<\/li>\n<li>Wait for the red LED to turn on (if it isn&#8217;t already)<\/li>\n<li>Install the ATmega to be repaired<\/li>\n<li>Push the button<\/li>\n<li>As soon as the LED turns back on, the AVR is fixed and ready to be put back into service!<\/li>\n<\/ul>\n<p><strong>Schematic:<\/strong><\/p>\n<p>Here is an Eagle schematic of the HV Programming shield (click to enlarge):<\/p>\n<p><strong>Update 12\/17\/08<\/strong>:\u00a0 An observant reader pointed out that there were three errors in the way GND\/AGND, AREF and VCC\/AVCC were connected on the target AVR in the original schematic.\u00a0 The errors have been fixed and the updated schematic is below.\u00a0 Apologies for any confusion this caused.<\/p>\n<p><a href=\"http:\/\/mightyohm.com\/blog\/wp-content\/uploads\/2008\/09\/hvfuse_fixed.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"860\" data-permalink=\"https:\/\/mightyohm.com\/blog\/2008\/09\/arduino-based-avr-high-voltage-programmer\/hvfuse_fixed\/\" data-orig-file=\"https:\/\/mightyohm.com\/blog\/wp-content\/uploads\/2008\/09\/hvfuse_fixed.png\" data-orig-size=\"1368,1002\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"hvfuse_fixed.sch\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/mightyohm.com\/blog\/wp-content\/uploads\/2008\/09\/hvfuse_fixed-1024x750.png\" class=\"alignnone size-medium wp-image-860\" title=\"hvfuse_fixed.sch\" src=\"http:\/\/mightyohm.com\/blog\/wp-content\/uploads\/2008\/09\/hvfuse_fixed.png\" alt=\"hvfuse_fixed.sch\" width=\"500\" height=\"366\" srcset=\"https:\/\/mightyohm.com\/blog\/wp-content\/uploads\/2008\/09\/hvfuse_fixed.png 1368w, https:\/\/mightyohm.com\/blog\/wp-content\/uploads\/2008\/09\/hvfuse_fixed-300x219.png 300w, https:\/\/mightyohm.com\/blog\/wp-content\/uploads\/2008\/09\/hvfuse_fixed-1024x750.png 1024w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p><strong>Parts list:<\/strong><\/p>\n<ul>\n<li>An Arduino NG, <a href=\"http:\/\/arduino.cc\/en\/Main\/ArduinoBoardDiecimila\">Diecimila<\/a>, or compatible<\/li>\n<li>A piece of perfboard cut to size<\/li>\n<li>Header pins for the Arduino interface (note I had to drill some of the holes to get the headers to fit the <a href=\"http:\/\/mightyohm.com\/blog\/2008\/09\/arduino-fix-your-pin-spacing\/\">nonstandard pin spacing<\/a> for digital lines 8-13.<\/li>\n<li>An LED which indicates when it is ok to insert\/remove the AVR<\/li>\n<li>A 2N3903 or similar NPN transistor (2N2222, etc.)<\/li>\n<li>(20) 1k resistors &#8211; these protect the Arduino from short circuits in case something goes wrong<\/li>\n<li>A pushbutton switch &#8211; this is the &#8216;go&#8217; button<\/li>\n<li>A 28 pin socket for the target AVR<\/li>\n<\/ul>\n<h4><strong>Kits!<\/strong><\/h4>\n<p><strong><\/strong> A kit version of this project is available. \u00a0Visit the\u00a0<a href=\"http:\/\/mightyohm.com\/hvrescue2\">HV Rescue Shield 2 product page<\/a> for more information.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Update 01\/02\/09: A PCB version of this circuit is in the design stages &#8211; some preliminary information is here. Update 03\/11\/09: Kits based on this design are now for sale! Update 12\/14\/10: The original AVR HV Rescue Shield kit has been replaced by the new and improved HV Rescue Shield 2. \u00a0Visit the\u00a0HV Rescue Shield &hellip; <a href=\"https:\/\/mightyohm.com\/blog\/2008\/09\/arduino-based-avr-high-voltage-programmer\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Arduino-based AVR High Voltage Programmer<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":860,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[65,10,443],"tags":[63,61,502],"class_list":["post-294","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-kits","category-microcontrollers","category-projects-2","tag-arduino","tag-avr","tag-microcontrollers"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/mightyohm.com\/blog\/wp-content\/uploads\/2008\/09\/hvfuse_fixed.png","jetpack_shortlink":"https:\/\/wp.me\/pioCd-4K","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":2343,"url":"https:\/\/mightyohm.com\/blog\/2009\/09\/looking-for-feedback-on-the-avr-hv-rescue-shield\/","url_meta":{"origin":294,"position":0},"title":"Looking for feedback on the AVR HV Rescue Shield","author":"Jeff","date":"September 9, 2009","format":false,"excerpt":"Back in March, I released the AVR HV Rescue Shield, my first open source hardware kit.\u00a0 The AVR HV Rescue Shield is a high voltage parallel mode fuse programmer for Atmel AVR microcontrollers. Since then, I've sold dozens of kits around the world. If you bought a kit, I want\u2026","rel":"","context":"In &quot;Electronics&quot;","block_context":{"text":"Electronics","link":"https:\/\/mightyohm.com\/blog\/category\/electronics\/"},"img":{"alt_text":"AVR HV Rescue Shield","src":"https:\/\/i0.wp.com\/www.mightyohm.com\/blog\/wp-content\/uploads\/2009\/03\/rescue-shield-installed-close_scaled-500x375.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1419,"url":"https:\/\/mightyohm.com\/blog\/2009\/03\/introducing-the-avr-hv-rescue-shield\/","url_meta":{"origin":294,"position":1},"title":"Introducing the AVR HV Rescue Shield","author":"Jeff","date":"March 11, 2009","format":false,"excerpt":"This all started last year, when I was playing with an ATmega168 microcontroller and did something silly.\u00a0 I programmed the RSTDISBL fuse bit, which effectively makes it impossible to reflash the chip using an ordinary (serial) programmer. Instead of giving up and throwing out the \"dead\" chip,\u00a0 I decided to\u2026","rel":"","context":"In &quot;Electronics&quot;","block_context":{"text":"Electronics","link":"https:\/\/mightyohm.com\/blog\/category\/electronics\/"},"img":{"alt_text":"AVR HV Rescue Shield with ATmega168 target ","src":"https:\/\/i0.wp.com\/mightyohm.com\/blog\/wp-content\/uploads\/2009\/03\/rescue-shield-with-atmega2_scaled-500x375.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":2966,"url":"https:\/\/mightyohm.com\/blog\/2010\/06\/hv-rescue-shield-sale\/","url_meta":{"origin":294,"position":2},"title":"Sale: 20% off AVR HV Rescue Shield","author":"Jeff","date":"June 16, 2010","format":false,"excerpt":"Now through July 9th, order an AVR HV Rescue Shield kit and get 20% off! AVR HV Rescue Shield Kit - $19.95","rel":"","context":"In &quot;Electronics&quot;","block_context":{"text":"Electronics","link":"https:\/\/mightyohm.com\/blog\/category\/electronics\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mightyohm.com\/blog\/wp-content\/uploads\/2009\/03\/rescue-shield-with-atmega2_scaled-500x375.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":2408,"url":"https:\/\/mightyohm.com\/blog\/2009\/09\/avr-hv-rescue-shield-kits-back-in-stock-new-lower-pricing\/","url_meta":{"origin":294,"position":3},"title":"AVR HV Rescue Shield kits back in stock, new lower pricing!","author":"Jeff","date":"September 18, 2009","format":false,"excerpt":"Good news!\u00a0 The AVR HV Rescue Shield kits are back in stock, with new, lower pricing! The full kit, which has been reduced to $19, includes a professionally made PCB with preassembled DC-DC converter and all the parts you need to build the AVR HV Rescue Shield. The PCB-only option\u2026","rel":"","context":"In &quot;Electronics&quot;","block_context":{"text":"Electronics","link":"https:\/\/mightyohm.com\/blog\/category\/electronics\/"},"img":{"alt_text":"AVR HV Rescue Shield Kit Components","src":"https:\/\/i0.wp.com\/www.mightyohm.com\/blog\/wp-content\/uploads\/2009\/03\/rescue-shield-materials_scaled-500x375.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":3027,"url":"https:\/\/mightyohm.com\/blog\/2010\/08\/avr-hv-rescue-shield-code-update-1-2\/","url_meta":{"origin":294,"position":4},"title":"AVR HV Rescue Shield Code Update 1.2","author":"Jeff","date":"August 18, 2010","format":false,"excerpt":"Version 1.2 of the Arduino sketch that powers the AVR HV Rescue Shield is now available for download. The revised sketch now displays the target AVR's existing fuse settings before asking you for new ones. I also cleaned up and reworked the code in a couple places, but these changes\u2026","rel":"","context":"In &quot;Electronics&quot;","block_context":{"text":"Electronics","link":"https:\/\/mightyohm.com\/blog\/category\/electronics\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":15985,"url":"https:\/\/mightyohm.com\/blog\/2024\/03\/hv-rescue-shield-kit-blowout-kits-are-now-50-off-at-amazon-com\/","url_meta":{"origin":294,"position":5},"title":"HV Rescue Shield Kit Blowout! Kits are now 50% off at Amazon.com","author":"Jeff","date":"March 29, 2024","format":false,"excerpt":"For a limited time, my AVR HV Rescue Shield kit is on sale for 50% off at Amazon.com. These kits are handy for modifying the fuse bytes on many popular Atmel Microchip AVR microcontrollers. The Rescue Shield works even when traditional serial programmers can't talk to the AVR. This can\u2026","rel":"","context":"In &quot;Announcements&quot;","block_context":{"text":"Announcements","link":"https:\/\/mightyohm.com\/blog\/category\/announcements\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mightyohm.com\/blog\/wp-content\/uploads\/2010\/12\/HVRescue211-418x500.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/posts\/294","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/comments?post=294"}],"version-history":[{"count":28,"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/posts\/294\/revisions"}],"predecessor-version":[{"id":15786,"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/posts\/294\/revisions\/15786"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/media\/860"}],"wp:attachment":[{"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/media?parent=294"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/categories?post=294"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/tags?post=294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}