Minor documentation cleanups.
[pub/USBasp.git] / Projects / AVRISP-MKII / AVRISP.txt
1 /** \file
2 *
3 * This file contains special DoxyGen information for the generation of the main page and other special
4 * documentation pages. It is not a project source file.
5 */
6
7 /** \mainpage AVRISP MKII Programmer Project
8 *
9 * \section SSec_Compat Project Compatibility:
10 *
11 * The following list indicates what microcontrollers are compatible with this project.
12 *
13 * - Series 7 USB AVRs
14 * - Series 6 USB AVRs
15 * - Series 4 USB AVRs
16 * - Series 2 USB AVRs (8KB versions with reduced features only)
17 *
18 * \section SSec_Info USB Information:
19 *
20 * The following table gives a rundown of the USB utilization of this project.
21 *
22 * <table>
23 * <tr>
24 * <td><b>USB Mode:</b></td>
25 * <td>Device</td>
26 * </tr>
27 * <tr>
28 * <td><b>USB Class:</b></td>
29 * <td>Vendor Specific Class</td>
30 * </tr>
31 * <tr>
32 * <td><b>USB Subclass:</b></td>
33 * <td>N/A</td>
34 * </tr>
35 * <tr>
36 * <td><b>Relevant Standards:</b></td>
37 * <td>Atmel AVRISP MKII Protocol Specification</td>
38 * </tr>
39 * <tr>
40 * <td><b>Usable Speeds:</b></td>
41 * <td>Full Speed Mode</td>
42 * </tr>
43 * </table>
44 *
45 * \section SSec_Description Project Description:
46 *
47 * Firmware for an AVRStudio compatible AVRISP-MKII clone programmer. This project will enable the USB AVR series of
48 * microcontrollers to act as a clone of the official Atmel AVRISP-MKII programmer, usable within AVRStudio. In its
49 * most basic form, it allows for the programming of 5V AVRs from within AVRStudio with no special hardware other than
50 * the USB AVR and the parts needed for the USB interface. If the user desires, more advanced circuits incorporating
51 * level conversion can be made to allow for the programming of 3.3V AVR designs.
52 *
53 * This device spoofs Atmel's official AVRISP-MKII device PID so that it remains compatible with Atmel's AVRISP-MKII
54 * drivers. When prompted, direct your OS to install Atmel's AVRISP-MKII drivers provided with AVRStudio.
55 *
56 * Note that this design currently has the following limitations:
57 * - Minimum ISP target clock speed of 500KHz due to hardware SPI module prescaler limitations
58 * - No reversed/shorted target connector detection and notification
59 * - A seperate header is required for each of the ISP, PDI and TPI programming protocols that the user wishes to use
60 * - XMEGA EEPROM erase section command does not work (but EEPROM read/write and chip erase does)
61 *
62 * On AVR models with an ADC converter, AVCC should be tied to 5V (e.g. VBUS) and the VTARGET_ADC_CHANNEL token should be
63 * set to an appropriate ADC channel number in the project makefile for VTARGET detection to operate correctly. On models
64 * without an ADC converter, VTARGET will report a fixed 5V level at all times.
65 *
66 * While this application can be compiled for USB AVRs with as little as 8KB of FLASH, for full functionality 16KB or more
67 * of FLASH is required. On 8KB devices, ISP or PDI/TPI programming support can be disabled to reduce program size.
68 *
69 * \section Sec_ISP ISP Connections
70 * Connections to the device for SPI programming (when enabled):
71 *
72 * <table>
73 * <tr>
74 * <td><b>Programmer Pin:</b></td>
75 * <td><b>Target Device Pin:</b></td>
76 * <td><b>ISP 6 Pin Layout:</b></td>
77 * </tr>
78 * <tr>
79 * <td>MISO</td>
80 * <td>PDO</td>
81 * <td>1</td>
82 * </tr>
83 * <tr>
84 * <td>ADCx <b><sup>1</sup></b></td>
85 * <td>VTARGET</td>
86 * <td>2</td>
87 * </tr>
88 * <tr>
89 * <td>SCLK</td>
90 * <td>SCLK</td>
91 * <td>3</td>
92 * </tr>
93 * <tr>
94 * <td>MOSI</td>
95 * <td>PDI</td>
96 * <td>4</td>
97 * </tr>
98 * <tr>
99 * <td>PORTx.y <b><sup>2</sup></b></td>
100 * <td>/RESET</td>
101 * <td>5</td>
102 * </tr>
103 * <tr>
104 * <td>GND</td>
105 * <td>GND</td>
106 * <td>6</td>
107 * </tr>
108 * </table>
109 *
110 * In addition, the AVR's XCK pin will generate a .5MHz clock when SPI programming is used, to act as an external
111 * device clock if the fuses have been mis-set. To use the recovery clock, connect XCK to the target AVR's XTAL1
112 * pin, and set the ISP programming speed to 125KHz or below.
113 *
114 * <b><sup>1</sup></b> <i>Optional, see \ref SSec_Options section - for USB AVRs with ADC modules only</i> \n
115 * <b><sup>2</sup></b> <i>See AUX line related tokens in the \ref SSec_Options section</i>
116 *
117 * \section Sec_PDI PDI Connections
118 * Connections to the device for PDI programming (when enabled):
119 *
120 * <table>
121 * <tr>
122 * <td><b>Programmer Pin:</b></td>
123 * <td><b>Target Device Pin:</b></td>
124 * <td><b>PDI 6 Pin Layout:</b></td>
125 * </tr>
126 * <tr>
127 * <td>Tx/Rx <b><sup>2</sup></b></td>
128 * <td>DATA</td>
129 * <td>1</td>
130 * </tr>
131 * <tr>
132 * <td>ADCx <b><sup>1</sup></b></td>
133 * <td>VTARGET</td>
134 * <td>2</td>
135 * </tr>
136 * <tr>
137 * <td>N/A</td>
138 * <td>N/A</td>
139 * <td>3</td>
140 * </tr>
141 * <tr>
142 * <td>N/A</td>
143 * <td>N/A</td>
144 * <td>4</td>
145 * </tr>
146 * <tr>
147 * <td>XCK</td>
148 * <td>CLOCK</td>
149 * <td>5</td>
150 * </tr>
151 * <tr>
152 * <td>GND</td>
153 * <td>GND</td>
154 * <td>6</td>
155 * </tr>
156 * </table>
157 *
158 * <b><sup>1</sup></b> <i>Optional, see \ref SSec_Options section - for USB AVRs with ADC modules only</i> \n
159 * <b><sup>2</sup></b> <i>The AVR's Tx and Rx become the DATA line when connected together via a pair of 220 ohm resistors</i> \n
160 *
161 * \section Sec_TPI TPI Connections
162 * Connections to the device for TPI programming (when enabled):
163 *
164 * <table>
165 * <tr>
166 * <td><b>Programmer Pin:</b></td>
167 * <td><b>Target Device Pin:</b></td>
168 * <td><b>TPI 6 Pin Layout:</b></td>
169 * </tr>
170 * <tr>
171 * <td>Tx/Rx <b><sup>2</sup></b></td>
172 * <td>DATA</td>
173 * <td>1</td>
174 * </tr>
175 * <tr>
176 * <td>ADCx <b><sup>1</sup></b></td>
177 * <td>VTARGET</td>
178 * <td>2</td>
179 * </tr>
180 * <tr>
181 * <td>XCK <b><sup>2</sup></b></td>
182 * <td>CLOCK</td>
183 * <td>3</td>
184 * </tr>
185 * <tr>
186 * <td>N/A</td>
187 * <td>N/A</td>
188 * <td>4</td>
189 * </tr>
190 * <tr>
191 * <td>PORTx.y <b><sup>3</sup></b></td>
192 * <td>/RESET</td>
193 * <td>5</td>
194 * </tr>
195 * <tr>
196 * <td>GND</td>
197 * <td>GND</td>
198 * <td>6</td>
199 * </tr>
200 * </table>
201 *
202 * <b><sup>1</sup></b> <i>Optional, see \ref SSec_Options section - for USB AVRs with ADC modules only</i> \n
203 * <b><sup>2</sup></b> <i>The AVR's Tx and Rx become the DATA line when connected together via a pair of 220 ohm resistors</i> \n
204 * <b><sup>3</sup></b> <i>See AUX line related tokens in the \ref SSec_Options section</i>
205 *
206 * \section SSec_Options Project Options
207 *
208 * The following defines can be found in this project, which can control the project behaviour when defined, or changed in value.
209 *
210 * <table>
211 * <tr>
212 * <td><b>Define Name:</b></td>
213 * <td><b>Location:</b></td>
214 * <td><b>Description:</b></td>
215 * </tr>
216 * <tr>
217 * <td>AUX_LINE_PORT</td>
218 * <td>Makefile CDEFS</td>
219 * <td>PORT register for the programmer's AUX target line. The use of this line varies between the programming protocols,
220 * but is generally used for the target's /RESET line. <i>Ignored when compiled for the XPLAIN board.</i></td>
221 * </tr>
222 * <tr>
223 * <td>AUX_LINE_PIN</td>
224 * <td>Makefile CDEFS</td>
225 * <td>PIN register for the programmer's AUX target line. The use of this line varies between the programming protocols,
226 * but is generally used for the target's /RESET line. <i>Ignored when compiled for the XPLAIN board.</i></td>
227 * </tr>
228 * <tr>
229 * <td>AUX_LINE_DDR</td>
230 * <td>Makefile CDEFS</td>
231 * <td>DDR register for the programmer's AUX target line. The use of this line varies between the programming protocols,
232 * but is generally used for the target's /RESET line. <i>Ignored when compiled for the XPLAIN board.</i></td>
233 * </tr>
234 * <tr>
235 * <td>AUX_LINE_MASK</td>
236 * <td>Makefile CDEFS</td>
237 * <td>Mask for the programmer's AUX target line. The use of this line varies between the programming protocols,
238 * but is generally used for the target's /RESET line. <b>Must not be the AVR's /SS pin</b>. <i>Ignored when
239 * compiled for the XPLAIN board.</i></td>
240 * </tr>
241 * <tr>
242 * <td>VTARGET_ADC_CHANNEL</td>
243 * <td>Makefile CDEFS</td>
244 * <td>ADC channel number (on supported AVRs) to use for VTARGET level detection, if NO_VTARGET_DETECT is not defined.
245 * <i>Ignored when compiled for targets lacking an ADC.</i></td>
246 * </tr>
247 * <tr>
248 * <td>ENABLE_ISP_PROTOCOL</td>
249 * <td>Makefile CDEFS</td>
250 * <td>Define to enable SPI programming protocol support. <i>Ignored when compiled for the XPLAIN board.</i></td>
251 * </tr>
252 * <tr>
253 * <td>ENABLE_XPROG_PROTOCOL</td>
254 * <td>Makefile CDEFS</td>
255 * <td>Define to enable PDI and TPI programming protocol support. <i>Ignored when compiled for the XPLAIN board.</i></td>
256 * </tr>
257 * <tr>
258 * <td>NO_VTARGET_DETECT</td>
259 * <td>Makefile CDEFS</td>
260 * <td>Define to disable VTARGET sampling and reporting on AVR models with an ADC converter. This will cause the programmer
261 * to report a fixed 5V target voltage to the host regardless of the real target voltage. <i>Ignored when compiled for
262 * targets lacking an ADC.</i></td>
263 * </tr>
264 * <tr>
265 * <td>VTARGET_REF_VOLTS</td>
266 * <td>Makefile CDEFS</td>
267 * <td>Indicates the programmer AVR's AVCC reference voltage when measuring the target's supply voltage. Note that the supply
268 * voltage should never exceed the reference voltage on the programmer AVR without some form of protection to prevent damage
269 * to the ADC. <i>Ignored when compiled for targets lacking an ADC, or when NO_VTARGET_DETECT is defined.</i></td>
270 * </tr>
271 * <tr>
272 * <td>VTARGET_SCALE_FACTOR</td>
273 * <td>Makefile CDEFS</td>
274 * <td>Indicates the target's supply voltage scale factor when applied to the ADC. A simple resistive divider can be used on the
275 * ADC pin for measuring the target's supply voltage, so that voltages above the programmer AVR's AVCC reference voltage can be
276 * measured. This should be the reciprocal of the division performed - e.g. if the VTARGET voltage is halved, this should be set
277 * to 2. <i>Ignored when compiled for targets lacking an ADC, or when NO_VTARGET_DETECT is defined.</i></td>
278 * </tr>
279 * <tr>
280 * <td>LIBUSB_DRIVER_COMPAT</td>
281 * <td>Makefile CDEFS</td>
282 * <td>Define to switch to a non-standard endpoint scheme, breaking compatibility with AVRStudio under Windows but making
283 * the code compatible with software such as avrdude (all platforms) that use the libUSB driver.
284 * </tr>
285 * </table>
286 */