summaryrefslogtreecommitdiff
path: root/digital/avr/modules/usb/lufa/Projects/AVRISP_Programmer/AVRISP_Programmer.txt
blob: 1872cfb5e7354e9046bd936b02a283bb346c0862 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/** \file
 *
 *  This file contains special DoxyGen information for the generation of the main page and other special
 *  documentation pages. It is not a project source file.
 */
 
/** \mainpage AVRISP_Programmer
 *
 *  Communications Device Class demonstration application.
 *  This gives a simple reference application for implementing
 *  a USB to Serial converter using the CDC class.  Data communicated
 *  over the USB Virtual Serial Port according to Atmel's AVR910
 *  protocol is used to program AVR MCUs that are
 *  "In-System Programmable via SPI Port".
 *
 *  After running this firmware for the first time on a new computer,
 *  you will need to supply the .INF file located in this demo
 *  project's directory as the device's driver when running under
 *  Windows. This will enable Windows to use its inbuilt CDC drivers,
 *  negating the need for custom drivers for the device. Other
 *  Operating Systems should automatically use their own inbuilt
 *  CDC-ACM drivers.
 *
 *  Usage:
 *   avrdude -vv -F -P COM7 -c avr910 -p t261
 *     Note -F flag which overrides signature check and enables programming
 *     of any "In-System Programmable via SPI Port" AVR MCU.  Part number,
 *     t261, should be set to your target device.
 *   avrdude -vv -F -P COM7 -c avr910 -p t261 -U flash:w:PROG.hex
 *     PROG.hex is the hex file to program your t261 AVR with
 *   avrdude -vv -F -P COM7 -b 115200 -c avr910 -p t261 -U flash:w:test.hex
 *     The -b 115200 sets the SPI clock to 62.5kHz from the default 125kHz and may
 *     work when the default programming speed fails.
 * AVROSP.exe -dATtiny261 -cCOM7 -rf
 *     AVRosp is the Open Source AVR ISP Programming Software available from Atmel.com
 *
 *  Note: on Linux systems, COM7 should be replaced with someting like /dev/ttyACM0
 *        You can determine this value by running dmesg after plugging in the device
 *  Note: you must RESET the programmer after each use (AVRdude session).
 *
 *  Note: If you experience errors with older devices, try changing DELAY_LONG
 *  to a larger value, such as 0xFF in AVRISP_Programmer.c
 *
 *  MISO, MOSI, and SCK are connected directly from the AVRopendous board
 *  to the pin of the same functionality on the target.  RESET pin on the target
 *  can be connected either to SS (PB0), or PC2.  Do not have any other pins
 *  connected - especially HWB pin, to avoid unintentional behaviour.
 *
 *  AVR910 functionality was overlayed on USBtoSerial  functionality.
 *  Keep this in mind when looking over the code.
 *  Default target speed is 125kHz and corresponds to 19200 baud, which
 *  is the default setting for AVRdude.
 *
 *  Changing "Baud-Rate" will change the SPI speed.  Defualt SPI clock speed
 *  is 8Mhz / 4 = 2MHz.  8Mhz is the device clock speed.  This is the setting at
 *  9600 baud.  The following is a table of baud-rate vs. SPI Speed that will result
 *       9600 = 2Mhz
 *       14400 = 1MHz
 *       19200 = 125kHz (AVRdude Default)
 *       38400 = 250kHz
 *       57600 = 500kHz
 *       115200 = 62.5kHz
 *
 *
 *
 *
 *  <table>
 *   <tr>
 *    <td><b>USB Mode:</b></td>
 *    <td>Device</td>
 *   </tr>
 *   <tr>
 *    <td><b>USB Class:</b></td>
 *    <td>Communications Device Class (CDC)</td>
 *   </tr>
 *   <tr> 
 *    <td><b>USB Subclass:</b></td>
 *    <td>Abstract Control Model (ACM)</td>
 *   </tr>
 *   <tr>
 *    <td><b>Relevant Standards:</b></td>
 *    <td>USBIF CDC Class Standard</td>
 *   </tr>
 *   <tr>
 *    <td><b>Usable Speeds:</b></td>
 *    <td>Full Speed Mode</td>
 *   </tr>
 *  </table>
 */