Arduino Pro Mini, ATtiny45 and V-USB

There are two parts to setup I’d like to use:

  1. Arduino Pro Mini reading a bunch of pots and buttons
  2. ATtiny45 with MIDI V-USB firmware reading data from Pro Mini and sending it to PC. ATtiny must also be able to send data from PC to Arduinos RX pin

Now, I was reading about software and hardware UART and it seems like ATtiny45 doesn’t have hardware UART. What I’m interested in, will hardware UART enabled ATtiny like 2313 or ATmega8/168/328 be able to read/send data from Arduino without coding it (just by plugging Arduinos RX/TX into ATtinys TX/RX) or V-USB firmware messes with UART stuff? Please note that both V-USB and UART are pretty new terms to me, so I don’t understand it that well.

Why do you need two devices? Why don't you do both things on the pro-mini?

fungus:
Why do you need two devices? Why don't you do both things on the pro-mini?

Because I've read that V-USB requires much CPU use, so I'm not sure how fast things would run.

kustom:
I'm not sure how fast things would run.

"reading a bunch of pots and buttons" isn't much work, I suspect it will run OK.

There's no reason V-USB firmware would mess with UART stuff, they're completely separate in the chip.

But... if there's a ready-built MIDI-to-USB software for the Tiny45 then maybe that's the easiest way to do it. Do you have a link to that?

fungus:

kustom:
I'm not sure how fast things would run.

"reading a bunch of pots and buttons" isn't much work, I suspect it will run OK.

There's no reason V-USB firmware would mess with UART stuff, they're completely separate in the chip.

But... if there's a ready-built MIDI-to-USB software for the Tiny45 then maybe that's the easiest way to do it. Do you have a link to that?

Sure: My electronics blog: Atmel Attiny45 / Attiny85 based USB MIDI controller

So, if that would work, then I should just connect RX/TX to D+/D- on USB connector, correct? (on atmega328 that is)

The mega328 RX/TX would NOT connect to directly any of the USB pins.

The Tiny45 chip acts as an interface between mega328 and USB. I'm guessing the mega328 RX/TX would connect to pins 3 and 6 of the Tiny45 on that page.

fungus:
The mega328 RX/TX would NOT connect to directly any of the USB pins.

The Tiny45 chip acts as an interface between mega328 and USB. I'm guessing the mega328 RX/TX would connect to pins 3 and 6 of the Tiny45 on that page.

I was actually talking about single chip (ATmega328 + USB connector) in last post.

kustom:
I was actually talking about single chip (ATmega328 + USB connector) in last post.

Oh, I see.

Using RX/TX seems like a bad idea on a mega328. You won't be able to use the serial port if you do that.

fungus:

kustom:
I was actually talking about single chip (ATmega328 + USB connector) in last post.

Oh, I see.

Using RX/TX seems like a bad idea on a mega328. You won't be able to use the serial port if you do that.

No, no...

Maybe I wasn't clear. Or maybe I'm missing something. We are considering this setup:

Arduino Pro Mini loaded with V-USB MIDI firmware. With that, Arduino is processing different inputs. Now, in order to actually connect Arduino with USB connector, should I directly connect RX/TX pins to D+/D- pins or?

kustom:
should I directly connect RX/TX pins to D+/D- pins?

No.

I see. I'll have to study V-USB some more then.

So, is this anywhere close to what you want,
V-USB on 328P-PU?

Ray

@mrburnette
Thanks for sharing your work the other day!

@mrburnette
Thanks for sharing your work the other day!

You are welcome! But, with V-USB the real thanks for the 328P stuff goes to RancidBacon of this forum for the keyboard library he published and for my tiny85 works the folks at Digistump, Blubie (Jenna Fox), and her micronucleus, and ihsan Kehribar at littlewire.cc and his work on the V-USB, and the author over on http://www.simpleavr.com/

My original work was for the USB/V-USB modular adapters featured here

and the Excel formulas that allow auto-parsing of the HID keyboard data:
http://www.hackster.io/rayburne/arduino-to-excel-using-v-usb

I am very excited about the new Digispark attiny85 non-interrupt (polled) V-USB implementation that is being incorporated into the bootloader2 code. I hope that this feature finds itself into a rewrite of the V-USB HID keyboard code of RancidBacon...

Of course, with the proliferation of the 32U4 MicroPro boards for around $4, the use of LUFA simply is a better approach. I purchased 5 of the boards from a N.Y. reseller of Chinese merchandise and they all checked flawless, so I ordered 10 more boards over the weekend. I have been using the $3 Chinese 328P mini boards but the extra $1 is simply well worth the investment to have USB onboard just in case I want to reflash the project... or, because all of my code has log capability over the serial port (controlled by H/L on a pin during the startup process) then this is a great way to have optional logging sent to the PC without any additional hardware or cost.

So... back to the 'you are welcome' line... posting ones projects is simply the best way to give-back to all of the folks that invest their time... I feel it is my responsibility.

Ray

Hi guys,

I'm not really think to understand all your explanations.

About the subject in general, that's is what I would like to do :
1/ make a "minimal configuration" of arduino with an Atmega328p
2/ programm my Atmega328p with sketch from a standard Arduino IDE via my other Arduino board
3/ programm the Atmega328p with the V-SUB Firmware (and more precisely for my use the V-USB-MIDI firmware)
4/ add a USB physical port on my Atmega328p
5/ be able to use input/output of the Atmega328p and the USB port together

I don't really understand if I have to bridge the Atmega328p and the USB physical port with a ATtiny or if it could be done directly like describe in my points ?

Thx in advance for your answers

TITI

TiTi_Teen:
I don’t really understand if I have to bridge the Atmega328p and the USB physical port with a ATtiny or if it could be done directly like describe in my points ?

V-USB can be very frustrating … Do not substitute the zener specifications.

More: http://www.obdev.at/products/vusb/index.html

#14 shows some pictures.
Search “VUSB” and my ID for more references.

Good luck

Ray