- resolved -Compatible with ATTINY44 ?

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
borisdekat
Posts: 4
Joined: Mon May 24, 2010 11:16 pm

- resolved -Compatible with ATTINY44 ?

Post by borisdekat » Thu Jun 03, 2010 5:50 pm

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
Last edited by borisdekat on Thu Jun 10, 2010 5:47 pm, edited 1 time in total.

frank26080115
Rank 2
Rank 2
Posts: 43
Joined: Fri Jun 19, 2009 4:43 pm

Re: Compatible with ATTINY44 ?

Post by frank26080115 » Sat Jun 05, 2010 10:20 pm

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.

borisdekat
Posts: 4
Joined: Mon May 24, 2010 11:16 pm

Re: Compatible with ATTINY44 ?

Post by borisdekat » Sun Jun 06, 2010 10:32 am

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

Post Reply