Help with mikroc pro for ARM

mikroC, mikroBasic and mikroPascal for PRO ARM® MCUs, supporting STM32, Tiva, Kinetis, & CEC devices
Post Reply
Author
Message
sam.123.address@gmail.com
Posts: 11
Joined: 01 Aug 2023 15:25

Help with mikroc pro for ARM

#1 Post by sam.123.address@gmail.com » 15 Apr 2024 15:31

hello ,

i'm trying to use the Oximeter 5 click with mikroc pro for pic but as far as i know this click board example provided by mikroe is only supported with necto studio ide which i don't use at all! so will you please provide an example that supports the mikroc pro for arm i have the last version of the compiler .

please we really need this example i teach my students using click boards and mikroc so it's really important for me to be able to make this example works.

i will atttach the project file that contins the code.

kind regards,
SAM

User avatar
IvanJeremic
mikroElektronika team
Posts: 316
Joined: 05 Sep 2022 14:32

Re: Help with mikroc pro for ARM

#2 Post by IvanJeremic » 16 Apr 2024 09:27

Hi,

There is no example for Oximeter 5 click for Mikro PRO compilers.

I understand wanting to stick with Mikro PRO compilers, but might i suggest you give Necto a try?

Necto Studio supports PIC32, PIC, AVR, dsPIC, and ARM, it also contains a designer tab option, so you can easily use the TFT display on your board.

Necto Studio comes with multiple tools, like Planet Debug (https://www.mikroe.com/planet-debug) which allows you to program a board that is located here in MikroE from your home, a built-in plotter that works while debugging, UART and USB HID terminal, BOOTLOADER applications, tutorials, an AI, and more.
It supports only C for now, but in time it will support other programming languages.

You can also access the example codes for our click boards and other demo examples like ethernet, RTC, etc...

Necto Studio is free as long as you are not using it for commercial purposes.
https://www.mikroe.com/necto

You can also check out Embedded Wiki, you can find thousands of projects for our click boards.
https://embeddedwiki.com/filter?search=OXIMETER%205

You can use the search bar and the filters below to make your search easier.
WIKI.png
WIKI.png (276.01 KiB) Viewed 127 times
Regards,

Ivan.

sam.123.address@gmail.com
Posts: 11
Joined: 01 Aug 2023 15:25

Re: Help with mikroc pro for ARM

#3 Post by sam.123.address@gmail.com » 16 Apr 2024 12:41

Hello,

Ok just a question is using Necto studio better with mikrosdk or Mikroc AI ?

User avatar
IvanJeremic
mikroElektronika team
Posts: 316
Joined: 05 Sep 2022 14:32

Re: Help with mikroc pro for ARM

#4 Post by IvanJeremic » 19 Apr 2024 07:58

Hi,

MikroC AI is a compiler, MikroSDK is the SDK the compiler uses. So when you choose MikroC AI you get to choose between the legacy SDK (from older compiler like MikroC PRO for ARM etc...) and the new SDK MikroSDK 2.11.

Necto also supports other compilers like Microchip XC32, XC16, XC8, Clang, and GCC.

Regards,

Ivan.

sam.123.address@gmail.com
Posts: 11
Joined: 01 Aug 2023 15:25

Re: Help with mikroc pro for ARM

#5 Post by sam.123.address@gmail.com » 19 Apr 2024 17:39

Hello Mikroe Team thanks for the answer i'm considering using Necto.

i have just a littler code problem it's simple but i don't in necto it shows an error even though i think the code doesn't have error because i copied it from mikrosdk help example.

Code: Select all

/**
 * Any initialization code needed for MCU to function properly.
 * Do not remove this line or clock might not be set correctly.
 */
#ifdef PREINIT_SUPPORTED
#include "preinit.h"
#endif

#include "MikroSDK.Driver.GPIO.Out"
digital_out_t myled; //create object to represent the LED on PC13
digital_out_t myled2; //create object to represent the LED on PA5

#include "MikroSDK.Driver.ADC"
#include "MikroSDK.Conversions"
#include "MikroSDK.mikroSDKVersion"
#include "drv_analog_in.h"
analog_in_t         analog_in;    
analog_in_config_t  analog_in_cfg;
uint16_t          * read_value;

void application_init ( void )
{
    //port_init( &led_port, PORT_D, mask, PIN_DIRECTION_DIGITAL_OUTPUT  );

    analog_in_configure_default( &analog_in_cfg );
    analog_in_cfg.input_pin = PA0;

    analog_in_open( &analog_in, &analog_in_cfg );
    
    digital_out_init(&myled2,PA5); //object of led 2 is connected to PA5
}

int main(void)
{
    /* Do not remove this line or clock might not be set correctly. */
    #ifdef PREINIT_SUPPORTED
    preinit();
    #endif

     application_init ( void );

    /* Replace with your application code */
    while (1)
    {
          
      analog_in_read( &analog_in, &read_value );
     
      if(read_value > 200) //if value of adc is > 200 turn on led
      {
       digital_out_high(&myled2);
      }
         
    }

    return 0;
}

here's the error:

if(read_value > 200) //if value of adc is > 200 turn on led
{
digital_out_high(&myled2);
}

the complier says : Operator '' is not applicable to these operands ''


please let me know what is the solution in mikroc pro for arm it's not issue!

kind regards,
Sam

AntiMember
Posts: 135
Joined: 02 Jan 2020 19:00

Re: Help with mikroc pro for ARM

#6 Post by AntiMember » 19 Apr 2024 19:59

Maybe
if(*read_value > 200)

sam.123.address@gmail.com
Posts: 11
Joined: 01 Aug 2023 15:25

Re: Help with mikroc pro for ARM

#7 Post by sam.123.address@gmail.com » 20 Apr 2024 16:44

Hello, thanks i will try your suggestion and see how it works.

Kind regards

Post Reply

Return to “ARM PRO Compilers”