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).
Make sure you have MPLAB, HiTech C for the PIC18F and Microsoft Visual Studio 2008 express installed before doing this project.
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 applications. This allows the PIC to use PLL which ups the clock speed to the required 48Mhz necessary for USB communication.
1 comments:
I don't see a hex-file or something to program the microcontroller.
Before you can use a microcontroller, you have to tell him what he should do in certain situations.
In USB programming, you have 5 things to tell:
- how does the circuit on the board look like -> OK
- which code should the microcontroller execute -> Not OK
- How do I program the microcontroller easily -> Not OK
- How do I make a driver/dll-file to communicate with the USB-device -> Not OK
- How do I implement the driver/dll-file into a developpement program like visual basic - C# etc. -> Not OK
I don't know how i should make a usb device. That's why i'm looking it up and arrive here. But I don't learn anything with reading this.
Greetz pieterjan
Post a Comment