MPLAB® Code Configurator (MCC) is a fantastic tool. One can use the intuitive, graphical interface to configure the peripherals and functions of many microcontrollers – over 300 8-bit PIC16 and PIC18 microcontrollers are supported by the current 1.35 version. I like it a lot, and it’s a perfect tool to configure the new generation of PIC microcontrollers with Peripheral Pin Select (PPS) module – one can forget about configuration registers and such. It’s also a major time saver, I can generate the code routines in a matter of minutes.
Warning: Use of undefined constant ICL_LANGUAGE_CODE - assumed 'ICL_LANGUAGE_CODE' (this will throw an Error in a future version of PHP) in /home/teodorc8/public_html/wp-content/plugins/insert-php/includes/class.execute.snippet.php(456) : eval()'d code on line 19
Warning: Use of undefined constant ICL_LANGUAGE_CODE - assumed 'ICL_LANGUAGE_CODE' (this will throw an Error in a future version of PHP) in /home/teodorc8/public_html/wp-content/plugins/insert-php/includes/class.execute.snippet.php(456) : eval()'d code on line 22
And now MCC comes with a new benefit: click board™ support. Yes, code libraries for various click boards from MikroElekctronika will be added directly to MCC. There are over 50 click boards that will be added in the next 50 days, and probably more will follow soon.
The initial release of code libraries supports seven click boards:
- Accel3 click – based on H3LIS331DL from ST
- Alcohol click – based on the MQ-3 gas sensor
- Altitude click – with MPL3115A2 sensor
- CO click – based on the MQ-7 gas sensor
- Compass2 click – with an AK8963 3-axis electronic compass
- Current click – featuring INA196 current shunt monitor, MCP3201 12-bit ADC and MAX6106 voltage reference
- DiffPressure click – with NXP MPXV5010DP pressure sensor
With some exception related to the particular schematic of the click board (such as the case of Current click), the code libraries are rather specific to the sensor used and can be easily adapted to work in other configurations. A major time-saver when working with the sensors mentioned above.
So, how does it work? Let’s take a look.
I will start with the latest MPLAB X IDE version 3.55, with XC8 version 1.41 and MCC version 3.26.2.
The release notes provide the following installation instructions:
- Download mikroEClickLibrary_1.0.7.jar from Microchip website.
- In the MPLAB® X IDE, select Options from the Tools menu
- Select Plugins tab
- Click on Add Library
- Add mikroEClickLibrary_v1.0.7.jar
- Restart MPLAB® X IDE (it will ask for restart anyway, so save your work before ou begin the installation process)
The same applies to the Foundation Services library, file foundationServicesLibrary-0.1.14.jar.
If the installation process is OK, in the MCC window we should see the new libraries:
Simple as this. But how we use those libraries? Let’s find out…