Hi there.
On my latest set of prototype boards I accidentally flipped D+ and D- so that D- is connected to D2 and D+ is connected to D4! (This is an ATMega328p) - is it possible to work around the interrupt being on the wrong port in the software or should I get out the iron and try and fudge something together?
Swapped D+/D- pins
Re: Swapped D+/D- pins
Going to go out on a limb here an assume I'm missing the point. However if I'm not, my question to you... Why not switch the defines in the config.h ?
Assuming you use the default for most projects.
to
Assuming you use the default for most projects.
Code: Select all
#define USB_CFG_DMINUS_BIT 0
/* 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 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!
to
Code: Select all
#define USB_CFG_DMINUS_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.
*/
#define USB_CFG_DPLUS_BIT 0
/* 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!
-
- Posts: 5
- Joined: Fri May 13, 2011 12:31 am
Re: Swapped D+/D- pins
Right, except that the comments below say that D- must be connected to an INT0 port.