15% OFF on everything in the shop - the offer lasts until June 27, 12:00 CET. Discount applies at checkout

MikroElektronika Learn

Software, User Manual

Compiler Quick Start Guide

20 Dec , 2016  

IntroductionIDECreating Your First Project | Examples

Examples

To get you acquainted with our compilers we have prepared code examples for LED blinking for each of the 21 compilers we have on offer.

We suggest that you read the documentation on the MCU you are using before you start programming.

LED blinking is the simplest example, and once you understand how it works you will be able to move on to more complex examples.

LEDs can be used for visual indication of the logic state on PORT pins. An active LED indicates that a logic high (1) is present on the pin. In order to enable PORT LEDs, it is necessary to enable the corresponding switches on the board you are using.

LED blinking for mikroC

 

mikroC PRO for PIC

For this example we have used the EasyPIC7 development board

  • MCU: PIC18F45K22 from Microchip.
  • Oscillator: HS-PLL 32.0000 MHz, 8.0000 MHz Crystal.
  • Board settings: Turn ON the PORT LEDs at SW3.

mikroC PRO for dsPIC

For this example we have used the EasyPIC7 development board

  • MCU: dsPIC30F4013 from Microchip;
  • Oscillator: XT-PLL8, 80.000MHz.

mikroC PRO for PIC32

For this example we have used the EasyPIC Fusion v7 development board.

  • MCU: P32MX795F512L from Microchip;
  • Oscillator: XT-PLL, 80.0000MHz.
  • Board settings: Turn ON PORTA, B, C, D, F & G LEDS at SW15.

mikroC PRO for ARM

For this example we have used the EasyMx v7 for STM(R) ARM(R) development board.

  • MCU: STM32F107VC;
  • Oscillator: HSE-PLL, 72.000MHz.
  • Board settings: Turn ON PORTA, PORTB, PORTC, PORTD, PORTE at SW15.

mikroC PRO for AVR

For this example we have used the EasyAVR v7 development board.

  • MCU: ATMEGA32;
  • Oscillator: External Clock 08.0000 MHz.
  • Board settings: Make sure you turn ON the PORTA, PORTB, PORTC and PORTD LEDs (SW10.5, SW10.6, SW10.7 and SW10.8).

mikroC PRO for 8051

For this example we have used the Easy8051v6 development board.

  • MCU: AT89S8253 MCU;
  • Oscillator: External Clock 10.0000 MHz.
  • Board settings: Turn ON the PORT LEDs (SW7). On Easy8051v6 LEDs are activated by logical zero.

mikroC PRO for FT90x

For this example we have used the EasyFT90x v7 development board.

  • MCU: FT900;
  • Oscillator: CPU at full system clock, 100.000MHz.
  • Board settings: Turn ON ports GPIO 00-07, GPIO 08-15, GPIO 16-23, GPIO 24-31, GPIO 32-39, GPIO 40-47, GPIO 48-55 and GPIO 56-66 at SW8.

LED blinking for mikroBasic

mikroBasic PRO for PIC

For this example we have used the EasyPIC7 development board.

  • MCU:PIC18F45K22 from Microchip;
  • Oscillator: HS-PLL 32.0000 MHz, 8.0000 MHz Crystal.
  • Board settings: Turn ON the PORT LEDs at SW3.

mikroBasic PRO for dsPIC

For this example we have used the EASYPIC v7 for dsPIC30 development board.

  • MCU: dsPIC30F4013 from Microchip;
  • Oscillator: XT-PLL8, 80.000MHz.
  • Board settings: Turn ON port LEDs at SW10.

mikroBasic PRO for PIC32

For this example we have used the EasyPIC Fusion v7 development board.

  • MCU: P32MX795F512L from Microchip;
  • Oscillator: XT-PLL, 80.0000MHz.
  • Board settings: Turn ON PORTA, B, C, D, F & G LEDS at SW15.

mikroBasic PRO for ARM

For this example we have used the EasyMx v7 for STM(R) ARM(R) development board.

  • MCU: STM32F107VC;
  • Oscillator: HSE-PLL, 72.000MHz.
  • Board settings: Turn ON PORTA, PORTB, PORTC, PORTD, PORTE at SW15.

mikroBasic PRO for AVR

For this example we have used the EasyAVR v7 development board.

  • MCU: ATMEGA32;
  • Oscillator: External Clock 08.0000 MHz.
  • Board settings: Make sure you turn ON the PORTA, PORTB, PORTC and PORTD LEDs (SW10.5, SW10.6, SW10.7 and SW10.8).

mikroBasic PRO for 8051

For this example we have used the Easy8051v6 development board.

  • MCU: AT89S8253;
  • Oscillator: External Clock 10.0000 MHz;
  • Board settings: Turn ON the PORT LEDs (SW7). On Easy8051v6 LEDs are activated by logical zero.

mikroBasic PRO for FT90x

For this example we have used the EasyFT90x v7 development board.

  • MCU: FT900;
  • Oscillator: CPU at full system clock, 100.000MHz.
  • Board settings: Turn ON ports GPIO 00-07, GPIO 08-15, GPIO 16-23, GPIO 24-31, GPIO 32-39, GPIO 40-47, GPIO 48-55 and GPIO 56-66 at SW8.

LED blinking for mikroPascal

mikroPascal PRO for PIC

For this description we have used the EasyPIC7 development board.

  • MCU: PIC18F45K22 from Microchip;
  • Oscillator: HS-PLL 32.0000 MHz, 8.0000 MHz Crystal.
  • Board settings: Turn ON the PORT LEDs at SW3.

mikroPascal PRO for dsPIC

For this example we have used the EASYPIC v7 for dsPIC30 development board.

  • MCU: dsPIC30F4013 from Microchip;
  • Oscillator: XT-PLL8, 80.000MHz.
  • Board settings: Turn ON port LEDs at SW10.

mikroPascal PRO for PIC32

For this example we have used the EasyPIC Fusion v7 development board.

  • MCU: P32MX795F512L from Microchip;
  • Oscillator: XT-PLL, 80.0000MHz.
  • Board settings: Turn ON PORTA, B, C, D, F & G LEDS at SW15.

mikroPascal PRO for ARM

For this example we have used the EasyMx v7 for STM(R) ARM(R) development board.

  • MCU: STM32F107VC;
  • Oscillator: HSE-PLL, 72.000MHz.
  • Board settings: Turn ON PORTA, PORTB, PORTC, PORTD, PORTE at SW15.

mikroPascal PRO for AVR

For this example we have used the EasyAVR v7 development board.

  • MCU: ATMEGA32;
  • Oscillator: External Clock 08.0000 MHz.
  • Board settings: Make sure you turn ON the PORTA, PORTB, PORTC and PORTD LEDs (SW10.5, SW10.6, SW10.7 and SW10.8).

mikroPascal PRO for 8051

For this example we have used the Easy8051v6 development board.

  • MCU: AT89S8253;
  • Oscillator: External Clock 10.0000 MHz.
  • Board settings: Turn ON the PORT LEDs (SW7). On Easy8051v6 LEDs are activated by logical zero.

mikroPascal PRO for FT90x

For this example we have used the EasyFT90x development board.

  • MCU: FT900 MCU;
  • Oscillator: CPU at full system clock, 100.000MHz.
  • Board settings: Turn ON ports GPIO 00-07, GPIO 08-15, GPIO 16-23, GPIO 24-31, GPIO 32-39, GPIO 40-47, GPIO 48-55 and GPIO 56-66 at SW8.

Pages: 1 2 3 4

By  
Firmware developer in MikroElektronika with a passion for telemetry in the field of IoT. Low level is for the true modern day warriors.