final preparations for upcoming version 0.96
authorStephan Baerwolf <stephan.baerwolf@tu-ilmenau.de>
Sun, 31 Mar 2013 22:18:00 +0000 (00:18 +0200)
committerStephan Baerwolf <stephan.baerwolf@tu-ilmenau.de>
Sun, 31 Mar 2013 23:04:38 +0000 (23:04 +0000)
Signed-off-by: Stephan Baerwolf <stephan.baerwolf@tu-ilmenau.de>
Readme.txt
Schematics.txt
firmware/bootloaderconfig.h
firmware/main.c
firmware/spminterface.h
firmware/usbconfig.h

index 78a23af..6fed649 100644 (file)
@@ -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:
index 17dafd5..97c53cf 100644 (file)
@@ -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.
index 65b9cdb..531ba97 100644 (file)
@@ -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
index 07300b9..e40c0b5 100644 (file)
@@ -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! */
index d569cd3..dc08015 100644 (file)
@@ -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
index ae9eee6..618d79b 100644 (file)
@@ -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__