Page 1 of 1

- resolved -Compatible with ATTINY44 ?

Posted: Thu Jun 03, 2010 5:50 pm
by borisdekat
Hi I am wondering if I did setup my config.h correctly when using an ATTINY44 .
ATTINY44 has INT0 at PB2, but I need to use Port A as USB I/O (PA5 as D+ and PA7 as D-). ATTINY44 has no "free" inputs on PORTB (besides INT0) so I need to use PORTA....

I did connect D+ to PA5 AND to INT0 and did connect D- to PA7

So is this correct ?

#define USB_CFG_IOPORTNAME A
#define USB_CFG_DMINUS_BIT 7
#define USB_CFG_DPLUS_BIT 5

I did try the mouse example, however: Windows doesn't recogniced it...

I am wondering if I need to alter something that also PORTB (INT0) is configured correctly ?

Thanks, Boris

Re: Compatible with ATTINY44 ?

Posted: Sat Jun 05, 2010 10:20 pm
by frank26080115
it sounds like you got things right

maybe it is another commonly overlooked detail, like defining clock speed, setting the right clock fuses, boot reset vector being enabled, or something regarding the watchdog timer.

Re: Compatible with ATTINY44 ?

Posted: Sun Jun 06, 2010 10:32 am
by borisdekat
Thanks for the reply, Yes I did got it working with above settings, of course I did something stupid....ATTINY44 is a nice device with large flash (4K) reasonable nunber of ports and small package (14pins).

Maybe of interest I also tried using only PA7 and PA3, so I don't occupy 3 pins for USB.... for that I used PCINT3 instead of INT0

#define USB_CFG_IOPORTNAME A
#define USB_CFG_DMINUS_BIT 7
#define USB_CFG_DPLUS_BIT 3

#define USB_INTR_CFG PCMSK0
#define USB_INTR_CFG_SET (1 << PCINT3)
#define USB_INTR_CFG_CLR 0
#define USB_INTR_ENABLE GIMSK
#define USB_INTR_ENABLE_BIT PCIE0
#define USB_INTR_PENDING GIFR
#define USB_INTR_PENDING_BIT PCIF0
#define USB_INTR_VECTOR SIG_PIN_CHANGE0

gl, Boris