
CCS C ve usb portu bulunan Pic18f2550 ile usb uygulaması verilen sitede devre şeması ve C# ile yapılmış bilgisayar programıda mevcut .
Siteye ve ilgili dosyalara buradan ulaÅŸabilirsiniz
PicUSB has been done with the intention of providing an initial boost for all those who want to start with designs for USB and I suppose that as many of us has gone, do not know where engancharlo!
The project itself is fairly very simple, aims to show as sending / receiving data over USB from the CIP to the PC, has tried the program was understandable, so it really has no utility rather than as I say, serve as an introduction to the world USB.
It has used the recorder GTP USB Lite ‘motherboard’ for this proyectillo, as the operation of PicUSB merely turn on / off each of the colors led bicolor and make a sum of two operands.
The scheme PicUSB connection is shown in the following picture:

The project consists of three parts:
* Schedule of the application for CIP
* Schedule of the application for the PC
* Finnish driver supplied by Microchip
For scheduling application for CIP has opted to use the extended compiler CCS, in particular the 3,227 version, the first version that incorporates libraries for use with USB 2.0. The code of the application is in the PicUSB_CCS.zip, as well. Hex to be recorded in the PIC. Both PicUSB.c like PicUSB.h are more or less documented in a perfect Spanglish. The project is based on ex_usb_scope.c supplied by CCS as an example for the compiler. It has been decided to use the 18F2550 but can be used any of the series 18Fxx5x incorporating USB 2.0.
For the programming of the PC application has chosen to use the Visual C # Express 2005 and can be downloaded free from the Microsoft home page.
In the case of non urged the Visual C #, to run the PicUSB.exe will require at least have the latest version. NET Framework.
The source code is in PicUSB_VisualC #. Zip, which also includes funciones_dll.txt in this detailed the use of the functions contained in the mpusbapi.dll provided by Microchip.
The last step has been editing Driver supplied by Microchip in such a way that appeared in the Device Manager a new class with a custom icon. To this has been necessary to create a DLL that exported this icon. Attached is the source of the DLL, if desired by PicUSB_Classinstaller.zip recompile to put another icon. This is needed for the DDK (Driver Development Kit) from Microsoft, for this example has been used windows_server_2003_sp1_ddk. And the example named Toaster.
The driver itself is in PicUSB_Driver.zip, where they can be modified several paragraphs, but perhaps the most useful are the Strings & VID and PID.
By connecting the PicUSB for the first time, you’ll see the wizard for installing new hardware, it marks the option of “install from a list or specific location”, pricked on next and the next screen will mark the option “Search best driver in these locations “, pricked on” Include this location in the search “and then on Browse, then select the folder PicUSB_Driver and gives OK, and Next, then displayed a warning screen, it becomes Click on accepting, and the installation will be completed by the Driver, led the PicUSB will be gone from red to green and be ready for use.
Burada yer alan bir diğer usb uygulamasında ise usb klavye uygulaması yer almakta
What we aim in this project is to implement a communication with the PC emulating human interface device. HID, such as the Keyboard, Mouse or joystick.
We will make the necessary adjustments in the firmware of the PIC to be recognized by Windows as a standard HID device and what exactly register as a USB Keyboard.
For the firmware we will use as a basis suit and USB descriptor that brings as examples the CCS C, adapting it to our needs, essentially giving the VID & PID which hopes to find the driver for Windows

Firmware for CIP 18Fxx5x done in CCS C
* This firmware is compiled with the compiler PCH CCS C version 3,242.
* The key words and points of interest in this firmware are in bold.
* The descriptor USB is included in the file USB_Kbd_HID.h which is marked in red. (Included below)
HSPLL fuses and PLL5
The frequency of oscillation required for USB 2.0 is 48 Mhz. Since we are using our hardware in a crystal quartz 20 Mhz need to make use of internal PLL module of the CIP. We do this with the fuse HSPLL. As the PLL module requires an oscillation input 4 Mhz we use the divider 1:5 indicated with the fuse PLL5 to obtain the required 20:5 = 4 Mhz. (For more details see Getting 4 MHz for the 48 Mhz needed in the PIC’s USB 2.0 on the same page)
#include USB_kbd_HID.h
In the file usb_kbd_HID.h, charged with the corresponding include, defining the structures and parameters to the USB connection. It will discuss its contents a bit below where it also shows its full content.


(3 votes, average: 3.33 out of 5)
thevan Ara 20, 2008
dear sir,
Please send me if you have these in english
thanks
thevan.S
mejnun May 3, 2009
calışmalarınız güzel yanlız yararlanamıyoruz nedeni incelimiyemiyoruz cüncü pıc kodlara ulaşamıyoruz ulaştıgımızda şifreli oluyur sizden ricam pıc18f2550 usb nın C codlarına ihtiyacımız var yönlendirdiginiz adreste zip de posbor istiyor yardımcı olursanız sevinirim turkerler40@hotmail.com adresime mey ederseniz sevinirim iyi calışmalar
http://www.hobbypic.com/index.php?option=com_content&task=view&id=14&Itemid=27&lang=es admin
Mustafa Berkan BİÇER May 4, 2009
Kodlar bu adresten indirilebilir..
4550 için olan kodun aygıt kısmı 2550 olarak deÄŸiÅŸtirilirse ve PORTD ve PORTE ile ilgili kısımlar varsa deÄŸiÅŸtirilmek koÅŸuluyla 2550′de aynen çalışıyor kodlar…
http://www.microingenia.com/hobbypic/index.html
mejnun May 7, 2009
admin kardesime tesekkur
YAVUZ ŞİMŞE Eyl 11, 2009
merhaba 18fxxxx serisi pic’ler ile usb ders notları ve kaynak varsa gönderebilirmisiniz teÅŸekkürler