From: Stephan Baerwolf Date: Sun, 31 Mar 2013 22:18:00 +0000 (+0200) Subject: final preparations for upcoming version 0.96 X-Git-Tag: v0.96~2 X-Git-Url: http://git.linex4red.de/pub/USBaspLoader.git/commitdiff_plain/65042b482afd45caf8926e5a116cd72349d6ffd8 final preparations for upcoming version 0.96 Signed-off-by: Stephan Baerwolf --- diff --git a/Readme.txt b/Readme.txt index 78a23af..6fed649 100644 --- a/Readme.txt +++ b/Readme.txt @@ -24,7 +24,7 @@ Readme.txt ........ The file you are currently reading. 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. @@ -103,7 +103,10 @@ MORE INFORMATION ================ 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 @@ -116,7 +119,7 @@ file "firmware/usbdrv/usbdrv.h". -- recent version: -(c) 2012 by Stephan Baerwolf +(c) 2013 by Stephan Baerwolf matrixstorm@gmx.de initial version: diff --git a/Schematics.txt b/Schematics.txt index 17dafd5..97c53cf 100644 --- a/Schematics.txt +++ b/Schematics.txt @@ -26,19 +26,27 @@ Because it is most unlikely to use the atmega8 as analogous comperator (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. diff --git a/firmware/bootloaderconfig.h b/firmware/bootloaderconfig.h index 65b9cdb..531ba97 100644 --- a/firmware/bootloaderconfig.h +++ b/firmware/bootloaderconfig.h @@ -3,11 +3,10 @@ * 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__ @@ -57,14 +56,28 @@ these macros are defined, the boot loader usees them. /* 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 @@ -77,7 +90,8 @@ these macros are defined, the boot loader usees them. * 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 diff --git a/firmware/main.c b/firmware/main.c index 07300b9..e40c0b5 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -3,11 +3,10 @@ * 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! */ diff --git a/firmware/spminterface.h b/firmware/spminterface.h index d569cd3..dc08015 100644 --- a/firmware/spminterface.h +++ b/firmware/spminterface.h @@ -2,9 +2,9 @@ * 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 diff --git a/firmware/usbconfig.h b/firmware/usbconfig.h index ae9eee6..618d79b 100644 --- a/firmware/usbconfig.h +++ b/firmware/usbconfig.h @@ -5,7 +5,6 @@ * 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__