General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
-
xiao
Post
by xiao » Fri Oct 24, 2008 2:17 am
I diy a usbasp ,and it works well.
I download bootloadHID.2008-10-22,I want to use PC2 as the bootloader jumper, so modify somethine in the bootloaderconfig.h.
compile it and flash in usbasp,but my pc can not recognize it
#define USB_CFG_IOPORTNAME B
#define USB_CFG_DMINUS_BIT 0
#define USB_CFG_DPLUS_BIT 1
static inline void bootLoaderInit(void)
{
PORTC = 1 << 2; /* activate pull-up for key */
_delay_us(10); /* wait for levels to stabilize */
}
#define bootLoaderCondition() ((PORTD & (1 <<2)) == 0)
-
xiao
Post
by xiao » Fri Oct 24, 2008 6:16 am
I change
#define bootLoaderCondition() ((PORTC & (1 <<2)) == 0)
to
#define bootLoaderCondition() ((PINC & (1 <<2)) == 0)
now it works well
i don't know the difference between PORTC PINC
-
christian
- Objective Development
- Posts: 1443
- Joined: Thu Nov 09, 2006 11:46 am
Post
by christian » Tue Nov 04, 2008 11:59 am
PORTC is the output port (more or less write-only) while PINC is the input port (read-only).