Download and see for yourself why MikroElektronika’s industry-grade Basic compilers are winning hearts and brains of embedded professionals and enthusiasts for the past 12 years.
Download the compiler for your architecture
mikroBasic PRO for PIC
Included demo license enables up to 2K of program words of FREE output code.
Release version: 7.0.0
Release date: 22 December 2016
Release type: Major release
See PIC Compilers Roadmap >
Release Changes
Compiler
- Additional 40 MCU supported:
- P10F320
- P16F18854
- P10F322
- P16F18855
- P10LF320
- P16F18856
- P10LF322
- P16F18857
- P16F15354
- P16F18875
- P16F15355
- P16F18876
- P16F1773
- P16F18877
- P16F1776
- P16LF1566
- P16F1777
- P16LF1567
- P16F1778
- P16LF18313
- P16F1779
- P18F24K40
- P16F18313
- P18F25K40
- P16F18323
- P18F26K40
- P16F18324
- P18F27K40
- P16F18325
- P18F45K40
- P16F18326
- P18F46K40
- P16F18344
- P18F47K40
- P16F18345
- P18F65K40
- P16F18346
- P18F66K40
- P18LF2550
- P18F67K40
- Fixed: Config register bit description “Block 3 not code protected” two times. Fixed for multiple MCU
- Fixed: OPA3CON register and bits missing from P16(L)F178x
- Fixed: TxTMR and TMRx register naming unification for P16(L)F161x
- Fixed: Bad RAM scopes sometimes included more (+1) then it should
- Fixed: Few Enhanced P16 didn’t have correct RAM values.
IDE
- New: Visual TFT integrated into compiler IDE
- New: Design, Code, Compile, Debug, Program… All from one place
- New: Simple and fast switch between design and coding
- New: Automated synchronization of edited event file with design, awareness and background compiler on generated code
- New: Automated synchronization of generated files with edited code, merge
- New: One project, One application with combined predefined visual and compiler settings on one place
- New: Easy switching from old projects
- New: Added site license activation.
- Improved: Export Project now export whole folder structure.
- Improved: Clean Project Folder cleans whole folder structure.
- Improved: Cleaning changed from selecting specific files to selecting file types to clean.
- Improved: Compiler now supports MCUs with 64 banks.
- Fixed: Ctrl+space did not work with arrays without dimension in declaration
- Fixed: Watch window elements with Inf or Nan values changed unexpectedly
- Fixed: Watch windows throws unexpected error in certain case
- Fixed: USART Terminal exceptions in various cases
- Fixed: USART Terminal received data may be lost
- Fixed: USART Terminal sending data slow
Libraries
- New: Added library for STMPE610
- New: Added Flash libraries for P16(L)F1902(3), P12F617, P16F720, P16F721
- New: Added new functions to Conversion library
- ByteToStrWithZeros
- ShortToStrWithZeros
- FloatToStr_FixLen
- New: Added function pointers in I2C libraries
- New: New functions for Port Expander library
- Improved: I2C timeout implemented in all I2C libraries as requested on forum poll.
- Improved: ADC_Init_Advanced implemented in all ADC libraries as requested on forum poll.
- Improved: PWM Stop (where multiple PWM modules use same timer) doesn’t stop the timer module.
- Fixed: UART_Remappable_Init sometimes not setting the correct baud rate
- Fixed: PWM Remappable library added for P18F46J53
- Fixed: P16F1789 missing library support for PWM3
- Fixed: ADC library missing for P18F66J50
- Fixed: I2C library missing for P16F1847
Activation Code
This is the default license. The activation code will be sent to your inbox instantly after purchase. Paste it into the software activation window and start using your compiler.
USB Dongle License
If you need a portable license that can be used on different computers, for an added cost, you can choose the USB Dongle license (standard shipping fees apply).
Site License
If you run a two-person team, a whole R&D department, or teach a class, the Site License is the best choice. It allows you to own, manage and deploy multiple single licenses.
mikroBasic PRO for PIC32
Included demo license enables up to 8192 bytes of program words of FREE output code.
Release version: 3.6.0
Release date: 07 September 2015
Release type: Maintenence release
Release Changes
Compiler
- New! Additional 24 MCU supported:
- PIC32MZ1024ECG064
- PIC32MZ1024ECG100
- PIC32MZ1024ECG124
- PIC32MZ1024ECG144
- PIC32MZ1024ECH064
- PIC32MZ1024ECH100
- PIC32MZ1024ECM064
- PIC32MZ1024ECH124
- PIC32MZ1024ECH144
- PIC32MZ1024ECM100
- PIC32MZ1024ECM124
- PIC32MZ1024ECM144
- PIC32MZ2048ECG064
- PIC32MZ2048ECG100
- PIC32MZ2048ECG124
- PIC32MZ2048ECG144
- PIC32MZ2048ECH064
- PIC32MZ2048ECH100
- PIC32MZ2048ECH124
- PIC32MZ2048ECH144
- PIC32MZ2048ECM064
- PIC32MZ2048ECM100
- PIC32MZ2048ECM124
- PIC32MZ2048ECM144
- Fixed: Warning if assigment of const violates enum object range.
- Fixed: Address of array memebers as initializators for global array of pointers.
- Fixed: ? : did not work if 2nd and 3rd operands were sbit type.
- Fixed: goto as first if statement did not compiled in some cases.
Integrated Development Environment
- New: ICD support for PIC32MZ family.
- New: ICD support for new PIC32MX devices.
- New: Add local variable by identifier (CTRL+SHIFT+V).
- New: Wild Card ‘*’ supported in Routine List.
- New: Synchronized editing.
- Fixed: Bug related to PIC32MX795 ICD communication.
Library
- Fixed: Added missing libraries for MX series x30/x50/x70 mcus.
- Fixed: Bug with sprint libraries.
Activation Code
This is the default license. The activation code will be sent to your inbox instantly after purchase. Paste it into the software activation window and start using your compiler.
USB Dongle License
If you need a portable license that can be used on different computers, for an added cost, you can choose the USB Dongle license (standard shipping fees apply).
Site License
If you run a two-person team, a whole R&D department, or teach a class, the Site License is the best choice. It allows you to own, manage and deploy multiple single licenses.
mikroBasic PRO for dsPIC
Included demo license enables up to 6144 bytes of program words of FREE output code.
Release version: 7.0.0
Release date: 27 October 2016
Release type: Maintenence release
See dsPIC Compilers Roadmap >
Release Changes
Compiler
- New: Additional 80 MCU supported
- P24FJ1024GA606
- P24FJ1024GA610
- P24FJ1024GB606
- P24FJ1024GB610
- P24FJ128GA202
- P24FJ128GA204
- P24FJ128GA406
- P24FJ128GA410
- P24FJ128GA412
- P24FJ128GA606
- P24FJ128GA610
- P24FJ128GB202
- P24FJ128GB204
- P24FJ128GB406
- P24FJ128GB410
- P24FJ128GB412
- P24FJ128GB606
- P24FJ128GB610
- P24FJ256GA406
- P24FJ256GA410
- P24FJ256GA412
- P24FJ256GA606
- P24FJ256GA610
- P24FJ256GB406
- P24FJ256GB410
- P24FJ256GB412
- P24FJ256GB606
- P24FJ256GB610
- P24FJ512GA606
- P24FJ512GA610
- P24FJ512GB606
- P24FJ512GB610
- P24FJ64GA202
- PIC24F16KM104
- P24FJ64GA204
- P24FJ64GA406
- P24FJ64GA410
- P24FJ64GA412
- P24FJ64GB202
- P24FJ64GB204
- P24FJ64GB406
- P24FJ64GB410
- P24FJ64GB412
- P33EP16GS202
- P33EP16GS502
- P33EP16GS504
- P33EP16GS505
- P33EP16GS506
- P33EP32GS202
- P33EP32GS502
- P33EP32GS504
- P33EP32GS505
- P33EP32GS506
- P33EP64GS502
- P33EP64GS504
- P33EP64GS505
- P33EP64GS506
- P33EV128GM002
- P33EV128GM004
- P33EV128GM006
- P33EV128GM102
- P33EV128GM104
- P33EV128GM106
- P33EV256GM002
- P33EV256GM004
- P33EV256GM006
- P33EV256GM102
- P33EV256GM104
- P33EV256GM106
- P33EV32GM002
- P33EV32GM004
- P33EV32GM006
- P33EV32GM102
- P33EV32GM104
- P33EV32GM106
- P33EV64GM002
- P33EV64GM004
- P33EV64GM006
- P33EV64GM102
- P33EV64GM104
- P33EV64GM106
- New: Auxiliary FLASH segment supported
- New: Supported Boot segment usage at devices that can have it
- New: Added support for AIVT in Boot Segment
- New: Bootswp instruction supported in asm
- New: Added support for STMPE610/810 library
- Improved: Mixing enum with int types throws appropriate warning
- Fixed: SSA optimization off caused shift code not to work in certain cases
- Fixed: Initialization image bad alignment
- Fixed: False reporting that data is present in message report
- Fixed: Optimization conflict with using pragmas SetFuncCall and funcall
- Fixed: False recursion and cross calling warning
- Fixed: goto in if branch stops compilation and show error
- Fixed: Usage of local extern in assembly
- Fixed: sbit and operator ?: cause errors in some use cases (applies to mikroC only)
IDE
- New: Visual TFT integrated into compiler IDE
- New: Design, Code, Compile, Debug, Program… All from one place
- New: Simple and fast switch between design and coding
- New: Automated synchronization of edited event file with design, awareness and background compiler on generated code
- New: Automated synchronization of generated files with edited code, merge
- New: One project, One application with combined predefined visual and compiler settings on one place
- New: Easy switching from old projects
- New: Added site license activation
- New: Key file license is now obsolete
- New: Simulator “prefetch” alghorithm for some DSP instruction used DSRPAG
- Improved: Export Project now export whole folder structure.
- Improved: Clean Project Folder cleans whole folder structure.
- Improved: Cleaning changed from selecting specific files to selecting file types to clean.
- Fixed: Ctrl+space did not work with arrays without dimension in declaration
- Fixed: Watch window elements with Inf or Nan values changed unexpectedly
- Fixed: Watch windows throws unexpected error in certain case
- Fixed: USART Terminal exceptions in various cases
- Fixed: USART Terminal received data may be lost
- Fixed: USART Terminal sending data slow
- Fixed: AutoComplete macros %DATE%, %TIME%, %DEVICE%, %DEVICE_CLOCK%, %COMPILER% did not work
Library
- New: Added library for STMPE610
- New: Now with preinstaled packages for FT800, FT810, FT812 and FAT32
- Improved: Added function pointers in I2C libraries
- Improved: Added functions ByteToStrWithZeros and ShortToStrWithZeros in Conversions library
- Improved: New functions for Port Expander library
- Fixed: Added missing SPI4 for P33EPXXXMU8XX and P24EPXXXGU8XX
- Fixed: PPS Mapping for various MCUs
- Fixed: Setting PWM Mode for P24F15KA301 and similar MCUs
- Fixed: Flash library for PIC24/dsPIC33epMC2xx/5xx/GP2xx/5xx
- Fixed: I2C calculation for EP MCUs with high frequency
- Fixed: UART calculation for various MCUs
- Fixed: Added missing PPS SPI consts for P24FJ16MC101 and similar MCUs
- Fixed: ECAN library forcing MCUs to reset
Examples
- New: Added examples for development system BIGdsPIC6
- New: Added examples for development system Easy24-33 v6
- New: Added Visual TFT examples for various development systems
Activation Code
This is the default license. The activation code will be sent to your inbox instantly after purchase. Paste it into the software activation window and start using your compiler.
USB Dongle License
If you need a portable license that can be used on different computers, for an added cost, you can choose the USB Dongle license (standard shipping fees apply).
Site License
If you run a two-person team, a whole R&D department, or teach a class, the Site License is the best choice. It allows you to own, manage and deploy multiple single licenses.
mikroBasic PRO for AVR
Included demo license enables up to 4096 bytes of program words of FREE output code.
Release version: 6.1.0
Release date: 18 November 2015
Release type: Maintenence release
Release Changes
Compiler
- New: Additional 19 MCU supported
- AT90PWM161
- ATMEGA168PB
- ATMEGA3250A
- ATMEGA3250PA
- ATMEGA325PA
- ATMEGA3290A
- ATMEGA6450P
- ATMEGA645P
- ATMEGA6490P
- ATTINY1634
- ATTINY441
- ATTINY828
- ATTINY841
- ATTINY84A
- ATXMEGA16E5
- ATXMEGA32C3
- ATXMEGA32D3
- ATXMEGA32E5
- ATXMEGA8E5
- Fixed: Dead code optimization issue with initialized auto variables
- Fixed: Initialization with implicit cast from
- Fixed: Optimization wrong metod index caused code generator to fail
Libraries
- New: Added assert.h and stdbool.h header files.
- Fixed: Bug with CAN standard message
- Improved: 8-bit PWM libraries are enhanced with functions to configure each of the PWM channels individually
IDE
- New: Add local variable by identifier (CTRL+SHIFT+V)
- New: Wild Card ‘*’ supported in code completition
- New: Code completition handles 1 character permutation
- New: Added Back and Forward navigation trough files and code (similar to web browser navigation)
- New: Project Explorer
- added stop active folder search option
- added folder up shortcut
- added hint on files and folders
- New: Library Manager
- added hint on function to show function parameters
- added drag and drop of function into editor
- Improved: Project Wizard
- removed steps (tabs) when creating new project
- Improved: Project Manager
- updated tool buttons and hits
- added hint on files and folders
- Fixed: Cancel New Project Wizard still creates project on disk (new project will now be saved only on user request)
- Fixed: Removing non-existing file from ProjectManager in some cases caused IDE to halt.
6.0.0
Compiler
- Improved: Faster optimization and linkage.
- Improved: Allocation of locals to registers.
- Fixed: Call tree generator did not work for specific examples.
- Fixed: Pointer to types that has overridden memory specifier was incorrectly dereferenced.
Examples
- New: Added EasyAVR7 examples.
Libraries
- New: Added support for new TFT controller ILI9341 in both 8bit nad 16bit mode.
IDE
- Improved: Function tree changed to work with new call tree generator.
Activation Code
This is the default license. The activation code will be sent to your inbox instantly after purchase. Paste it into the software activation window and start using your compiler.
USB Dongle License
If you need a portable license that can be used on different computers, for an added cost, you can choose the USB Dongle license (standard shipping fees apply).
Site License
If you run a two-person team, a whole R&D department, or teach a class, the Site License is the best choice. It allows you to own, manage and deploy multiple single licenses.
mikroBasic PRO for 8051
Included demo license enables up to 4096 bytes of program words of FREE output code.
Release version: 3.6.0
Release date: 25 July 2014
Release type: Maintenence release
Release Changes
Compiler
- New: USB Dongle licensing
Activation Code
This is the default license. The activation code will be sent to your inbox instantly after purchase. Paste it into the software activation window and start using your compiler.
USB Dongle License
If you need a portable license that can be used on different computers, for an added cost, you can choose the USB Dongle license (standard shipping fees apply).
Site License
If you run a two-person team, a whole R&D department, or teach a class, the Site License is the best choice. It allows you to own, manage and deploy multiple single licenses.
mikroBasic PRO for ft90x
Included demo license enables up to 8192 bytes of program words of FREE output code.
Release version: 2.2.0
Release date: 29 December 2016
Release type: Maintenence release
Release Changes
IDE
- New: Added board definition for mikromedia PLUS for FT90x (VTFT part)
- Key file license is now obsolete
- New: Added options:
- Generate Code for all VTFT projects
- Generate and Build for all projects
- Improved: MaxLength property (if set >0) now automatically detects if caption length is greater and updates.
- Improved: Software licensing window facelift.
- Improved: Radius property for circle/rounded objects now limited to maximum of half screen.
- Improved: Progress bar font Start/End char reduced from 32-127 to 37-58 (code size reduced)
- Fixed: Changing board definitions sometimes doesn’t set calibration method properly.
- Fixed: Sound action related code (FT8xx controller) doesn’t get generated every time.
- Fixed: Some rounded objects can be resized down past corner radius limitations.
- Fixed: IDE raises unnecessary warnings when switching from one FT8xx controller to another FT8xx controller.
- Fixed: Code merge window is raised undocked.
- Fixed: Adding events to screen adds the same events if any object is selected.
- Fixed: Touch panel controllers mechanisms improved.
- Fixed: Aborting create new pattern wizard takes 2 clicks on cancel button.
- Fixed: Locate projects resource file button remains disabled after code generation.
- Fixed: Image objects load images without setting picture ration to 1 resulting in stretched image.
- Fixed: Image objects (non FT8xx controllers) missing Picture Ratio property.
- Fixed: Design screen responsive to keyboard inputs even thou code view is active.
- Fixed: Compiler and Visual TFT projects can be easily distinguished by color (Start Page).
Examples
- New: Added Examples for mikromedia PLUS for FT90x
Activation Code
This is the default license. The activation code will be sent to your inbox instantly after purchase. Paste it into the software activation window and start using your compiler.
USB Dongle License
If you need a portable license that can be used on different computers, for an added cost, you can choose the USB Dongle license (standard shipping fees apply).
Site License
If you run a two-person team, a whole R&D department, or teach a class, the Site License is the best choice. It allows you to own, manage and deploy multiple single licenses.
mikroBasic PRO for ARM
Included demo license enables up to 8192 bytes of program words of FREE output code.
Release version: 4.9.0
Release date: 08 June 2016
Release type: Maintenence release
Release Changes
Compiler
- Added: Support for Kinetis MCU family.
- New: 35 Kinetis MCUs supported (via 8 superset files):
- MK22FN128VDC10
- MK22FN128VLL10
- MK22FN128VLH10
- MK22FN128VMP10
- MK22FN128CAH12
- MK22FN1M0VLH12
- MK22FN1M0VLK12
- MK22FN1M0VLL12
- MK22FN1M0VLQ12
- MK22FN1M0VMC12
- MK22FN1M0VMD12
- MK22FN256CAH12
- MK22FN256VDC12
- MK22FN256VLH12
- MK22FN256VLL12
- MK22FN256VMP12
- MK22FN512VDC12
- MK22FN512VLL12
- MK22FN512VLH12
- MK22FN512CAP12
- MK22FN512VMP12
- MK22FX512VLH12
- MK22FX512VLK12
- MK22FX512VLL12
- MK22FX512VLQ12
- MK22FX512VMC12
- MK22FX512VMD12
- MK64FN1M0VDC12
- MK64FN1M0VLL12
- MK64FN1M0VLQ12
- MK64FN1M0VMD12
- MK64FX512VDC12
- MK64FX512VLL12
- MK22FX512VLH12
- MK64FX512VMD12
IDE
- Added: Bootloader Tool now supports Kinetis MCU
- Added: Aligned specifier parsing.
- Improved: ARM simulator improvements.
- Fixed: Debug start when welcome screen in focus sometimes result in IDE crash.
Examples
- New! Added examples for Clicker2 for Kinetis
Activation Code
This is the default license. The activation code will be sent to your inbox instantly after purchase. Paste it into the software activation window and start using your compiler.
USB Dongle License
If you need a portable license that can be used on different computers, for an added cost, you can choose the USB Dongle license (standard shipping fees apply).
Site License
If you run a two-person team, a whole R&D department, or teach a class, the Site License is the best choice. It allows you to own, manage and deploy multiple single licenses.
You will love it.
Stong ally in development.

Discover new heights of personal efficiency with mikroBasic, a full-featured Basic compiler available for seven different microcontroller architectures.
- Over 500 function libraries a mouse click away
- Powerful IDE with user-friendly interface and additional software tools
- Part of a toolchain of compatible MikroElektronika development boards
- 1-time payment (no maintenance fee), frequent updates and support for new chip families
Each compiler comes with a comprehensive Help file and lots of ready-to-use examples designed to get you started quickly. Compiler license includes free upgrades and a product lifetime tech support. You can rely on our help while developing.
Efficient debugging
Hardware in-circuit debugging with mikroProg

mikroBasic has native support for mikroICD™ – hardware step-by-step In-Circuit Debugger when used with fast USB 2.0 mikroProg™ programmer (in both on-board and standalone version). mikroICD™ is a separate DLL module which supports Step-over [F8], Step-into[F7], Step-out[Ctrl+F8], Run[F6], Run To Cursor[F4] debugging operations. Also, debugger supports standard and advanced breakpoints, which enable you to achieve the full potential of fast debugging.
Design & code in one IDE
Visual TFT integrated

Starting from 2016, the mikroBasic IDE includes Visual TFT – a what-you-see-is-what-you-get graphical user interface design tool. The integrated solution allows for a streamlined workflow.
- Drag and drop graphic elements while the compiler generates the code automatically in the background.
- Modify the generated code in the compiler and create event functions.
- Seamlessly switch between designing and coding using keyboard shortcut F12.
To use your mikroBasic IDE with the GUI builder, you will need to acquire a Visual TFT license separately.
Seamlessly switch architectures
With mikroBasic every architecture is instantly familiar

With mikroBasic you can easily port your code from one architecture to another. This gives you an enormous advantage of being flexible to choose the architecture for your next project.
- Every mikroBasic features the same IDE and Integrated Tools.
- The majority of libraries feature the same function prototypes.
Libraries
Over 500 functions. And still counting.

mikroBasic offers a unique mechanism to easily use libraries in your project: Click on the checkboxes of the libraries you need and they will be instantly available in your code. No need for dozens of #include directives.
You can also install and manage third-party libraries using our package manager and library manager.
Integrated tools
Faster. Better. More Productive.

Saving programmer’s time is our top priority. This is why mikroBasic comes with a with fully-functional software tools that can boost your productivity.
- LCD Custom Character Tool
- GLCD Bitmap Editor
- Seven Segment Editor
- UART Terminal
- UDP Terminal
- HID Terminal
- ASCII Chart
- Active Comments Editor
- Advanced Statistics and much, much more.
In-depth knowledge base
Comprehensive help file. Free online books.

mikroBasic comes with a comprehensive and easy to use help file. Additional Language reference, and Creating The First Project manuals are a perfect place for your first steps in mikroBasic. Simply follow step-by step instructions.
Examples
Dozens delivered with the compiler, hundreds more on Libstock.

mikroBasic features dozens of examples demonstrating each library and certain internal microcontroller features. Together with free examples provided on Libstock, developers have ready-to-use building blocks for their next big project.
IDE
The place where you spend your workday.

Config words in plain English
mikroBasic is all about time-saving solutions. There is no need to set configuration bits each time you start a new project. The Edit Project menu gives you a full overview of the entire set of configuration bits in each chip. It’s done in a way that leaves no room for error. Select only among listed options, described in plain English. Edit project includes predefined schemes of oscillator settings for most widely used microcontrollers. Simply load your desired scheme and you are ready to go.

Code Assistant
Control-space is probably the most used shortcut among programmers. Why? Because it initiates Code Assistant – a programmer’s first aid kit. No one needs to memorize function names. Focus on your code and let the syntax write itself correctly. Write function calls with one click of your keyboard. The Code assistant in mikroBasic also suggests correct names of constants, URLs, Active comments and variables. You don’t ever have to get another Syntax error message.

Parameter Assistant
Many functions. Even more parameters. Was it word, or byte? You don’t have to scroll through the Help file. Just hit CTRL+SHIFT+SPACE and function parameters will be listed for you.

Don't like comments? Use pictures instead.
In mikroBasic, any comment can become a multimedia event hook. Add images, files, URLs and assign events to any active comment. A right Mouse Click can open a web browser with a URL. A Mouse Over can display the image. Double Click can open a specified file. This makes comments a much richer reference source for documenting projects. Better comments result in code that is easier to understand and projects that are easier to maintain.

Don’t waste your time browsing for examples. Let them come to you. The new Project Explorer window displays all the compiler’s many included examples by default.
To view your projects, point the path to any other folder. A fast recursion-search algorithm will extract all the projects inside. It will display a tree view of your project files up to any depth. A double click opens the project and sets it as active. Easily switch between the projects as often as you want, and you will have a stable RAM memory consumption.

After you build your project, you can always look under the hood with mikroBasic Advanced Statistics. This tool gives you a visual overview of all the important information about your project. Take a look at your variables, arrays, and constants and know how much memory your program consumes. See which function calls which in the functions tree window. See how big are your functions and how are they linked in memory. This is important if you want to write your own bootloader.
Your first project
Let's build a USB device in 20 lines of code.
Most compilers demonstrate use LED Blinking as the first project. We have decided to start with something more remarkable: a fully operational USB Human Interface Device in a little over 20 lines of code.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
program HID_Read_Write_Polling dim cnt,kk as byte dim readbuff as byte[64] absolute 0x500 ' Buffers should be in USB RAM dim writebuff as byte[64] absolute 0x540 main: ADCON1 = ADCON1 or 0x0F ' Configure all ports with analog function as digital CMCON = CMCON or 7 ' Disable comparators HID_Enable(@readbuff,@writebuff) ' Enable HID communication while TRUE ' USB servicing is done inside the while loop USB_Polling_Proc() ' Call this routine periodically kk = HID_Read() if (kk <> 0) then for cnt=0 to 63 writebuff[cnt]=readbuff[cnt] next cnt HID_Write(@writebuff,64) end if wend end. |
Let us show you how easily mikroBasic handles complex programs using the power of integrated libraries.
The following PIC Basic compiler code sample is a simple loop that demonstrates the operation of the USB HID library. It constantly checks for HID packets, and as soon as the HID message arrives, it is transmitted back with the same content.
Examine these lines to see how the HID library deals with a highly complicated task of HID USB communication. mikroC spares you the research of how USB communication works, and encapsulates everything in simple and easy-to-understand functions.
mikroLab kits for a great start
mikroBasic is the center of entire toolchain

mikroBasic is the center of the MikroElektronika toolchain, allowing you to code, compile, program, run, and debug, all within the same environment by just connecting the right development board. mikroLab contains everything a developer needs to explore the possibilities of any of the microcontroller architectures we offer: a development board (with integrated programmer and debugger), the compiler license, an assortment of accessories, and as a bonus, a free license for one of our GUI design tools (either Visual TFT or Visual GLCD).
Licensing options
Purchase the license that fits your business model
Activation code
This is the default license, purchase the compiler and the activation code will be sent to your inbox instantly. Paste it into the software activation window as start using your compiler in seconds.
USB dongle
A portable license that can be used on different computers. Convenient for users who switch between workstations frequently. The USB dongle license has a slightly higher price. Shipping fees apply.
Site license
If you run a two-person team, a whole R&D department, or teach a class, the Site License is the best choice. It allows you to own, manage and deploy multiple single licenses, with some major benefits.


