Computer systems are inevitable in everyday life. They are part of almost every device powered by electricity. We know very well personal computers. However, the majority of computer systems in use today are embedded in other machinery, such as cars, safety devices, telephones, multimedia players, USB sticks and almost all peripherals for computers. These computers are called embedded systems. An embedded system is a special computer system designed to perform one or a few specialized functions, often with real-time processing. A general-purpose computer, such as a PC, can do many different tasks depending on programming. A general-purpose computer has its parts like keyboard, mouse, monitor, case, printer and it is not embedded into anything.

Embedded systems usually have no typical user interface. Their main function is to control or support the main device where they are embedded. While some embedded systems are very sophisticated, many are vary simple and have minimal requirements for processing speed and program length, no operating system, and low software complexity. Typical IO devices for embedded systems include ADC, DAC, PWM outputs, cameras, relays, LEDs, OLED displays, RF devices, and sensors for data such as temperature, motion, speed, current, voltage, etc. Embedded systems usually have no keyboard, large screen, disks, printers, or other recognizable I/O devices of a general-purpose personal computer.


A key part in many embedded systems is a microcontroller. A microcontroller (also MCU or uC) is a functional computer system-on-a-chip (SoC). It contains everything needed to execute programs and to interact with the world: a microprocessor core, memory, programmable IO peripherals, timers, and in some cases also specialized blocks to perform special functions, e.g. encryption. Microcontrollers include an integrated central processing unit CPU, memory (a small amount of RAM, FLASH/ROM program memory, or both) and peripherals capable of input and output. Microcontrollers are used in automatically controlled products and devices, such as automobile engine control systems, various multimedia players, hand held devices, safety control systems, industry automation, office machines, appliances, mobile devices, consumer electronics, etc. Embedded systems compared to a classical design using a separate microprocessor, memory, and input/output devices, have lower cost, smaller size, and consume less power and therefore are economical to electronically control almost any device. First microcontrollers in 1970s were 8-bit, while today many 32-bit micro-controllers are used also for simple devices. They are very affordable and offer high performance.

Embedded Compilers

To program any embedded system with microcontroller you need a compiler for this microcontroller. In embedded world C is almost a standard for programming language. Several C compilers are available for any family.

C programming language is a general-purpose, structured, procedural, cross-platform, imperative computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories. It is also standardized (ANSI C). Although C programming language was designed for implementing operating systems and system software, it is also widely used for developing application software. It is widely used on many different software platforms and computer architectures, and several popular compilers exist. C programming language is also widely used for embedded programming. C has greatly influenced many other popular programming languages, most in particular C++, which originally began as an extension to C programming language.

Other high level programming languages such as Pascal, BASIC, Forth, PL/M and Modula 2 are available for some families but they are less widely used than C and assembly language. There are many discussions on which language is better, in particular between C and Pascal programmers. There is no clear winner. Both languages can be used to write any kind program.

Pascal programming language

Pascal programming language is an influential, imperative and procedural programming language, designed by Niklaus Wirth in late 1960s as a compact and efficient language intended to teach good programming techniques using so-called structured programming and data structuring. An extension known as Object Pascal was designed for object oriented programming. Borlad has become famous by their popular Turbo Pascal compiler for PC in early 80s. Turbo Pascal with its successors including Dephi is probably the most widely used Pascal compiler. Pascal compilers are also available for some microcontroller architectures like 8051, AVR and ARM.

Interesting Pascal resources:

Comparison of Pascal and C (Wikipedia)

Top 10 reasons why Pascal is better than C

This tutorial is an introduction to the Pascal simple, yet complete, introduction to the Pascal programming language. It covers all of the syntax of standard Pascal, including pointers.

Learn Pascal

8051 microcontrollers

One of the still very popular 8-bit microcontrollers is Intel 8051. The original 8051 microcontroller is a single chip microcontroller with Harvard architecture. It was developed by Intel in 1980 for use in embedded systems with official designation as MCS-51. Today this architecture is still used in many microcontrollers from various manufacturers. Intel's original versions of microcontrollers were popular in the 1980s and also in 1990s, but has today largely been superseded by a vast range of faster or functionally enhanced microcontrollers compatible with the 8051 architecture, manufactured by more than 20 independent manufacturers including Atmel, Silabs (formerly Cygnal), NXP (formerly Philips Semiconductor), Infineon Technologies (formerly Siemens AG), Maxim Integrated Products (via its Dallas Semiconductor subsidiary), Nuvoton (formerly Winbond), ST Microelectronics, TI and Cypress Semiconductor. Some advanced microcontrollers using 8051 core can achieve execution speeds close to 100 MIPS. One of the reasons why is the 8051 family of microcontrollers still popular today is the fact that there are a lot of excellent toolchains for delveloping 8051 software.

AVR Microcontrollers

The AVR is a modified Harvard architecture (program and data are stored in separate, simultaneously accessible memory) 8-bit RISC single chip microcontroller developed by Atmel in 1996. The AVR was one of the first microcontroller families which used on-chip flash memory (nonvolatile programmable memory, persistent on power-down) for program storage, as opposed to OTP ROM, EPROM, or EEPROM used by other microcontrollers at the time. Low power high performance AVR microcontrollers can handle demanding 8 and 16-bit applications. Single cycle instruction RISC CPU, picoPower technology, rich feature set are some of the highlights of the AVR architecture which ensures easy application development and fast code execution combined with the lowest possible power consumption.

A variety of timers, SPIs, UARTs, internal oscillators, pull-up resistors, pulse width modulation, Analog Comparators, ADCs and Watch-Dog Timers and well-defined I/O structure are some of the features available for engineers. Most instructions only take a single clock cycle to execute and there is no internal clock division. Whether you program in C, Pascal or assembly language, the tuned AVR instructions decrease program size and development time. The AVR processor features a real life stack and its instruction set was designed and optimized for use with high level languages - it is easy to program these chips using C. AVR microcontrollers may be programmed using assembly or a higher level language. Learning to program it in assembly language is a good idea, as it gives you in depth understanding of the internal operations.