Page 1 of 1

BootLoadHID doesn't work

Posted: Fri Oct 24, 2008 2:17 am
by xiao
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)

ee

Posted: Fri Oct 24, 2008 6:16 am
by xiao
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

Posted: Tue Nov 04, 2008 11:59 am
by christian
PORTC is the output port (more or less write-only) while PINC is the input port (read-only).