Академический Документы
Профессиональный Документы
Культура Документы
Page 1 of 1
Tutorials>CreatingNewLibrary>
3.
4.
5.
6.
If you are creating library for PIC16 MCU family the file should be saved in P16 folder.
If you are creating library for PIC18 MCU family the file should be saved in P18 folder.
If you are creating library for PIC16 and PIC18 MCU families the file should be saved in both folders.
Write a code for your library and save it.
Add __Lib_Example file in some project, see Project Manager. Recompile the project.
If you wish to use this library for all MCUs, then you should go to Tools Options Output settings, and check Build all files
as library box.
This will build libraries in a common form which will work with all MCUs. If this box is not checked, then library will be built for
selected MCU.
Bear in mind that compiler will report an error if a library built for specific MCU is used for another one.
Compiled file __Lib_Example.mcl should appear in ...\mikroC PRO for PIC\Uses\ folder.
Open the definition file for the MCU that you want to use. This file is placed in the compiler's Defs folder:
DriveName:\Program Files\Mikroelektronika\mikroC PRO for PIC\Defs\
8. Add Library to mlk file for each MCU that you want to use with your library.
9. Click Refresh button in Library Manager
10. Example_Library should appear in the Library manager window.
mk:@MSITStore:C:\Users\Public\Documents\Mikroelektronika\mikroC%20PRO%20for%...
4/2/2015