{"id":973,"date":"2019-06-05T18:10:00","date_gmt":"2019-06-05T18:10:00","guid":{"rendered":"https:\/\/ibex.tech\/embedded\/?p=973"},"modified":"2022-02-18T15:37:48","modified_gmt":"2022-02-18T15:37:48","slug":"peripheral-libraries-2","status":"publish","type":"post","link":"https:\/\/ibex.tech\/embedded\/microchip\/pic18\/xc8-compiler\/xc8-general\/peripheral-libraries-2","title":{"rendered":"Peripheral Libraries"},"content":{"rendered":"\n<p>Newer versions of XC8 want you to use the &#8220;MPLAB Code Configurator&#8221; when using any peripheral.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Using the old peripheral libraries<\/h4>\n\n\n\n<p>If you don&#8217;t want to use the MPLAB Code Configurator you can still get the old peripheral libraries by downloading and installing &#8220;PIC18F Legacy Peripheral Libraries v#.#&#8221; from the microchip compilers page.<\/p>\n\n\n\n<p>Install it into the specific xc8 version folder you have.<\/p>\n\n\n\n<p>For your project to use them you&#8217;ll need to add its path:<\/p>\n\n\n\n<p>Project properties &gt; XC8 Global Options &gt; XC8 Compiler &gt; Include directories:  Enter the path, e.g. &#8220;C:\\Program Files (x86)\\Microchip\\xc8\\v2.05\\include\\plib&#8221;<\/p>\n\n\n\n<p>For XC8 V2 there is no longer a project properties option for &#8220;Link in Peripheral Library&#8221; it seems, so you&#8217;ll also have to the include the header file for the library you are using in your code files, e.g. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;i2c.h><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Newer versions of XC8 want you to use the &#8220;MPLAB Code Configurator&#8221; when using any peripheral. Using the old peripheral libraries If you don&#8217;t want to use the MPLAB Code Configurator you can still get the old peripheral libraries by downloading and installing &#8220;PIC18F Legacy Peripheral Libraries v#.#&#8221; from the microchip compilers page. Install it [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[80],"tags":[],"class_list":["post-973","post","type-post","status-publish","format-standard","hentry","category-xc8-general"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/posts\/973","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/comments?post=973"}],"version-history":[{"count":2,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/posts\/973\/revisions"}],"predecessor-version":[{"id":986,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/posts\/973\/revisions\/986"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/media?parent=973"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/categories?post=973"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/tags?post=973"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}