V-USB on an ATmega328! - V-USB and HID Explained

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ก.พ. 2023
  • Sometimes, we only have access to microcontrollers without all of the peripherals that we need. Several cases like in the AVR line of microcontrollers involving USB support. Luckily there is a library called V-USB that allows us to bit-bang USB support into our projects.
    -- Links --
    My Website: sinelab.net
    Buy me a coffee: www.buymeacoffee.com/thesinelab
    Bitcoin Address: bc1qwlfr2ml9km4r5vhpfh7f3m60k80whhcq3ysths
    Ethereum Address: 0x7e8B8Ff8D6bD8DfB48b4A139694BB343f040Bb3f
    V-USB Download: www.obdev.at/products/vusb/in...
    Code and Schematic: sinelab.net/code/vusb-keyboar...
    USB Datasheet: sinelab.net/pdf/usb-20-specif...
    HID Datasheet: sinelab.net/pdf/hid_spec.pdf
    Usage Tables: sinelab.net/pdf/hid_usage_tab...
    Report Descriptor Checker: eleccelerator.com/usbdescreqpa...
    --
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 35

  • @chriscollins3717
    @chriscollins3717 หลายเดือนก่อน +2

    This is a very good video by an obviously very knowledgeable engineer. I have an issue though and this isn't the only video by any means. Being trained in electronics for many years I was warned of the risk to components of Electro Static Discharge or ESD. Microchips which have circuitry that is CMOS based may be especially vulnerable to ESD as the inputs may be very high impedance and therefore prone to damage by static. The static may be generated in the human body by simply walking across carpets or wearing insulated shoes. The damage caused by ESD may not be immediately obvious but may lead to premature failure later in the components life. I therefore cringe when I see unnecesary handling of devices, especially with the absence of an antistatic wristband. Devices are shipped in antistatic materials for a reason

  • @Carhill
    @Carhill ปีที่แล้ว +8

    This channel is criminally underrated.

    • @SineLab
      @SineLab  ปีที่แล้ว

      Thank you :)

  • @patrickjeromeobaldo2450
    @patrickjeromeobaldo2450 ปีที่แล้ว +3

    I really love it when people explain complicated things like it was meant for kindergarden. Thanks for this

  • @xzddakfdmiug5832
    @xzddakfdmiug5832 ปีที่แล้ว +3

    Thanks for shedding light on the HID protocol.

    • @SineLab
      @SineLab  ปีที่แล้ว

      I'm glad you found it useful.

  • @benwilson5546
    @benwilson5546 7 หลายเดือนก่อน +1

    This is amazing! I will probably spend 20-30 hours following this incredible guide

    • @SineLab
      @SineLab  7 หลายเดือนก่อน

      Thank you! It'll be a 20 hours well spent. :)

  • @dgo85
    @dgo85 ปีที่แล้ว +20

    One thing to consider is the "Speed grades" "Maximum Frequency (versus Vcc)" curves, most of the "classic" atmegas are not designed to operate at full frequency while at voltages below 4.5V, and operating on those conditions might result in unexpected problems.

    • @PainterVierax
      @PainterVierax ปีที่แล้ว +4

      yep, on Atmega chips, only a max of 8MHz is safe under 4.5V so the full operation at 3.3V suggested in the video is not viable and a bidirectional logic level shifter on D+ and D- must be used instead. v-usb users generally use some cheap zener or blue leds to clamp the voltage but it's still a dirty hack with dubious reliability.
      Newer AVR mcus don't have this issue. The most recent AVR Dx series can even set some of the i/o ports at 3.3V logic or lower independently of Vcc. This compensate the lack of modern AVR with native USB.

    • @devrim-oguz
      @devrim-oguz 5 หลายเดือนก่อน

      @@PainterVierax With the Microchip buying Atmel, one would expect USB support on the Atmega chips, but this doesn’t happen for some reason…

  • @irkedoff
    @irkedoff 7 หลายเดือนก่อน

    Thanks for the video.

  • @joshieeee20
    @joshieeee20 9 หลายเดือนก่อน

    For me, using terminal in both videos made it a bit confusing when I don't know the commands because I don't use it lol, honestly I just closed my eyes and listened again and found it easier to understand without visual aid. At no fault on your part of course.

  • @matzer8846
    @matzer8846 ปีที่แล้ว

    Great detailed description & demo ... Thank you very much 👍

    • @SineLab
      @SineLab  ปีที่แล้ว

      Glad it was helpful!

    • @aburab
      @aburab ปีที่แล้ว

      ja... demo..., thank you

    • @matzer8846
      @matzer8846 ปีที่แล้ว

      @@aburab

  • @fungyup
    @fungyup 11 หลายเดือนก่อน

    i am wondering how many people on the planet know about this thing? The HIP usb data structure is nothing new but encapsulated in modern IC. If you are not going to reinvent the protocol so what is the point to study it and compile a video to explain all of this low level tech. It is too awesome!!❤❤

  • @rockeybhaskar5834
    @rockeybhaskar5834 8 หลายเดือนก่อน

    what are the fuse values for 12 MHz?

  • @nu77byte49
    @nu77byte49 10 หลายเดือนก่อน

    Sweet channel got my sub ;)

  • @redcollard3586
    @redcollard3586 ปีที่แล้ว

    Props for leaving "a kew fee inputs" in hahaha

  • @gabrielphilips6980
    @gabrielphilips6980 ปีที่แล้ว +2

    You're talented

    • @SineLab
      @SineLab  ปีที่แล้ว +1

      Thank you

  • @giovanni.roberto
    @giovanni.roberto 20 วันที่ผ่านมา

    Nice video and explanation. I think I'll buy atmega32U4 instead 328p lol

  • @robertchauncey3270
    @robertchauncey3270 7 หลายเดือนก่อน

    This video is invaluable to me as I need to convert USB joystick and throttle control to an esp32-s3 that will control several actuators. You definitely pointed me in the right direction here but it is daunting with hundreds of pages in resources. Is there any sections I should pay attention to, or am I in for the full meal 1500 pages of everything you listed?😮‍💨 And no I am not going down to the bottom of the atlantic, quite the opposite actually, i'm building a ground effects vehicle using virpil controls😌

    • @SineLab
      @SineLab  7 หลายเดือนก่อน

      The most important document you'll need is the 'HID Usages and Descriptions' document. You don't need all of it, just find the right section in the table of contents. I'd imagine that the 'Game Controls Page' might work for your project. The hardest part will probably be making your own HID descriptor, and that's what the document will help you with.

  • @chaos.corner
    @chaos.corner 9 หลายเดือนก่อน

    Good stuff. I tried diving in from the standards docs but they're very opaque and difficult to get a handle on.

    • @SineLab
      @SineLab  9 หลายเดือนก่อน

      I agree. It's hard to wrap your head around at first.

  • @erickalexander8534
    @erickalexander8534 27 วันที่ผ่านมา

    @Sine Lab, pls if you could answer me this, does your computer recognize the microcontroller on the device manager settings????

    • @SineLab
      @SineLab  26 วันที่ผ่านมา

      Yes, as an HID keyboard.

  • @ReyDominicano
    @ReyDominicano ปีที่แล้ว

    could you do a step by step tutorial ?

  • @UKsystems
    @UKsystems 2 หลายเดือนก่อน

    what ide are you using

  • @etmax1
    @etmax1 ปีที่แล้ว

    Great job on the video, but might I suggest you turn off auto focus on your camera once you've set up your scene.

  • @untrust2033
    @untrust2033 ปีที่แล้ว +1

    The complexity of VUSB really put me off. None of the examples really showed anything imo

  • @ivolol
    @ivolol ปีที่แล้ว

    Demonstrates devices without the necessary hardware to communicate [over USB]... throws in a ATmega32U4 pro micro board, with the hardware to communicate over USB xD