Building a PIC18F USB device


Posted on Feb 7, 2014

Use the Microchip C18 compiler to be based around my latest USB framework libraries for both the PIC and Windows. This should provide a smoother path from this basic tutorial to more complex projects. As always I welcome your feedback and suggestions over in my forums. I get a number of emails everymonth asking about creating USB devices using the PIC18F microcontroller. After looking at


Building a PIC18F USB device
Click here to download the full size of the above Circuit.

projects such as my Atari Joystick USB Adaptor and C64 VICE Front-End there seems to be a demand for more information on how to `hack your own`. In this article I will show 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 device. Since the advent of Windows 7 you need an expensive Microsoft validation certification to create custom USB drivers (without it most users cannot even install your software). 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. For this article we`re going to stick to a fairly basic USB device. The device 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. To keep the cost and difficulty as low as possible I will concentrate on breadboard construction of the hardware using few components, the PIC18F firmware will be...




Leave Comment

characters left:

New Circuits

.

 


Popular Circuits

PC 12V ADAPTER
Nicad / NiMh Battery charger
Dc Millivoltmeter
Large Lcd Display Buffering Driver Circuit
Single Chip FM Transmitter Circuit
microcontroller 12V relay circuit converted to 5V relay under uC control
YD9088 FM RECEIVER CIRCUIT FOR BATTERY SUPPLY
Simple Knock Alarm With Piezo Sensor
80M CW QRP rig
An attenuated tone control circuit diagram



Top