Project Info
Author: Chris
Difficulty: Medium-Difficult
Time Invested: 3 Hours
Prerequisites:
Take a look at the above
tutorials before continuing
to read this tutorial.
Author: Chris
Difficulty: Medium-Difficult
Time Invested: 3 Hours
Prerequisites:
Take a look at the above
tutorials before continuing
to read this tutorial.
With such popularity, understanding how to communicate with a USB host (like on a laptop) becomes an essential piece of information for anyone wishing to build a USB enabled device.
Purpose & Overview of this project
This tutorial should build a USB interface using a PIC18F4455 that shows up as an HID - Human Interface Device in Windows. The interface should be able to send and receive commands from the USB Host on the Laptop computer. Specifically: The USB should be able to toggle some LEDs on and off, recognize when a switch is pressed and visualize the value of a variable resistor, trimpot.
USB is a difficult topic to cover, the theory of how it exactly works can fill an entire book. Unlike RS232 serial communication, USB is constantly communicating with connected devices, more similar to Ethernet interfaces. Along with this constant communication, there are many specific values that must be initialized in order for a USB device to be fully activated, these will briefly be described in the theory section of this write-up.