DEV Community

Cover image for Modern PIC Compilers to work at in 2021
Cyanne101
Cyanne101

Posted on • Updated on

Modern PIC Compilers to work at in 2021

Suppose we're looking about us, we may see a plethora of automated machines. The integrated system performs a critical part in the digitization of all of these automated systems. Likewise, the microprocessor is an important component of this device, and many kinds of microprocessors, like PIC or Atmel, had been utilized in related works in the past. These microchips aren't immediately coded; instead, they are programmed via compilers, with a different compiler for every microprocessor. The compiler translates source code into program code, and that's the device's main languages. To put it another way, the compiler translates elevated language into machine language, or binary commands. Suppose someone were to speak with someone that's intimately familiar with programming languages, he'd first print "Hello world," and for this purpose, he'd develop a basic program like:
include

Void main ()
}

print (“Hello, world!”);

}

The "Hello world" is therefore printed on any attached LCD or PC screen by this fundamental application. This isn't as straightforward as it appears; there are several intricate factors at play. Whenever we're writing something, we utilize the C language, that's a high-level language that the PC or chip cannot comprehend since it only knows machine or assembly level languagesWe'd need to turn the PC or chip into a low-level language, like machine level language, in order to understand it. This can only be performed via the compiler.

What is a PIC Compiler?

A PIC C Compiler is a PC software which converts a program to another. Source code produced in a high-level language is converted into machine code which the microprocessor could read.

Types of PIC Compilers

  • MPLAB XC8 C Compiler
  • MPLAB XC16 C Compiler
  • MPLAB XC32 C Compiler
  • Mikro C Compiler
  • PIC CSS Compiler

MPLAB XC8 C Compiler

It's the greatest of the greatest series compilers, however it only works with 8-bit microprocessors like the PIC 10, 12, and 18. ANSI C compiler is another name for it. Microchip created it for the purpose of programming the PIC microprocessors. It's completely free to use and can be found on Microchip's official website. Getting this compiler installed requires initially getting the MPLAB software installed, after which you may start installing the XC 8 compiler, that's accessible on the Microchip website. Here, the user starts writing code in C, which is subsequently converted to assembly language by the compiler. Its most recent installation package possesses a size of 75MB. It's a more versatile compiler since you can write anything in it as if it were a PIC microcontroller. For novices, it is quite simple to utilize.

MPLAB XC16 C Compiler

Image description
It is an MPLAB XC compiler's variant that only works with sixteen-bit PIC microprocessors like PIC 24E. PIC24F, PIC 24H, DSPIC30F, DSPIC33E and DSPIC33F. It possesses similar features like the CX8 C compiler, with the exception of the microprocessor bits. It's simple to utilize and could be found on the official page of Microchip.

MPLAB XC32 C Compiler

Image description
It is similar to the MPLAB XC compiler, except it's specifically for supporting or programming 32-bit microchips like the PIC32MZ, PIC32MX, and PIC32MM. It contains similar characteristics as the CX8 C compiler, with the exception of the microprocessor bits. It's very simple to utilize and understand, and you could get it on the Microchip website.

Mikro C Compiler

Image description
It is among the best compilers created by the Mikroelektronika firm for the purpose of supporting and programming every PIC microprocessor's bits. It isn't available for free, however the student variant is free, and it may be found on Mikroelektronika's website. It is simple to utilize and provides a welcoming environment for every user. It offers a library of about 600 functions. It possesses a strong Arduino IDE and various software resources, as well as having compatibility with the Mikroelektronika board for a user-friendly interface. Whenever a user buys it, he/she will just have to make payment once since it includes auto-update configurations and constantly supports new processor families.

PIC CSS Compiler

Image description
It was created about 20 years ago by one CSS development firm to provide software solutions in integrated gadgets for PIC microprocessors and DSC gadgets. For people with no experience in getting something programmed or software utilization, the PIC CSS compiler is simple to understand and utilize. It includes a comprehensive textbook that explains the C programming language and the steps to use it with PIC microprocessors. It offers pro-level optimization, which means that the memory capacity of the commands, the hardware stacking size, peripheral capabilities, pin and memory banking features, and so many others are all optimized.

Features of PIC Compilers

  • Memory sticks (program memory, which you could start programming by utilizing Make Programs Like A Boss (MPLAB) gadgets)
  • Static Random Access Memory
  • Electronic Programmable Read Only Memory which could be programmed at run-time)
  • Sleep mode
  • Timer for keeping an eye on things (Watchdog timer)
  • An outside clock or a variety of crystal or Resistance-Capacitance oscillator setups

Variants

There are several gadget variations inside a series, based on the hardware components the microchip has:

  • Generally speaking Pins for Input and Output
  • Oscillators for the internal clock
  • 8/16/32-bit timers are available.
  • Synchronous/Asynchronous Serial Interface Universal Serial Asynchronous Receiver Transmitter
  • MSSP Peripheral Inter Integrated Communication and Serial Peripheral Interface communication
  • Pulse Width Modulation and Capture/Compare modules
  • ADC converters of about 1.0 Msps
  • Supports Universal Serial Bus, Ethernet, and Controller Area Network interfacing

Uses of PIC Compiler

  • Code apps are faster and with fewer code lines than with assembler.
  • Create programs simpler to comprehend.
  • You won't have to create as much code if you use pre-made libraries.
  • Focus on the work at hand; it'll take care of the low-level hardware specifics.
  • For several targeted micros, reuse a similar source code.
  • There's no requirement for assembly if you just work with high-level languages.
  • The code is simple to understand.
  • Numerous microchips from the same family, such as the PIC, could be programmed.
  • Utilizing a career, study a standard language like C.

Top comments (0)