Turbo51 – Pascal Compiler For 8051 Microcontrollers

Most of computer systems in use today are embedded in other machinery, such as automobiles, telephones, appliances, and almost all peripherals for computer systems. These computers are called embedded systems. An embedded system is a special computer system designed to perform one or a few dedicated functions, often with real-time processing. It is usually embedded as part of a complete device including hardware and mechanical parts. In contrast, a general-purpose computer, such as a PC, can do many different tasks depending on programming. Embedded systems control many of common devices in use today.

While some embedded systems are very complex, many have minimal requirements for processing speed and program length, with no operating system, and low software complexity. Typical input and output devices include switches, relays, solenoids, LEDs, small or custom OLED displays, radio frequency devices, and sensors for data such as temperature, humidity, motion etc. Embedded systems usually have no keyboard, screen, disks, printers, or other recognizable I/O devices of a personal computer, and may lack human IO devices of any kind.

A key component in many embedded systems is a microcontroller. A microcontroller (also MCU or uC) is a functional computer system-on-a-chip (SoC). It contains a processor core, memory, and programmable IO peripherals. Microcontrollers include an integrated CPU, memory (a small amount of RAM, FLASH program memory, or both) and peripherals capable of input and output. Microcontrollers are used in automatically controlled products and devices, such as car engine control systems, remote controls, office machines, appliances, mobile phones, and consumer electronics. By reducing the size, cost, and power consumption compared to a design using a separate microprocessor, memory, and input/output devices, microcontrollers make it economical to electronically control many more processes. One of the still very popular 8-bit microcontrollers is Intel 8051.

The 8051 microcontroller is a Harvard architecture, single chip microcontroller which was developed by Intel in 1980 for use in embedded systems. Intel’s original versions were widely used in the 1980s and also in 1990s, but has today largely been superseded by a vast range of faster and functionally enhanced 8051-compatible microcontrollers manufactured by more than 25 independent manufacturers including Atmel, Infineon Technologies (formerly Siemens AG), Maxim Integrated Products (via its Dallas Semiconductor subsidiary), NXP (formerly Philips Semiconductor), Nuvoton (formerly Winbond), ST Microelectronics, Silicon Laboratories (formerly Cygnal), Texas Instruments and Cypress Semiconductor. Intel’s official name for the 8051 family of microcontrollers is MCS-51.

Several C compilers are available for the 8051 family, most of which feature extensions that allow the programmer to specify where each variable should be stored in its six types of memory, and provide access to 8051 specific hardware features such as the multiple register banks and bit manipulation instructions. Other high level programming languages such as Pascal, BASIC, Forth, PL/M and Modula 2 are available for the 8051 , but they are less widely used than C and assembler. In the world of embedded compilers C is almost a standard for programming. There are many discussions on which programming language is better, in particular between C and Pascal programmers. There is no clear winner.

C is a general, block structured, procedural, cross-platform, imperative computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system. Although C 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 has greatly influenced many other popular programming languages, most in particular C++, which originally began as an extension to C programming language.

Pascal is an influential, imperative and procedural programming language, designed by Niklaus Wirth in late 1960s as a small and efficient language intended to encourage good programming techniques using so-called structured programming and data structuring. An extension known as Object Pascal was designed for object oriented programming.

Most embedded engineers use commercail Keil or free SDCC C compiler for 8051 projects. Simply because C language is standard for embedded programming and because there was no good Pascal compiler for 8051 microcontrollers. Now this has changed. There is Turbo51, a free Pascal compiler for the 8051 family of microcontrollers. If you like Pascal programming language and you are working with 8051 microcontrollers then you will find Turbo51 an excellent tool.

Turbo51 is a Win32 command line optimizing compiler with Borland Turbo Pascal 7 syntax. It has full floating point support, you can mix Pascal and assembly language using all register banks. Advanced code generator and smart linker generate high quality code in many formats: binary (.bin), Intel HEX (.hex), OMF-51 (.omf), assembler source code (.asm). Source-level debugging is also possible with extended object (OMF) file.

One of the key strengths of Turbo51 are optimizations to generate high quality code. Turbo51 uses, among others, also the following compiler optimizations: constant folding, dead code elimination, branch elimination, integer arithmetic optimizations, loop-invariant code motion, code-block reordering, loop inversion, induction variable elimination, instruction combining, instruction selection, register allocation, common sub-expression elimination, and peephole optimizations.

Turbo51 is released as a freeware. You can download it and use it for hobby projects or serious work. On the Turbo51 web page you will find documentation and code examples that show the syntax, features and generated files. This should be enough to start a 8051 project development with Turbo51. And if you are still missing some command or have a problem you can always ask the author for help.

If you are already familiar with the 8051 assembly language programming you can start with Turbo51 as 8051 assembly language compiler and then add some Pascal statements until you become familiar with Turbo51 and Pascal syntax. A good approach is also to compile some Pascal code and then check generated code. This way you can learn assembly language, get some ideas on how to write effective code and become familiar with the compiler. Turbo51, like many popular C compilers for 8051, generates optimized code and supports source-level debugging with OMF object file.

With Turbo51 you have a choice. You can choose between many C compilers and Turbo51 – a Pascal compiler for 8051 microcontrollers.

Find out useful info about Nanny Camera – read the publication. The time has come when concise info is truly at your fingertips, use this possibility.

Popularity: 4% [?]

Bookmark and Share
Share this Post:
Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

No Responses to “Turbo51 – Pascal Compiler For 8051 Microcontrollers”

Leave a Reply:

Name (required):
Mail (will not be published) (required):
Website:
Comment (required):
XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>