Pic Micro Pascal
Encyclopedia
Pic Micro Pascal aka PMP is a free Pascal
cross compiler
for PIC microcontroller
s. It is intended to work with the Microchip Technology
MPLAB
suite installed; it has its own IDE and it is a highly optimized compiler.
It is intended to target 8-bit processors only: PIC10, PIC12, PIC16, PIC16 enhanced, PIC18.
The main axis of development was to avoid special built-in functions and procedures to interface hardware registers. These registers are accessed directly as variables, there are no wrapper functions, and emitted code is quite compact.
PMP does not include an assembler or linker. It is designed to work with the Microchip
MPLAB
suite installed, and directly uses MPASM and MPLINK .inc, .dev and .lkr files for standard register definitions, processor features, and memory mapping initializations.
PMP also supports the GPUTILS
suite partly. A better integration is in progress.
, but a RECORD can have methods.
As of 2011, the implementation supports multiple file compiling, by include directives and by a per unit concept.
PMP's data types:
syntax of Turbo Pascal
or Delphi, with some extensions to support some target processor features (bit manipulations ...).
for now, as free software
in the future. The latest version is 1.6.1, July 2011.
Pascal (programming language)
Pascal is an influential imperative and procedural programming language, designed in 1968/9 and published in 1970 by Niklaus Wirth as a small and efficient language intended to encourage good programming practices using structured programming and data structuring.A derivative known as Object Pascal...
cross compiler
Cross compiler
A cross compiler is a compiler capable of creating executable code for a platform other than the one on which the compiler is run. Cross compiler tools are used to generate executables for embedded system or multiple platforms. It is used to compile for a platform upon which it is not feasible to...
for PIC microcontroller
PIC microcontroller
PIC is a family of Harvard architecture microcontrollers made by Microchip Technology, derived from the PIC1650 originally developed by General Instrument's Microelectronics Division...
s. It is intended to work with the Microchip Technology
Microchip Technology
Microchip Technology is an American manufacturer of microcontroller, memory and analog semiconductors. Its products include microcontrollers , Serial EEPROM devices, Serial SRAM devices, KEELOQ devices, radio frequency devices, thermal, power and battery management analog devices, as well as...
MPLAB
MPLAB
MPLAB Integrated Development Environment is a free, integrated toolset for the development of embedded applications on Microchip's PIC and dsPIC microcontrollers.- MPLAB IDE v8 :...
suite installed; it has its own IDE and it is a highly optimized compiler.
It is intended to target 8-bit processors only: PIC10, PIC12, PIC16, PIC16 enhanced, PIC18.
The main axis of development was to avoid special built-in functions and procedures to interface hardware registers. These registers are accessed directly as variables, there are no wrapper functions, and emitted code is quite compact.
PMP does not include an assembler or linker. It is designed to work with the Microchip
Microchip
Microchip can also refer to:* Integrated circuit, a set of electronic components on a single unit.* Microchip Technology, a company that makes popular 8, 16 and 32-bit microcontroller lines.* Microchip implant , a microchip implanted into animals....
MPLAB
MPLAB
MPLAB Integrated Development Environment is a free, integrated toolset for the development of embedded applications on Microchip's PIC and dsPIC microcontrollers.- MPLAB IDE v8 :...
suite installed, and directly uses MPASM and MPLINK .inc, .dev and .lkr files for standard register definitions, processor features, and memory mapping initializations.
PMP also supports the GPUTILS
GPUTILS
GPUTILS is a GPL-licensed set of tools for the PIC microcontroller, comprising an assembler, disassembler, linker, and object file viewer. It is available for various flavors of Unix, Mac OS X, and Microsoft Windows.-History:...
suite partly. A better integration is in progress.
Language features
PMP does not support object-oriented programmingObject-oriented programming
Object-oriented programming is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as data abstraction,...
, but a RECORD can have methods.
As of 2011, the implementation supports multiple file compiling, by include directives and by a per unit concept.
PMP's data types:
- simple records (subset): RECORD
- bit booleans: BOOLEAN
- unsigned and signed 8-bit integer types: CHAR, BYTE, SHORTINT
- unsigned and signed 16-bit integer types: WORD, INTEGER
- unsigned and signed 32-bit integer types: LONGWORD, LONGINT
- enumerations
- arrays (one dimension): ARRAY
- strings (variable length): STRING
- pointers (subset)
- floating point variables and operations (PIC16 and PIC18 only): two FP formats, one 40-bit internal (REAL) and a subset of the IEEE 32 bits format (SINGLE); both formats do not handle infinite and NaNNaNIn computing, NaN is a value of the numeric data type representing an undefined or unrepresentable value, especially in floating-point calculations...
Language dialect
PMP syntax is very close to the non-OOPObject-oriented programming
Object-oriented programming is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as data abstraction,...
syntax of Turbo Pascal
Turbo Pascal
Turbo Pascal is a software development system that includes a compiler and an integrated development environment for the Pascal programming language running on CP/M, CP/M-86, and DOS, developed by Borland under Philippe Kahn's leadership...
or Delphi, with some extensions to support some target processor features (bit manipulations ...).
History
PMP was created in 2006 by Philippe Paternotte and released as freewareFreeware
Freeware is computer software that is available for use at no cost or for an optional fee, but usually with one or more restricted usage rights. Freeware is in contrast to commercial software, which is typically sold for profit, but might be distributed for a business or commercial purpose in the...
for now, as free software
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...
in the future. The latest version is 1.6.1, July 2011.