I'm doing a project with the ATUC256L4U microcontroller, and it will require a USB type A connection. I've never worked with USBs before and the microcontroller datasheet doesn't offer much information on how the hardware should be set up. I'm aware the ATUC256L4U has dedicated USB pins, which I think will handle the necessary pull up resistors, but would the circuit really be as simple as the one below?

I've seen other circuits with protective ICs connected, are these necessary or will the dedicated micro pins handle this?

I'm also not planning on powering the device via the USB, should I still connect the 5V pin to something or just leave it unconnected?

enter image description here

  • \$\begingroup\$ You have a lot of learning ahead of you. USB is a giant pain in the backside, mostly in software. However, the USB spec is pretty clear about what hardware guidelines should be followed, and generally microcontroller manufacturers have decent application notes on how to physically connect their product. If you don't know whether the the MCU has the pullups integrated, don't assume. Also, any particular reason you're using an AVR32 instead of an ARM? \$\endgroup\$ Commented Oct 26, 2016 at 15:18
  • 2
    \$\begingroup\$ USB type-A connectors are for USB hosts. Your ATUC256L4U seems to only be capable of being a USB device. Could you clarify your plans here? \$\endgroup\$
    – brhans
    Commented Oct 26, 2016 at 15:22
  • 1
    \$\begingroup\$ ("the microcontroller datasheet doesn't offer much information on how the hardware should be set up. ") This is because most embedded chip manufacturers publish common documents for complex interfaces such as USB ports. Go back to Atmel and search for what you want. I did and there were dozens of USB documents depending on what type of USB Device (HID, CDC, ect) you are trying to make. \$\endgroup\$
    – st2000
    Commented Oct 26, 2016 at 15:22
  • \$\begingroup\$ And what @brhans said is true, you are using the wrong type of connector. You need a B on a USB Device. As for power, a USB Device does not offer power. So leave the power pin disconnected. But you might have to connect the ground. \$\endgroup\$
    – st2000
    Commented Oct 26, 2016 at 15:25
  • \$\begingroup\$ Last note, what @BrendanSimpson said is also true, unless you are emulating a USB mouse or keyboard - it is much easier to use I2C or SPI to talk to other hardware. FYI: No one (well hardly no one) writes the USB stack from scratch. They usually get it from the OEM of the processor. There's lots of PDFs on Atmel's site on this. It's that complex. \$\endgroup\$
    – st2000
    Commented Oct 26, 2016 at 15:37

3 Answers 3


This particular processor, ATUC256L4U, has support only as a USB device, and only at Full-Speed (12Mbps) rate. Therefore, as USB device, it can have either attached cable with Type-A plug, or female receptacle of B-type, either full-size B, or micro-B, since more reliable and sturdy mini-B has been obsoleted and retired by USB.org. Use of Type-A receptacle is incorrect.

The FS mode does not require too much care about board traces as transmission lines. However, depending on type of USB transceivers, a serial resistors (22-27 Ohms) with small caps (10pF) to ground might be helpful to keep the port reliable and ESD protected, maybe even without any extra suppressors.

The main concern for a USB-compliant device is what to do with VBUS signal (Vcc on the diagram). One function of VBUS is to supply power to the device (if it does not have its own). But the other important function of this pin is to inform the device that it was connected to a host. If this signal is misused (not used for this purpose), the device will have no means to detect the connection, to assert the pull-up on D+ starting USB connect negotiation (if it has self power). The point is that a good USB device should not source any voltage or significant current on any USB interface pins until it is connected to host and receives valid VBUS. Many older devices would ignore this requirement and pull-up D+ to 3V with 1.5k resistor regardless, thus violating USB specifications.

Many Atmel's MCU do have a dedicated "VBUS_detect" input pin for USB interface. For the ATUC256L4U I couldn't locate this pin right away, maybe more examination is required. If no dedicated pin, a GPIO should be used to provide this functionality.

  • \$\begingroup\$ Addition: you have to put a cap on VBUS pin, no less than 1uF, but no more than 10uF. \$\endgroup\$ Commented Oct 26, 2016 at 21:13

The answer to this mainly depends on whether you need to pass USB certification or not. If not (i.e. this is a personal project), you can probably get away with connecting the DP and DM pins directly to the jack and leaving VBUS unconnected. If you need to pass certification, you'll have to do at least the following:

  1. Monitor the state of VBUS. Only connect the DP pull-up to the line when VBUS is high. The USB module should provide a way to do this. If the USB module doesn't have a dedicated VBUS pin you can use a resistor voltage divider to reduce the 5V to something compatible with your 3.3V IO pins. It's best to use an interrupt-capable GPIO for this.

  2. Have at least 1uF but no more than 10uF of capacitance on VBUS. I've passed certification with 4.7uF so that's what I'll recommend. This is needed to pass the inrush current test. (See also this answer.)

If you don't do these things, you will fail certification.

IO/ESD protection is not necessary for functionality. Whether you want it is up to you.


simulate this circuit – Schematic created using CircuitLab

  • \$\begingroup\$ Actually, the VBUS question is not about passing certification or not. It is about following USB specifications or not for connect protocol handshake. Slogan: "no VBUS => no D plus". The certification requirements are for a reason - some OTG hosts can be confused if they see D+ before they assert VBUS. Or, if the host is powered off while this bad device is connected, the D+ pull-up can charge the host to some middle-voltage level via ESD clamps, and the host might fail to power up correctly. \$\endgroup\$ Commented Oct 26, 2016 at 23:32
  • \$\begingroup\$ I agree. I was trying to distinguish between a personal project (which might only ever connect to one PC) vs. a commercial project (which has to obey the specs and probably has to be certified to do so). \$\endgroup\$
    – Adam Haun
    Commented Oct 27, 2016 at 2:06

In systems I've been involved with the protective ICs you refer to are usually ESD supressors. I suppose whether you actually need to add protection depends on how robust you want the design to be and how suseptible the part/application is, the downside is that anything on the USB lines will potentially degrade the signal quality.

Check out the application note for your chip here. It looks like you do need the external Rs but you should check the datasheet to confirm.

Whether you need anything else in circuit depends very much on your application; mainly what speed of USB interface you are intending on using and how long you anticipate the signal traces to be. I haven't looked at your proposed micro and am not familiar with it but if you want high-speed (480Mbps) then this is another good resource.

At this speed your layout is likley to be fairly critical I think a good rule of thumb is if your trace length is 1/10 wavelength (I think thats around 6cm at 480Mhz) then you need to consider your signals as a transmission line i.e. matched impedance is required on the PCB as discussed in the articles.

On some designs I have done where we've had several high-speed USB hubs on a backplance with very long trace lengths we've had to use the common-mode chokes as described in the intel app note to get the system to pass EMC compliance testing (it was for emissions in that case).

If this all worries you a little too much stick with full-speed (<12Mbps) and you'll probably get away with anything.

Good luck.


As pointed out your chip doesn't support high-speed so my discussion about the criticality of the layout is not really that important to you. A 0 to 10R, 22pF RC on the signal lines is usually sensible, often times the manufacturer will recommend something like this. I'd always start with the manufacturer recommendations.

  • \$\begingroup\$ That app note is for the wrong chip. It covers high speed, not full speed. \$\endgroup\$
    – Adam Haun
    Commented Oct 26, 2016 at 21:22
  • \$\begingroup\$ Yeah, I foolishly didn't check what speed the chip runs at before posting. I just assumed it was high, same applies though, you're still supposed to get 90R impedance but as it's only 12MHz transmission line effects only come into play at MUCH longer track lengths. \$\endgroup\$
    – SpaceCadet
    Commented Oct 26, 2016 at 21:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.