Skip to content

Commit

Permalink
Move v1 doc to archive subdirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
microtherion committed Feb 22, 2016
1 parent 3cec2cd commit 6c57384
Show file tree
Hide file tree
Showing 39 changed files with 7,256 additions and 0 deletions.
128 changes: 128 additions & 0 deletions doc/v1/Connection.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<link href="manual.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="wizard.js"></script>
<title>Target Connection Diagrams</title>
</head>

<body>
<table class="nav">
<td>
<a href="Troubleshooting.html">Troubleshooting</a> &larr;
</td>
<td>
&uarr; <a href="index.html"><span class=logo>ScratchMonkey</span></a>
</td>
<td>
&rarr; <a href="Tested.html">Tested Configurations</a>
</td>
</table>
<h2>Target Connection Diagrams</h2>

<form name="connectionOptions">
<strong>Protocol:</strong><select name="protocol" onchange="selectProtocol()">
<option value="none"></option>
<option value="isp">ISP</option>
<option value="hvsp">HVSP</option>
<option value="hvpp">HVPP</option>
</select>
<strong>Programmer:</strong><select name="programmer" onchange="selectProgrammer()">
<option value="none"></option>
<option value="arduino">Standard Arduino</option>
<option value="micro">Leonardo / Micro</option>
</select>
<strong>Target:</strong><select name="target" onchange="selectTarget()">
<option value="none"></option>
</select>
</form>

<div class=conn style="float:left">
<p class=conn>Programmer</p>
<p style="height:5mm"></p>
<img name="programmerDiagram" src="" onerror="imageFallback(this)">
</div>
<div class=conn>
<p class=conn>Target</p>
<p style="height:5mm"></p>
<img name="targetDiagram" src="" onerror="imageFallback(this)">
</div>

<p style="clear:both; height:5mm"></p>

<div>
<h4 class=mcu>Arduino Uno/Diecimila/Duemilanove</h4>

<div class=conn>
<p class=conn>ISP</p>
<img src="img/arduino_isp.svg">
</div>

<p>An Arduino can be used to reprogram another Arduino.</p>

<p>Since the Arduino's XTAL1 pin is connected to an oscillator, the only usable protocol is ISP. In desperate circumstances, it might be possible to remove the MCU from its socket (if your board has the socketed through-hole variant of the MCU) and program it on a breadboard.</p>

<p style="clear:both"/>
</div>

<div>
<h4 class=mcu>Arduino Micro</h4>

<div class=conn>
<p class=conn>ISP</p>
<img src="img/micro_isp.png">
</div>

<p>An Arduino Micro can be reprogrammed through its pins (for the Leonardo, the same signals are connected, but you'll have to use the ICSP header). Since the Micro's XTAL1 pin is connected to an oscillator, the only usable protocol is ISP. </p>

<p style="clear:both"/>
</div>

<div>
<h4 class=mcu>Digispark</h4>

<div class=conn>
<p class=conn>HVSP</p>
<img src="img/digispark_hvsp.svg">
</div>

<p>The <a href="http://digistump.com">Digispark</a> is a tiny, <tt>ATtiny85</tt> based board featuring bitbang style USB connectivity.</p>

<p>Since the Digispark has the RESET pin disabled to obtain another I/O pin, it cannot be programmed through ISP. It needs to be programmed either through Digistump's variant of the Arduino IDE, or through HVSP.</p>

<p style="clear:both"/>
</div>


<div>
<h4 class=mcu>6 Pin ICSP Header</h4>

<div class=conn>
<p class=conn>ISP</p>
<img src="img/icsp_isp.svg" align=middle width="100%">
</div>

<p>Most Arduino boards feature one or several 6 pin ICSP headers, which can be used to program the Arduino through ISP. Be careful to:</p>

<ul>
<li>Identify the correct ICSP header: Many boards have two headers, one near the main processor, and one near the auxiliary USB interface processor. Pick the one that corresponds to your purpose.</li>
<li>Identify pin 1 correctly. On official Arduino boards, there tends to be a small white dot next to pin 1. </li>
</ul>
<p style="clear:both"/>
</div>

<table class="nav">
<td>
<a href="Troubleshooting.html">Troubleshooting</a> &larr;
</td>
<td>
&uarr; <a href="index.html"><span class=logo>ScratchMonkey</span></a>
</td>
<td>
&rarr; <a href="Tested.html">Tested Configurations</a>
</td>
</table>
</body>
</html>
103 changes: 103 additions & 0 deletions doc/v1/GettingStarted.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<link href="manual.css" rel="stylesheet" type="text/css">
<title>Getting Started with ScratchMonkey</title>
</head>

<body>
<table class="nav">
<td>
<a href="Overview.html">Overview</a> &larr;
</td>
<td>
&uarr; <a href="index.html"><span class=logo>ScratchMonkey</span></a>
</td>
<td>
&rarr; <a href="ISP.html">In-System Programming</a>
</td>
</table>
<h2>Getting Started with <span class=logo>ScratchMonkey</span></h2>

<h3>Installation</h3>

<p><span class=logo>ScratchMonkey</span> is hosted on GitHub. To download a release, get it at <a href="https://github.com/microtherion/ScratchMonkey/tags">https://github.com/microtherion/ScratchMonkey/tags</a>.</p>

<p>To get the latest version (which may or may not be in a tested, or even usable, state), clone or fork the master repository at <a href="https://github.com/microtherion/ScratchMonkey">https://github.com/microtherion/ScratchMonkey</a>.</p>

<p>Once you have an unpacked copy of <span class=logo>ScratchMonkey</span> on your disk, move the directory to your Arduino Sketchbook directory. On a Mac, this is <tt>~/Documents/Arduino</tt> by default. Finally, to make <span class=logo>ScratchMonkey</span> available in the Arduino IDE (Instructions given for Mac, but other platforms should work similarly):</p>

<img src="img/programmers.png" alt="Arduino Programmer menu when correctly installed" class=circuit>

<ul>
<li><p>Create a <tt>hardware</tt> directory in your Sketchbook directory, if it doesn't exist already:</p>

<p><kbd>mkdir ~/Documents/Arduino/hardware</kbd></p>
</li>
<li><p>Copy or link the contents of the <span class=logo>ScratchMonkey</span> hardware directory to the Sketchbook hardware directory:</p>

<pre>
ln -sh \
~/Documents/Arduino/ScratchMonkey/hardware/scratchmonkey \
~/Documents/Arduino/hardware/scratchmonkey
</pre>
</li>
</ul>

<p>If your installation was successful, the <tt>Tools</tt> &rarr; <tt>Programmer</tt> menu in your Arduino IDE should look like the picture on the right after your next restart.</p>

<h3 style="clear:both">Connecting With The Target</h3>

<p>Now it's time to connect your Arduino to your target MCU. The details for this vary between the different programming methods, and will be discussed in the individual sections.</p>

<h3>Uploading the <span class=logo>ScratchMonkey</span> sketch</h3>

<p>Before communicating with your target MCU, you first have to upload the <span class=logo>ScratchMonkey</span> software to your Arduino:</p>

<ul>
<li>Open the <span class=logo>ScratchMonkey</span> sketch in Arduino.</li>
<li>From the <tt>Tools</tt> &rarr; <tt>Board</tt> menu, select your Arduino board.</li>
<li>Upload the <span class=logo>ScratchMonkey</span> sketch.</li>
</ul>

<p>Now that your Arduino is programmed, it's often helpful to temporarily disable its <strong>RESET</strong> pin (This is not necessary on an Arduino Micro or Leonardo). On an Arduino Uno, this can be done by connecting a 10µF capacitor between the <strong>RESET</strong> and <strong>GND</strong> pins (With the "-" side of the capacitor to <strong>GND</strong>). Doing this prevents the board from resetting when <tt>avrdude</tt> connects to it, which will at least speed up the target programming process.</p>

<h3>Burning a Bootloader</h3>

<p>Now it's time to communicate with your target. In a first step, you may need to upload a bootloader to your target and/or reprogram its fuses (Despite the name, <tt>Tools</tt> &rarr; <tt>Burn Bootloader</tt> will NOT necessarily burn a bootloader. With typical ATtiny cores, only the fuse settings are programmed with this item.)</p>

<ul>
<li>From the <tt>Tools</tt> &rarr; <tt>Board</tt> menu, select your target processor or board.</li>
<li>From the <tt>Tools</tt> &rarr; <tt>Programmer</tt> menu, select:
<ul>
<li><tt>ScratchMonkey</tt> for In-System Programming</li>
<li><tt>ScratchMonkey HVSP</tt> for High Voltage Serial Programming</li>
<li><tt>ScratchMonkey HVPP</tt> for High Voltage Parallel Programming</li>
</ul></li>
<li>Select <tt>Tools</tt> &rarr; <tt>Burn Bootloader</tt>.</li>
</ul>

<h3>Uploading a Sketch</h3>

<p>To upload your actual program:</p>

<ul>
<li>Open your sketch in the Arduino IDE.</li>
<li>Select your board and programmer as above.</li>
<li>Upload your sketch.</li>
</ul>
<table class="nav">
<td>
<a href="Overview.html">Overview</a> &larr;
</td>
<td>
&uarr; <a href="index.html"><span class=logo>ScratchMonkey</span></a>
</td>
<td>
&rarr; <a href="ISP.html">In-System Programming</a>
</td>
</table>
</body>
</html>
70 changes: 70 additions & 0 deletions doc/v1/HVPP.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<link href="manual.css" rel="stylesheet" type="text/css">
<title>High Voltage Parallel Programming</title>
</head>
<body>
<table class="nav">
<td>
<a href="HVSP.html">High Voltage Serial Programming</a> &larr;
</td>
<td>
&uarr; <a href="index.html"><span class=logo>ScratchMonkey</span></a><br><a href="HighVoltage.html">High Voltage Programming</a>
</td>
<td>
&rarr; <a href="Troubleshooting.html">Troubleshooting</a>
</td>
</table>
<h2>High Voltage Parallel Programming</h2>

<img class=circuit src="img/arduino_prog_hvpp.svg">

<p>HVPP is the high voltage protocol for ATtiny and ATmega MCUs with 20 pins or more.</p>

<h3>Connecting your Standard Arduino</h3>

<p>HVPP requires 19 signals (including power and ground), as shown in this illustration. For High Voltage programming, the timing of the power pin matters, so it is software controlled through the <strong>SVCC</strong> pin, rather than simply through the <strong>5V</strong> pin of the Arduino. The <strong>HVRESET</strong> signal is used to control one of the circuits shown in the <a href="HighVoltage.html">High Voltage programming section</a> to generate the 12V signal to be applied to <strong>RESET</strong> pin of the target microcontroller. The other signals go directly to the target microcontroller.</p>

<p>Since a regular Arduino has only 18 pins available (short of reusing pins 0 and 1, which I'm not confident I can do safely), we use a 74HC595 shift register to generate most output only control signals through a serial interface. The only exceptions are <strong>XTAL</strong>, which needs to be pulsed often, and <strong>VCC</strong> and <strong>HVRESET</strong>, which never change during the programming process.</p>

<h3 style="clear:both">Connecting your Arduino Micro/Leonardo</h3>

<img class=circuit src="img/micro_prog_hvpp.png">

<p>The pin connections for an Arduino Micro are shown in this illustration, and for the Leonardo, the same pins would be used. The Micro/Leonardo has enough pins to generate the control signals without an auxiliary shift register.</p>

<h3 style="clear:both">Connecting your Target Microcontroller</h3>

<p>The HVSP signals need to be connected to the corresponding signals on your target microcontroller / board. Details for each target are discussed in the <a href="Connection.html">Connection Diagrams</a> chapter.</p>

<p>The details of HVPP control signal assignment are somewhat messy, primarily because on 20 pin MCUs, some of the control signals are multiplexed two to a single pin, and the ATtiny26/261/461/861 family does this in a somewhat different way from the ATtiny2313/4313 family of MCUs. The following table gives an mapping from <strong>CTRLn</strong> names to the names in the MCU datasheets:</p>

<table>
<tr><th>Pin <th>ATtiny861 <th>ATtiny4313 <th>Others</tr>
<tr><td>CTRL0 <td>- <td>- <td>BS2</tr>
<tr><td>CTRL2 <td>WR <td>OE <td>OE</tr>
<tr><td>CTRL3 <td>XA0 <td>WR <td>WR</tr>
<tr><td>CTRL4 <td>XA1/BS2 <td>BS1/PAGEL <td>BS1</tr>
<tr><td>CTRL5 <td>PAGEL/BS1 <td>XA0 <td>XA0</tr>
<tr><td>CTRL6 <td>- <td>XA1/BS2 <td>XA1</tr>
<tr><td>CTRL7 <td>OE <td>- <td>PAGEL</tr>
</table>

<p>For 20 pin MCUs not listed here, you need to figure out whether <strong>pp_controlstack</strong> in the avrdude configuration resembles the ATtiny861 or the ATtiny4313, and connect pins accordingly. As far as I can tell, the ATtiny26/261/461/861 is unique, and all other 20 pin MCUs use the ATtiny4313 scheme.</p>

<table class="nav">
<td>
<a href="HVSP.html">High Voltage Serial Programming</a> &larr;
</td>
<td>
&uarr; <a href="index.html"><span class=logo>ScratchMonkey</span></a><br><a href="HighVoltage.html">High Voltage Programming</a>
</td>
<td>
&rarr; <a href="Troubleshooting.html">Troubleshooting</a>
</td>
</table>
</body>
</html>
53 changes: 53 additions & 0 deletions doc/v1/HVSP.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<link href="manual.css" rel="stylesheet" type="text/css">
<title>High Voltage Serial Programming</title>
</head>
<body>
<table class="nav">
<td>
<a href="HighVoltage.html">High Voltage Programming</a> &larr;
</td>
<td>
&uarr; <a href="index.html"><span class=logo>ScratchMonkey</span></a><br><a href="HighVoltage.html">High Voltage Programming</a>
</td>
<td>
&rarr; <a href="HVPP.html">High Voltage Parallel Programming</a>
</td>
</table>
<h2>High Voltage Serial Programming</h2>

<img class=circuit src="img/arduino_prog_hvsp.svg">

<p>HVSP is the high voltage protocol for 8- and 14-pin ATtiny MCUs.</p>

<h3>Connecting your Standard Arduino</h3>

<p>HVSP requires 7 signals (including power and ground), as shown in this illustration. For High Voltage programming, the timing of the power pin matters, so it is software controlled through the <strong>SVCC</strong> pin, rather than simply through the <strong>5V</strong> pin of the Arduino. The <strong>HVRESET</strong> signal is used to control one of the circuits shown in the <a href="HighVoltage.html">High Voltage programming section</a> to generate the 12V signal to be applied to <strong>RESET</strong> pin of the target microcontroller. The other signals go directly to the target microcontroller.</p>

<h3 style="clear:both">Connecting your Arduino Micro/Leonardo</h3>

<img class=circuit src="img/micro_prog_hvsp.png">

<p>The pin connections for an Arduino Micro are shown in this illustration, and for the Leonardo, the same pins would be used. With the exception of the SVCC pin, the pin assignments are identical as for the standard Arduino</p>

<h3 style="clear:both">Connecting your Target Microcontroller</h3>

<p>The HVSP signals need to be connected to the corresponding signals on your target microcontroller / board. Details for each target are discussed in the <a href="Connection.html">Connection Diagrams</a> chapter.</p>

<table class="nav">
<td>
<a href="HighVoltage.html">High Voltage Programming</a> &larr;
</td>
<td>
&uarr; <a href="index.html"><span class=logo>ScratchMonkey</span></a><br><a href="HighVoltage.html">High Voltage Programming</a>
</td>
<td>
&rarr; <a href="HVPP.html">High Voltage Parallel Programming</a>
</td>
</table>
</body>
</html>
Loading

0 comments on commit 6c57384

Please sign in to comment.