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

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
honupata
Posts: 14
Joined: Sat Sep 24, 2011 1:53 am

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

Post by honupata » Thu Oct 20, 2011 3:05 pm

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

Guest

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

Post by Guest » Thu Oct 20, 2011 4:17 pm

Have a closer look to this thread: http://forums.obdev.at/viewtopic.php?f=8&t=6005

Cheerio,
Volker.

honupata
Posts: 14
Joined: Sat Sep 24, 2011 1:53 am

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

Post by honupata » Fri Oct 21, 2011 3:36 am

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

Post Reply