I want to create my own USB HID functions for PIC18F4550 in MikroC. I do not wish to use the HID Library routines (Hid_Enable,
Hid_Read etc) which are already available with the compiler. Can anyone help me with this or where can I find some documentation for making custom HID functions in MikroC?
Custom USB HID functions
- tihomir.losic
- mikroElektronika team
- Posts: 2138
- Joined: 02 Dec 2009 14:16
- Location: Serbia
- Contact:
Re: Custom USB HID functions
Hello,
you can create your own library for your requirements.
Making new library:
- follow the steps explained in the Help file, and read in detail the explanation provided there. I have also very clearly described what you should do with the library:
1. Copy the original __Lib_Example.mcl in your Uses folder (P18 for PIC18F4550)
2. Open P18F4550.mlk file and add the following code in the appropriate section:3. In LibraryExample.mcppi project, select (if already isn't) PIC18F4550 MCU, and in the Library Manager click on the button
Rebuild libraries and your Example_Library will appear, with it's three functions
4. Click on this library to include it in the project.
5. Remove __Lib_Example.c from Project settings window, because it is not needed anymore (it is loaded via it's .MCL file)
6. You can also remove the following section in the code:7. Rebuild the project
they will take this into consideration in our future development.
Best regards,
Losic Tihomir
you can create your own library for your requirements.
Making new library:
- follow the steps explained in the Help file, and read in detail the explanation provided there. I have also very clearly described what you should do with the library:
1. Copy the original __Lib_Example.mcl in your Uses folder (P18 for PIC18F4550)
2. Open P18F4550.mlk file and add the following code in the appropriate section:
Code: Select all
<LIB>
<ALIAS>Example_Library</ALIAS>
<FILE>__Lib_Example</FILE>
<TYPE>REGULAR</TYPE>
</LIB>
Rebuild libraries and your Example_Library will appear, with it's three functions
4. Click on this library to include it in the project.
5. Remove __Lib_Example.c from Project settings window, because it is not needed anymore (it is loaded via it's .MCL file)
6. You can also remove the following section in the code:
Code: Select all
//************************************
extern void BlinkLED_1(int Delay); // These lines won't be necessary when
extern void BlinkLED_2(int Delay); // you create library entry in .MLK file
extern void Example_Init(); // as described in Help file
//************************************
I will pass that suggestion to our developers,pat.afix78 wrote:Or could you please tell me if any development is planned in your next versions of MikroBasic ?
they will take this into consideration in our future development.
Best regards,
Losic Tihomir
mikroElektronika [Support team]
-
- Posts: 2
- Joined: 24 Feb 2011 16:45
Re: Custom USB HID functions
thanks a lot.. i'll try it.