{"id":49,"date":"2012-01-29T17:15:00","date_gmt":"2012-01-29T17:15:00","guid":{"rendered":"https:\/\/blog.hslracing.com\/3dprinters\/2012\/01\/29\/dapa-bootload-the-atmega644p-ah-no\/"},"modified":"2021-05-24T10:25:37","modified_gmt":"2021-05-24T09:25:37","slug":"dapa-bootload-atmega644p-ahno","status":"publish","type":"post","link":"https:\/\/blog.hslracing.com\/3dprinters\/2012\/01\/dapa-bootload-atmega644p-ahno.html","title":{"rendered":"DAPA bootload the ATmega644P &#8211; Ah&#8230;No."},"content":{"rendered":"<p>Having built myself a <a href=\"http:\/\/sanguino.cc\/breadboardsanguino\">breadboard Sanguino<\/a> in order to apply a bootloader to the ATmega644p, I decided the quickest way forward would be to build a parallel programmer or DAPA, I mean how hard can it be? a male DB25 and a couple of resistors right?<\/p>\n<p>The inspiration for this came from a couple of places: <a href=\"http:\/\/arduino.cc\/en\/Hacking\/ParallelProgrammer\">Arduino website<\/a>\u00a0and the <a href=\"http:\/\/reprap.org\/wiki\/Burning_the_Sanguino_Bootloader_using_DAPA\">Reprap wiki<\/a>.<\/p>\n<p>Well I already have all of the required parts, one of many headshells I just happen to have lying about (I hoard and almost never throw anything potentially useful away &#8211; drives my wife nuts :o)<\/p>\n<p>I like these head shells as you can wire them up however you like and then just connect them together with standard network cables, allowed me to carry all modem\/terminal male\/female DB25\/DB9 combinations with just half a dozen head shells and a network cable (very useful for serial communication between unix boxes or for console access, just build the cable you require from 2 head shells and a network cable).<\/p>\n<p>Here are the parts required for this little project:<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"http:\/\/1.bp.blogspot.com\/-clUdFyEQwJQ\/TyVb6SPNqXI\/AAAAAAAAALA\/y1MgaKEUlbQ\/s1600\/DAPA1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/1.bp.blogspot.com\/-clUdFyEQwJQ\/TyVb6SPNqXI\/AAAAAAAAALA\/y1MgaKEUlbQ\/s320\/DAPA1.jpg\" width=\"320\" height=\"240\" border=\"0\" \/><\/a><\/div>\n<p>Solder the resistors into the middle of 3 of the wires and cover with heat shrink to avoid shorts once it is all assembled.<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"http:\/\/1.bp.blogspot.com\/-bUH3YtnzNBw\/TyVb67Nq0kI\/AAAAAAAAALE\/WRiGW6aRn_A\/s1600\/DAPA2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/1.bp.blogspot.com\/-bUH3YtnzNBw\/TyVb67Nq0kI\/AAAAAAAAALE\/WRiGW6aRn_A\/s320\/DAPA2.jpg\" width=\"320\" height=\"240\" border=\"0\" \/><\/a><\/div>\n<p>Push the pins into the required<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"http:\/\/2.bp.blogspot.com\/-q56OdFNV-gM\/TyVb7AJUIEI\/AAAAAAAAALM\/-zLAMQgyq0A\/s1600\/DAPA3.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/2.bp.blogspot.com\/-q56OdFNV-gM\/TyVb7AJUIEI\/AAAAAAAAALM\/-zLAMQgyq0A\/s320\/DAPA3.jpg\" width=\"320\" height=\"240\" border=\"0\" \/><\/a><\/div>\n<p>This one actually actually takes RJ11 connectors, and only has 6 pins so I replaced the outer shell with one for an RJ45 connector\u00a0no point wasting pins unnecessarily (they are pretty modular) as I don&#8217;t actually have any RJ11 connectors to hand, but do have some network cable with an RJ45 attached (some previous project) I do have a crimp tool for this if I actually needed to make it from scratch.<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"http:\/\/3.bp.blogspot.com\/-pk8GiXWniaM\/TyVb7u0IeiI\/AAAAAAAAALU\/7S0b5e3nRGw\/s1600\/DAPA4.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/3.bp.blogspot.com\/-pk8GiXWniaM\/TyVb7u0IeiI\/AAAAAAAAALU\/7S0b5e3nRGw\/s320\/DAPA4.jpg\" width=\"320\" height=\"240\" border=\"0\" \/><\/a><\/div>\n<p>Connect it up to the breadboard, ignore the setup on the left, that is a PIC18F4550 also awaiting programming it will become a <a href=\"http:\/\/www.mikroe.com\/esupport\/index.php?_m=knowledgebase&amp;_a=viewarticle&amp;kbarticleid=158\">HID keyboard<\/a> for my <a href=\"https:\/\/blog.hslracing.com\/mame\/\">Mame cabinet<\/a>.<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"http:\/\/2.bp.blogspot.com\/-e4_asWU2CiQ\/TyVe93x926I\/AAAAAAAAALo\/PyZo7yeMb04\/s1600\/DAPA5.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/2.bp.blogspot.com\/-e4_asWU2CiQ\/TyVe93x926I\/AAAAAAAAALo\/PyZo7yeMb04\/s320\/DAPA5.jpg\" width=\"240\" height=\"320\" border=\"0\" \/><\/a><\/div>\n<div style=\"clear: both; text-align: left;\">I also make use of sections of the network cable as jumper wires for the breadboard &#8211; saves buying specialised cables, and I can have as many as I like and cut them to whatever length I like pretty much for free as I just happen to have loads of this cable (did I mention I hoard?).<\/div>\n<div style=\"clear: both; text-align: left;\"><\/div>\n<p>Well the power source became a bit of an issue &#8211; I bought a Skytronic 0-40V bench top power supply a few years back on <a href=\"http:\/\/www.ebay.co.uk\/\">Ebay<\/a>, however beyond turning it on I never actually tested it, turns out it has a fault somewhere &#8211; it turns on and displays 0.5V, but you cannot increase or decrease the voltage.<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"http:\/\/1.bp.blogspot.com\/-vZ2CgzflKQY\/TyVnnQB8F4I\/AAAAAAAAAL4\/7Oez8oHA_K4\/s1600\/Skytronic+PSU.jpeg\"><img decoding=\"async\" src=\"http:\/\/1.bp.blogspot.com\/-vZ2CgzflKQY\/TyVnnQB8F4I\/AAAAAAAAAL4\/7Oez8oHA_K4\/s1600\/Skytronic+PSU.jpeg\" border=\"0\" \/><\/a><\/div>\n<p>I took it apart and found a loose wire that was not pushed into its header correctly, however even after pushing it back in, it still won&#8217;t put out anything other than 0.5V (something to troubleshoot further another day).<\/p>\n<p>So on to a different power source option, I have a couple of transformers that powered our last set of DECT phones (recently replaced as they had pretty much stopped working), they have 4 wires in the cable and supply 7V in both AC and DC, so 7V DC it is as the input, just need to reduce this slightly to 5V and we are good to go.<br \/>\n<span style=\"text-align: left;\"><br \/>\n<\/span><br \/>\n<span style=\"text-align: left;\">Add a quick voltage regulator circuit (see the datasheet for the <a href=\"http:\/\/www.rapidonline.com\/pdf\/47-3556e.pdf\">LM7805<\/a>) and we now have a good 5V supply (about 20p worth of parts and all re-useable as none were soldered).<\/span><\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"http:\/\/3.bp.blogspot.com\/-rLVsQxoms3w\/TyVhuJgizSI\/AAAAAAAAALw\/nNs_seqUtX0\/s1600\/DAPA6.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/3.bp.blogspot.com\/-rLVsQxoms3w\/TyVhuJgizSI\/AAAAAAAAALw\/nNs_seqUtX0\/s320\/DAPA6.jpg\" width=\"320\" height=\"312\" border=\"0\" \/><\/a><\/div>\n<div style=\"clear: both; text-align: left;\">Install the <a href=\"http:\/\/arduino.cc\/en\/Main\/Software\">Arduino<\/a> software on my laptop, add the <a href=\"http:\/\/sanguino.cc\/useit\">Sanguino<\/a> host software, download and install the <a href=\"http:\/\/www.cs.ucr.edu\/~eblock\/pages\/pictools\/giveio.html\">giveio.sys<\/a>\u00a0lpt driver, select Sanguino with ATmega644P as the board type and Parallel Programmer as the Programmer and hit Burn Bootloader.<\/div>\n<div style=\"clear: both; text-align: left;\"><\/div>\n<div style=\"clear: both; text-align: left;\">Oh dear &#8211; can&#8217;t open the lpt port &#8211; giveio won&#8217;t start, even if I try manually as administrator I get error 1275 driver has been prevented from loading. After much searching and trying various work arounds, all to no avail, it seems that Windows 7 (and Vista) 64 bit operating systems will not allow unsigned drivers to load.<\/div>\n<div style=\"clear: both; text-align: left;\"><\/div>\n<div style=\"clear: both; text-align: left;\">So much for that approach, my choices now are install an old O\/S, just so I can bootload this microcontroller, or bite the bullet and actually spend some cash on something current that can do the job.<\/div>\n<div style=\"clear: both; text-align: left;\"><\/div>\n<div style=\"clear: both; text-align: left;\">Well no harm done, all it cost me was some time and a few pennies worth of parts. I have now decided to use an\u00a0<a href=\"http:\/\/www.circuitvalley.com\/2011\/04\/usbasp-usb-programmer-for-atmel-avr.html\">USBasp programmer<\/a>\u00a0and whilst I could probably make one, I doubt I could even buy the parts for anywhere near the cost of the one I ordered from\u00a0<a href=\"http:\/\/www.ebay.co.uk\/\">Ebay<\/a>\u00a0at \u00a32.69 and free postage from Hong Kong, hopefully it will arrive in a few days and we can try again to stick a bootloader on the microcontroller.<\/div>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"http:\/\/4.bp.blogspot.com\/-Q1iKM7Z_4_4\/TyVrJuxw2CI\/AAAAAAAAAMA\/Q6aGtyhvSvY\/s1600\/USBasp.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/4.bp.blogspot.com\/-Q1iKM7Z_4_4\/TyVrJuxw2CI\/AAAAAAAAAMA\/Q6aGtyhvSvY\/s320\/USBasp.jpg\" width=\"320\" height=\"240\" border=\"0\" \/><\/a><\/div>\n<div style=\"clear: both; text-align: left;\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Having built myself a breadboard Sanguino in order to apply a bootloader to the ATmega644p, I decided the quickest way forward would be to build a parallel programmer or DAPA, I mean how hard can it be? a male DB25 and a couple of resistors right? The inspiration for this came from a couple of&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-49","post","type-post","status-publish","format-standard","hentry","category-uncategorised"],"_links":{"self":[{"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/posts\/49","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/comments?post=49"}],"version-history":[{"count":1,"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/posts\/49\/revisions"}],"predecessor-version":[{"id":228,"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/posts\/49\/revisions\/228"}],"wp:attachment":[{"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/media?parent=49"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/categories?post=49"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/tags?post=49"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}