microPascal

All Pascalite microcontrollers are programmable in microPascal, a special version of the higher programming language Pascal, designed to use in 8-bit microcontroller systems. The simplicity of this language combined with the powerful instructions makes it possible to develop advanced and structured applications in a very short time.

The language supports among other things:

  • Procedures. These are used to divide a program in blocks. This results in a more structured and easier to read program. Parameters (value and variable) can be used when calling procedures, and local variables canbe declared within procedures.
  • Loops: REPEAT … UNTIL en FOR … TO/DOWNTO … DO.
  • Selection: IF … THEN … ELSE.
  • Counter-interrupt. If a counter-overflow occurs (the counter goes from 255 to 0) a special interrupt-procedure can be started immediately, interrupting the running program. After finishing execution of the interrupt the program will continue. Because the counter can be given a preset of 255 it is possible to generate an immediate interrupt.
  • 16 bit arithmetic operators (+, -, *, div, mod, and, or, xor) using the type word (0…65535).
  • Arrays of bytes.

The most important instructions are:

Set / Reset Make an I/O-line high / low
Pulse Generate a pulse on an I/O-line
Analog Measure an analog input
Delay Delays the program for a given time (1 millisecond up to 255 seconds)
Read Read from an external source (counter, RS232 and I2C)
Write Write to an external destination (counter, LCD, RS232 and I2C)
Inc / Dec Increase / Decrease a variabele
Mem Write data to / Read data from the eeprom
GotoXY Moves the cursor of the LCD-display
Random Returns a random value (0..255)
GetDate / GetTime Read date / time from the special clockmodule
SetDate / SetTime Set date / time in the special clockmodule