Make Your Own USB Device using PIC18F4550


Posted on Feb 6, 2014

If you are looking to learn how to make your own USB device, this tutorial is perfect to start. Here you will see how to breadboard a simple USB generic HID device, creating the PIC18F firmware and finally creating the Windows interface for the device which will allow you to control a LED from the PC and read the state of a push-button from the de


Make Your Own USB Device using PIC18F4550
Click here to download the full size of the above Circuit.

vice. Using the built in drivers for generic HID devices provides a simple method of creating Windows and Linux compatible devices and also makes the creation of both firmware and software far simpler. Since the HID standard does not require custom drivers you will not need to get a certificate for your driver, also both Windows and Linux have built-in libraries to help you communicate. This project will allow you to control a LED from Windows and also see the status of a push-switch on the device. Using this the basic principals of 2-way USB communication will be made clear allowing you to progress onto more complex projects. The circuit is made on a breadboard and the PIC18F firmware will be based on (the freely available) MPLAB and Hitech C compiler, the Windows software will be created using Microsoft Visual C+ 2008 express (which is also free to download). The circuit is very simple. The PIC18F4550 will be `bus powered`; this means that the device will draw its power from the USB host (your PC) so no power regulation is required. The 470nF capacitor (C3) is required so the PIC can operate the internal USB circuitry (it helps with regulating the USB voltages required by the on-board USB interface in the PIC). The ICSP header allows you to connect a PIC programmer, I suggest using the inexpensive PICkit2 programmer, however other ICSP compatible programmers should work just fine. The 20Mhz clock is required for USB...




Leave Comment

characters left:

Related Circuits

  • New Circuits

    .

     


    Popular Circuits

    High-frequency crystal oscillator
    Nicad-batterv-analyzer
    DC motor driver for DCMP(AVR-008)
    Protecting Microcontroller Input Pins from Soft Power Switch
    Low Power LED Battery Voltmeter
    low power led battery voltmeter
    Simple Electronic Fan Regulator Circuit PCB
    Ethernet remote device controller sensor circuit
    100kHz-30MHz active antenna circuit diagram
    Conveyor control Ladder



    Top