firmware .......... Source code of the controller firmware.
firmware/usbdrv ... USB driver -- See Readme.txt in that directory for info
License.txt ....... Public license (GPL2) for all contents of this project.
-Changelog.txt ..... Logfile documenting changes in soft-, firm- and hardware.
+
Schematics.txt .... File giving infos about default and recommended hw-layout.
================
For questions, reports, suggestions or just for fun please contact
Stephan Baerwolf (matrixstorm@gmx.de) and/or visit demonstration-board
-for USBaspLoader at http://matrixstorm.com/avr/tinyusbboard/
+for USBaspLoader at
+
+ http://matrixstorm.com/avr/tinyusbboard/
+
For more information about Objective Development's firmware-only USB driver
for Atmel's AVR microcontrollers please visit the URL
--
recent version:
-(c) 2012 by Stephan Baerwolf
+(c) 2013 by Stephan Baerwolf
matrixstorm@gmx.de
initial version:
(there are much more cheap ICs for this), it is recommended to use those
PINs for USB-Interface (this is the default, but it can be changed):
-USBD+ (green) --> PIN4 (PD2)
-USBD- (white) --> PIN12 (PD6, AIN0)
+USBD+ (green) --> PIN4 (PD2) (usually INT0 PIN)
+USBD- (white) --> PIN13 (PD7, AIN1) (new since Rev.3)
-BUTTON SWITCH --> PIN13 (PD7, AIN1)
+BUTTON SWITCH --> PIN12 (PD6, AIN0) (new since Rev.3)
+
+Since the PD6 and PD7 lines were swapped in example board revision 3,
+it is possible to use the internal analogous comperator module, too.
+(Since AIN1 can be remapped to an other PIN but AIN0 not.)
+Now having the BUTTON SWITCH on AIN0 allows external connections to
+this PIN. Before Rev.3 (Rev2 and older) this was not possible, since
+USBD- needs to be exclusive and is not routed to an external PIN on
+the board. (Now USBD- is on AIN1, which can be remapped.)
The bootloader bootup logic has changed a little bit, compared to the
original JUMPER-logic within original USBaspLoader 2010-07-27.
However most of the new logic is compatible with old JUMPER schematics:
-When RESET/PowerUP while BUTTON is pressed (PIN13 is low), then bootloader
-will start. Even if the BUTTON is release after this and PIN13 becomes HIGH,
+When RESET/PowerUP while BUTTON is pressed (PIN12 is low), then bootloader
+will start. Even if the BUTTON is release after this and PIN12 becomes HIGH,
the bootloader stays active and listens to commands as long as the BUTTON
-will be pressed (and so PIN13 becomes low) again...
+will be pressed (and so PIN12 becomes low) again...
If the BUTTON is NOT pressed at RESET/PowerUP, or pressed again while
in bootloader, the user defined firmware is started.
* Author: Christian Starkjohann
* Author: Stephan Baerwolf
* Creation Date: 2007-12-08
- * Modification Date: 2012-11-10
+ * Modification Date: 2013-03-31
* Tabsize: 4
* Copyright: (c) 2007 by OBJECTIVE DEVELOPMENT Software GmbH
* License: GNU GPL v2 (see License.txt)
- * This Revision: $Id: bootloaderconfig.h 729 2009-03-20 09:03:58Z cs $
*/
#ifndef __bootloaderconfig_h_included__
/* This is the port where the USB bus is connected. When you configure it to
* "B", the registers PORTB, PINB and DDRB will be used.
*/
+#ifndef USB_CFG_INTPORT_BIT
+ #if (defined(__AVR_ATmega640__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega2561__))
+ #define USB_CFG_INTPORT_BIT 0
+ #else
+ #define USB_CFG_INTPORT_BIT 2
+ #endif
+#endif
+/* Not all devices have their INT0 on PD2.
+ * Since "INT0" and "USB_CFG_DPLUS_BIT" should get the same signals,
+ * map them to be ideally the same:
+ * So abstract "USB_CFG_DPLUS_BIT" to this one here.
+ */
+
#ifndef USB_CFG_DMINUS_BIT
- #define USB_CFG_DMINUS_BIT 6 /* old value was 4 */
+ /* This is Revision 3 and later (where PD6 and PD7 were swapped */
+ #define USB_CFG_DMINUS_BIT 7 /* Rev.2 and previous was 6 */
#endif
/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected.
* This may be any bit in the port.
*/
#ifndef USB_CFG_DPLUS_BIT
- #define USB_CFG_DPLUS_BIT 2
+ #define USB_CFG_DPLUS_BIT USB_CFG_INTPORT_BIT
#endif
/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected.
* This may be any bit in the port. Please note that D+ must also be connected
* jumper is connected to this port
*/
#ifndef JUMPER_BIT
- #define JUMPER_BIT 7 /* old value was 0 */
+ /* This is Revision 3 and later (where PD6 and PD7 were swapped */
+ #define JUMPER_BIT 6 /* Rev.2 and previous was 7 */
#endif
/*
* jumper is connected to this bit in port "JUMPER_PORT", active low
* Author: Christian Starkjohann
* Author: Stephan Baerwolf
* Creation Date: 2007-12-08
- * Modification Date: 2012-11-10
+ * Modification Date: 2013-03-31
* Tabsize: 4
* Copyright: (c) 2007 by OBJECTIVE DEVELOPMENT Software GmbH
* License: GNU GPL v2 (see License.txt)
- * This Revision: $Id: main.c 786 2010-05-30 20:41:40Z cs $
*/
#include "spminterface.h" /* must be included as first! */
* Project: USBaspLoader
* Author: Stephan Baerwolf
* Creation Date: 2012-08-01
- * Copyright: (c) 2012 by Stephan Baerwolf
+ * Copyright: (c) 2013 by Stephan Baerwolf
* License: GNU GPL v2 (see License.txt)
- * Version: 0.95
+ * Version: 0.96
*/
#ifndef SPMINTERFACE_H_f70ba6adf7624275947e859bdbff0599
* Tabsize: 4
* Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH
* License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
- * This Revision: $Id: usbconfig.h 799 2010-07-27 17:30:13Z cs $
*/
#ifndef __usbconfig_h_included__