Electronic – USB to Microcontroller Interface

microcontrollerusb

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

Best Answer

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.