Microcontroller USB HID 4-bytes in 4-bytes out


Posted on Feb 7, 2014

Need USB solution for your project Use LPC2148 MCU. In old days it`s very handy using LPT or COM to interface your project to PC but today they are vanished just like dinosaur. All switch status can be monitored on the PC, as well as the ADC value. The LEDs are turn on/off by the first byte sent from PC. In my project input and output buffer size


Microcontroller USB HID 4-bytes in 4-bytes out
Click here to download the full size of the above Circuit.

are 4 bytes each, you can increase the buffer depends on your need. To me, this project is about perfect because the program on PC can recover the connectionwhen temporary USB cable disconnection occurs. The VB program recognize the device from its Vendor ID (C251) and Product ID (1301). Thiscircuit work onpoll-based communication, meaning theMCU will reply when receive request fromPC. So when USB disconnected, there is no update on LCD. There are 8 switches pulled-up by 10k resistors and8 LEDs with 120ohmseries current reducer so that the GPIO will not burn out by the overload sink current. Power comes from USB +5V, regulated down to 3. 3V by LM1117-3. 3. It`s very handy, isn`t it USB connection provides both data link and power supply. Just put in your consideration that the +5V is limited to 500-1000mA, depends on the PC/notebook/netbook type. Some older notebook even limit the current up to 100mA only. If your project require big current, it`s wise to prepare an external power supply. Just like the USB external harddisk configuration, when the PC power is insufficient the harddisk should be connected to 2 USB ports or using external 5V power.




Leave Comment

characters left:

Related Circuits

  • New Circuits

    .

     


    Popular Circuits

    Radar signal detector
    Automatic Arming Auto Alarm
    LM723CA31402N3055 Variable Regulator 0-30V 5A
    Mini High-Voltage Generator
    Three Axis Mag
    El-Cheapo Fluoro Ballast
    Anti-saturation function delete circuit schematics
    Ratio discriminator circuit



    Top