Page 1 of 1

Attiny85 pin inversion (PB2 to D-/PB0 to D+)

Posted: Thu Oct 20, 2011 3:05 pm
by honupata
Hi

I'm doing an e-mail notifier with VUSB for G-mail.
My Project works fine, I use a Attiny85 without Crystal (I use calibrateOscillator) and I connected
- PB0 to D-
- PB2 to D+

I'm now trying for more than a week to connect (Will be easy for making the PCB)
- PB2 to D-
- PB0 to D+

I try to mess with the Optional MCU, look on Google for hours, without luke, I now it is something with the INT0. :D

Can someone please give me a clue how to setup the Optional MCU, or fix the INT0 issue.

Thank you

Re: Attiny85 pin inversion (PB2 to D-/PB0 to D+)

Posted: Thu Oct 20, 2011 4:17 pm
by Guest
Have a closer look to this thread: http://forums.obdev.at/viewtopic.php?f=8&t=6005

Cheerio,
Volker.

Re: Attiny85 pin inversion (PB2 to D-/PB0 to D+)

Posted: Fri Oct 21, 2011 3:36 am
by honupata
Thank you Vloker,

That did the trick. Here is my working config now

#define USB_CFG_IOPORTNAME B
#define USB_CFG_DMINUS_BIT 2 // D-
#define USB_CFG_DPLUS_BIT 0 // D+

#define USB_INTR_CFG PCMSK
#define USB_INTR_CFG_SET (1 << PCINT2)
#define USB_INTR_CFG_CLR 0
#define USB_INTR_ENABLE GIMSK
#define USB_INTR_ENABLE_BIT PCIE
#define USB_INTR_PENDING GIFR
#define USB_INTR_PENDING_BIT PCIF
#define USB_INTR_VECTOR PCINT0_vect

Honupata