element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Embedded and Microcontrollers
  • Technologies
  • More
Embedded and Microcontrollers
Embedded Forum What is the fastest way to make a microcontroller interact with a computer over USB?
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Embedded and Microcontrollers to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 14 replies
  • Answers 2 answers
  • Subscribers 463 subscribers
  • Views 2154 views
  • Users 0 members are here
  • avr
  • usb
  • embedded
  • midi
  • microcontroller
  • ftdi
Related

What is the fastest way to make a microcontroller interact with a computer over USB?

Former Member
Former Member over 10 years ago

I'm trying to build a usb MIDI controller for interfacing with audio software using AVRs.

But I found that you can let the AVR interface with the USB without any other chips or that you

can use ftdi chips.

Are these the only 2 ways? And if so, wich one is the fastest?

If someone also thinks that AVR is not the way to go for this, please let me know.

 

Thanks in advance guys!

  • Sign in to reply
  • Cancel

Top Replies

  • michaelkellett
    michaelkellett over 10 years ago in reply to Former Member +1
    I've never used the PSOCs so make sure it has good USB support before you pick that route. Perhaps one of the E14 Psoccers can comment. MK
  • dougw
    dougw over 10 years ago in reply to Former Member +1 verified
    Hi Felix, The PSoC4 module has USB, but it is not native to the PSoC4 chip, so it adds a minor delay - probably insignificant. There is also a PSoC5 prototyping kit (faster and more powerful) with native…
  • gadget.iom
    0 gadget.iom over 10 years ago

    Is this any help?

    QLab Midi Controller

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • shabaz
    0 shabaz over 10 years ago

    You can't go faster than the USB specs, see the Wikipedia page for the bit rates. And you can't process data faster than the speed of your processor - an AVR is not particularly fast. I don't think MIDI is particularly fast either (31250 baud) but clearly way slower than the AVR, so I don't get the question I'm afraid.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to gadget.iom

    Not really, but I didn't know this existed, thanks!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to shabaz

    Well I think you are refering to midi as in midi ports on synths or other devices like this shabaz:
    http://www.kenable.co.uk/images/sound_lab_5_pin_din_cable_lead.jpg

    But I'm going for something like this:

    http://static.kvraudio.com/i/b/base_01_angle.jpg

    It's basically just a bunch of buttons that should send a midi-singal over usb as fast as possible.

    So I'm trying to find out how to get the best response out of my buttons with the least latency.

     

    But your reply did help alot!
    I think I just forgot to see the obvious as you stated, because some controllers have a high latency and I kinda

    thought I would make the wrong choice in these things since I'm just starting out.

     

    So just to make sure I get this;

    I'm using an ATTiny2313 at 20MHz wich is faster than usb 1.0 wich has a speed of 12Mbit/s.

    Wich concludes in me having a fast enough microcontroller for making my midi controller, right?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • clem57
    0 clem57 over 10 years ago in reply to Former Member

    Why not USB 2.0 at 480 Mbit/s or 60 MB/s theoretical (48 MHz USB clock). Actually less of course.

    Clem

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • michaelkellett
    0 michaelkellett over 10 years ago in reply to clem57

    There is a standard for Midi over USB and I doubt that an ATTiny can support it. Think about getting  a processor with a full USB port implemented in hardware. Do some serious Google trawling and you might well find some code for an ARM based solution.

     

     

    Start here:

    https://en.wikipedia.org/wiki/MIDI#USB_and_FireWire

     

    Then Google 'midi over usb' and expect to do some reading (lots).

     

    MK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to michaelkellett

    Thanks alot Michael!

    The ARM looks like a powerful piece of hardware, but wouldn't that be a litlle overkill for this?
    It just comes down to reading a button or potentiometer state and sending the result over usb.

    Is an ARM really neccesary then?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • michaelkellett
    0 michaelkellett over 10 years ago in reply to Former Member

    If you want to talk via USB and comply with an existing standard you'll find it  a lot easier if you use a processor with some welly !

     

    The AVR is a nice 8 bit architecture but it's 20 year old technology - it is MUCH easier to code in C on a 32 bit processor without constraints on RAM or ROM. And since it doesn't cost any more (have you noticed how cheap the ST Discovery and Nucleo (£8.38 for an 100MHz Cortex M4) boards are ?)  why bother with doing it the hard way.

     

    MK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to michaelkellett

    True that.

    I've been looking further into it and I think I'm going to give they cypress PSoC 4 a go, it's only €5 for a prototype board with debugger and,

    as you said, looks tons easier then all the hard coding on the AVRs!

    Thanks alot Michael!!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to Former Member

    And ofcourse the ease to add extra stuff like LCDs and have a ton of input is just amazing!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube