Skip to content

Migration Example 1 - LED Blinking

  • Level of Difficulty: Easy
  • Source IDE: MikroC PRO for PIC
  • Destination IDE: NECTO Studio
  • Project Name: LED Blinking
  • Project Path: C:\Users\Public\Documents\Mikroelektronika\mikroC PRO for PIC\Examples\Development Systems\EasyPIC PRO v8\LedBlinking.mcppi
  • Hardware Requirements: EasyPIC v8 Development board with PIC18F47K42

Let's Begin!

Step 1: Project Analysis

  • Open MikroC PRO for PIC IDE.
  • Analyze the project meticulously, focusing on comments, code, dependencies, and project settings.
  • Comments Section Analysis:

    • Microcontroller: PIC18F47K42 (Microchip)
    • Development Board: EasyPIC v8 (MIKROE)
    • Clock Speed: 32MHz
  • Code Section Analysis:

    • The project manipulates microcontroller registers to blink LEDs connected to the development board.
  • Library Dependencies:

    • No library dependencies detected.
  • Project Settings:

    • Access "project settings" via the "project" menu then "Edit project..." action item to analyze microcontroller configuration.
    • Conclusion: External oscillator (8MHz), ramped up to 32MHz using PLL functionality.

Step 2: Backup the Project

  • Ensure project backup for safety, copying the entire folder to a separate disk partition.

Step 3: Copy the Project Path

  • Utilize TOTAL COMMANDER and its shortcut "SHIFT+F6" to copy the project path.

Step 4: Open NECTO Studio

  • Launch "NECTO Studio".

Step 5: Select "Open"

  • Navigate to the "OPEN PROJECT" action button on the left side of the navigation bar in NECTO Studio.

Step 6: Paste the Project Path

  • Paste the project path in the "file name" section and hit "Enter" to update the main project window.

Step 7: Select the Project

  • Choose the project to migrate from the main project window and click "Open".

Step 8: Configure Setup

  • With NECTO's intuitive "Setups" wizard, embedded software developers can configure their environments with just a few clicks, minimizing the time spent on tedious setup tasks and allowing themselves to focus on what truly matters: coding.

Here are the NECTO's "Setups" wizard steps:

  • Select a Compiler:

    • NECTO's "Setups" wizard provides a range of compiler options, each tailored to different project requirements.
    • Whether it's GCC for ARM, GCC for RISC-V, CLANG for ARM, CLANG for RISC-V, Microchip's XC32, XC16 or XC8, mikroC AI for ARM, mikroC AI for AVR, mikroC AI for dsPIC, mikroC AI for PIC or mikroC AI for PIC32, embedded software developers can confidently choose the one best suited for their specific needs, ensuring compatibility and optimal performance throughout the development process.

    • STEPS FOR THIS PARTICULAR MIGRATION EXAMPLE:

      • Click on the "New" action button on the upper-right corner of the "NECTO Studio" in order for embedded software developers to create their first setup.
      • Search and click on the "MikroC AI for PIC" compiler.
      • Open up "advanced compiler options" pop-up window by click on the "Advanced" action button in the lower central part of the window which empasizes the "MikroC AI for PIC" compiler.
      • Focus on the "Choose SDK version:" property section of the "advanced compiler options" pop-up window.
      • Make sure to select "mikroC for PIC Legacy 7.6.0" as a preferred SDK version.
      • Click "Save" in the upper right corner of the "NECTO Studio".
      • Click "Next" in the upper right corner of the "NECTO Studio".
  • Select a Development Board:

    • The choice of development board lays the foundation for hardware testing and prototyping. NECTO's "Setups" wizard offers a comprehensive selection of development boards from MIKROE, Microchip or ST as well as shields for development boards from well-known hardware platform including Arduino, Raspberry Pi, STM32 Discovery. Users can make decisions based on their project's requirements, ensuring efficient development.

    • STEPS FOR THIS PARTICULAR MIGRATION EXAMPLE:

      • Search and click on the "EasyPIC v8" development board.
      • Click "Next" in the upper right corner of the "NECTO Studio".
  • Select an MCU (Microcontroller Unit):

    • Selecting the right microcontroller is crucial for hardware-centric projects, as it determines the device's processing power, memory capacity, and peripheral features. NECTO's "Setups" wizard presents users with a wide range of MCUs from various vendors, such as NXP, ST, Texas Instruments, Microchip and GigaDevice. By offering advanced configuration for each microcontroller unit, embedded software developers can confidently choose the MCU that best aligns with their project goals, ensuring optimal performance and scalability.

    • STEPS FOR THIS PARTICULAR MIGRATION EXAMPLE:

      • Make sure "PIC18F47K42|40|PDIP" microcontroller stays in the selected mode.
      • NOTE:
      • 64MHz is the default Clock speed in "NECTO Studio" for this particular microcontroller.
      • By clicking on "Advanced" action button, embedded software developers can downgrade the clock speed to 32 MHz, as it was previously in "MikroC PRO for PIC" IDE.
      • Click "Next" in the upper right corner of the "NECTO Studio";
  • Select a Display (if applicable to the project):

    • For projects requiring visual interfaces or user interactions, selecting an appropriate display is essential. NECTO's "Setups" wizard accommodates projects with display requirements by offering a diverse range of TFT display options (both capacitive and resistive). Users can explore different display sizes to find the perfect fit for their project, ensuring clear and intuitive user experiences.

    • STEPS FOR THIS PARTICULAR MIGRATION EXAMPLE:

      • Make sure USB-C cable is connected to the "EasyPIC v8" development board.
      • Make sure "Power" button is pressed on the "EasyPIC v8" development board.
      • Skip the selection of a display by clicking "Next" in the upper right corner of the "NECTO Studio".
  • Select a Programmer/Debugger Device:

    • The choice of programmer/debugger device directly impacts the efficiency and effectiveness of the debugging and programming process. NECTO's "Setups" wizard simplifies this decision by offering a selection of high-quality programmer/debugger devices, including CODEGRIP, GDB General, and mikroPROG for various microcontroller families such as Kinetis, TIVA, AVR, STM32, PIC, dsPIC, and PIC32. Users can evaluate each option based on factors like compatibility, features, and debugging capabilities, ensuring smooth development workflows and reliable device programming.

    • STEPS FOR THIS PARTICULAR MIGRATION EXAMPLE:

      • Because of a successful completion of previous steps, CODEGRIP programmer/debugger had been automatically selected as a preferred programming/debugging solution.
      • Click "Finish" to finish the setup configuration;
  • Finishing Setup's wizard:

    • Once you reach the final stage of the "Setups" configuration wizard in "NECTO Studio", you're on the brink of wrapping up your configuration journey. This pivotal stage serves as the culmination of your efforts, bringing together all the choices and settings you've meticulously tailored to suit your project's needs.

    • STEPS FOR THIS PARTICULAR MIGRATION EXAMPLE:

      • Rename the newly created configuration setup.
      • Make sure the newly created configuration setup stays in the selected mode.
      • Click "Choose" in the upper right corner of the "NECTO Studio".
  • By guiding users through each of these critical steps, NECTO Studio's "Setups" wizard empowers embedded software developers to quickly configure their development environments, setting the stage for successful and efficient software development projects.

Step 9: Test Project Functionality

Conduct a final test post-setup configuration.

If the Build action reports no issues, proceed to the next step.

  • STEPS FOR THIS PARTICULAR MIGRATION EXAMPLE:

    • Once configuration of the setup of the project had been configured, now it is the time for the final test of the project migration: has it been successful, or has it failed?
    • By clicking on the "Build" action button on the left sidebar navigation menu of the "NECTO Studio", and watching the "Issues" window in the lower part of the "NECTO Studio", and concluding there are no issues with the project, embedded software developers are good to go with the final step of programming the microcontroller.

Step 10: Program the Microcontroller

Utilize the "Flash" action button to program the microcontroller using the configured programmer/debugger option.

If the microcontroller operates as expected, congratulations! The project migration from MikroC PRO IDE to NECTO Studio is successful.

  • STEPS FOR THIS PARTICULAR MIGRATION EXAMPLE:

    • By selecting the "Flash" action button on the left sidebar navigation menu of the "NECTO Studio", with the final goal of programming the microcontroller, embedded software developers are able to program the code in the microcontroller.
    • If the microcontroller is performing as it was performing while the project was in the "MikroC PRO for PIC" IDE, congratulations, because you have successfully migrated your project from "MikroC PRO for PIC" IDE into "NECTO Studio"!

This migration exemplifies a straightforward transition.

The project exhibited simplicity, devoid of header files and with only System library dependency.

Now, let's delve into a more intricate migration scenario in the example below, FAT16!