Page 1 of 1

USBasp

Posted: Mon Apr 09, 2007 12:43 pm
by christian
Registered forum users can rate USBasp in the poll above.

To comment on the project, reply to this topic.

Posted: Wed Oct 24, 2007 8:17 am
by gert
Great project, fully supported by the standard Ubuntu "gutsy" avrdude binary. That's what makes Open Source fun to deal with!

Since I used a different set of USB port pins (same as avrusboot, bootloaderHID and usb-led-fader), the following changes were necessary:

Code: Select all

$ diff -u ../firmware_ori/main.c main.c
--- ../firmware_ori/main.c      2007-10-23 11:34:22.000000000 +0200
+++ main.c      2007-10-23 11:40:11.000000000 +0200
@@ -240,15 +240,17 @@
 
   PORTD = 0;
   PORTB = 0;           /* no pullups on USB and ISP pins */
-  DDRD = ~(1 << 2);    /* all outputs except PD2 = INT0 */
+  //DDRD = ~(1 << 2);  /* all outputs except PD2 = INT0 */
 
-  DDRB = ~0;            /* output SE0 for USB reset */
+  //DDRB = ~0;            /* output SE0 for USB reset */
+  DDRD = ~0;            /* output SE0 for USB reset */
   j = 0;
   while(--j){           /* USB Reset by device only required on Watchdog Reset */
       i = 0;
       while(--i);       /* delay >10ms for USB reset */
   }
-  DDRB = 0;             /* all USB and ISP pins inputs */
+  //DDRB = 0;             /* all USB and ISP pins inputs */
+  DDRD = ~USBMASK;            /* all outputs except USB data */
 
   DDRC = 0x03;          /* all inputs except PC0, PC1 */
   PORTC = 0xfe;

###

$ diff -u ../firmware_ori/usbconfig.h usbconfig.h
--- ../firmware_ori/usbconfig.h 2007-10-23 11:34:22.000000000 +0200
+++ usbconfig.h 2007-10-23 11:35:42.000000000 +0200
@@ -22,7 +22,7 @@
 
 /* ---------------------------- Hardware Config ---------------------------- */
 
-#define USB_CFG_IOPORTNAME      B
+#define USB_CFG_IOPORTNAME      D
 /* 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.
  */
@@ -30,7 +30,7 @@
 /* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected.
  * This may be any bit in the port.
  */
-#define USB_CFG_DPLUS_BIT       1
+#define USB_CFG_DPLUS_BIT       2
 /* 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
  * to interrupt pin INT0!