The EC-LIB® is a library consisting of mathematical and control-related functions. It is designed for the development of embedded software and employs fixed point arithmetic for all computing operations. EC-LIB® functions are implemented in C.
Optimize your workflow by using EC-LIB® library functions. Instead of focusing on developing standard functions you simply apply a library function. This enables you to fully concentrate on implementing the core functionality of your own product.
Reduce your time to market due to faster product development by an optimized workflow. This is a common target and one of the requirements implemented by the product EC-LIB®.
Based on best practices from 20+ years of software development in industrial applications, consumer products, telecommunication, medical and automotive industry we developed a set of library functions which enable you to develop your own state-of the- art products cost optimized and faster than others.
How does the fixed-point library work within your project?
What are the required steps?
- You require a typical standard functionality within your code.
- Check the well structured and extensive user manual for your required solution.
- Call the function you need within your embedded C project.
What do you gain from the EC-LIB®?
- You save time during coding of your C code.
- You needn’t describe the standard functions as the EC-LIB® functions are well documented in the user manual and in the source variant you even get all the Doxygen comments you need.
- The functions are fully tested by means of reviews, PC and target tests. You can fully rely on them.
- If you have a safety critical system all the required safety documentation according can be requested from Eclipseina. The functional safety standards IEC 61508 and ISO 26262 have been considered during development.
The EC-LIB® embedded C fixed-point software library is available as 16-bit and 32-bit version. The functional content is available as either basic package or the complete set which includes the basic package, filter and controller functions as well as interpolation routines.
16-bit | 32-bit
The EC-LIB® is a software library written in C, which is using fixed-point arithmetic and thus is suitable for all microcontrollers whether they are equipped with a floating-point unit or not.
The library is composed of a basic package and extension packages which require the functions provided by the basic package.
This package is providing 5 different categories of fundamental C functions which are:
including different addition, subtraction, multiplication and division functions.
which provide assignment, absolute value calculations, minimum and maximum value extraction.
which check for less, greater, equal in different combinations as well as functions which check for the EC-LIB® defined exceptions NAN, POS_INF and NEG_INF.
calculating square root, square, cube and the 4th power
which include different combinations of the elementary and power functions that are commonly needed for technical calculations
EC-LIB® Extension 1 - Controller + Filter
This package is providing you with filter and controller functions needed for your electronical system. The main functionalities are:
Moving average functions
including a simple moving average in a runtime optimized and in a safe version and a weighted moving average function.
PT1 and PT2
filter functions are provided as well.
PI, PD, PID, PDT1 and PIDT1
The biggest set of functionalities are the controller functions PI, PD, PID, PDT1 and PIDT1 which are all implemented in a version with and without tracking functionality and feed forward.
New functions which will be released in Q2 2019 are high pass filters and low pass filters such as a Butterworth filter.
EC-LIB® Extension 2 - Interpolation Routines
This package is comprised of linear interpolation routines and provides the following functions.
– One-dimensional linear interpolation routine
– Two-dimensional linear interpolation routine
– Three-dimensional linear interpolation routine
EC-LIB® Extension 3 - Bit Functions
This package will be released in Q3 2019 and will enable a microcontroller specific optimized bit handling.
Buy the EC-LIB®
Evaluate the EC-LIB® either as demo version or the full functionality as free trial. The EC-LIB® is provided as 16 / 32-bit version either as basic package or with full functionality. We provide a precompiled version or a source variant. You can start small and update any time.
EC-LIB® Evaluation Packages
EC-LIB® Demo is provided for a free download without registration. It is compiled and thus applicable for applications on a PC and contains a small subset of functions namely multiplication, square, is equal and is less or equal. A practical example which can be implemented using the EC-LIB® Demo version is explained in the Quick Guide videos.
EC-LIB® Free Trial is available for testing for 30 days after registration. As well as the demo version it is also compiled for the PC. The Free Trial provides the full set of functions (basic and complete) for 16-bit and 32-bit.
EC-LIB® Delivery Packages
Type of EC-LIB® delivery packages
The embedded C fixed-point library EC-LIB® can be purchased as precompiled version for different microcontrollers and as source variant. Upgrading from precompiled to source variant is always possible.
The advantage of the precompiled version is the low cost of this library versions.
We are continuously enlarging the portfolio of supported microcontrollers. Please let us know which microcontroller you intending to use.
The advantage of the source variant is that migration of projects to newer microcontrollers can be realized easily. It provides the maximum level of freedom, e.g. archiving due to legal requirements can be ensured. As the sources are available so are the documentation sources for your Doxygen documentation.
Functional content of EC-LIB® packages
The following EC-LIB® packages are available as precompiled and source variant:
EC-LIB® 16-bit basic
includes the basic functions described in the product section and is using mainly signed 16 variables within the functions.
EC-LIB® 16-bit complete
includes the full set of functions described in the product section and is using mainly signed 16 variables within the functions.
EC-LIB® 32-bit basic
includes the EC-LIB® 16-bit basic package and basic using mainly signed 32-bit variables within the function.
EC-LIB® 32-bit complete
includes the EC-LIB® 16-bit complete version and contains the full set of functions also for signed 32-bit variables.
Support on the EC-LIB®
We make sure you are well supported. The EC-LIB® quick guide videos explain the concept and handling extensively. Practical support during your work with the EC-LIB® is provided by online tooling and in addition direct support is offered as part of the support and maintenance package.
EC-LIB® Quick Guide
The quick guide videos inform you about the technical concept, show how to include the EC-LIB® into your eclipse development environment with the correct setting and demonstrate the usage of the EC-LIB® while coding based on a practical example.
A set of six videos provide you with an introduction to the EC-LIB® embedded C fixed-point library.
We provide detailed information about the technical concept, demonstrate how to include the EC-LIB® files into your eclipse environment. This also includes the settings in eclipse. To get acquainted with the EC-LIB® we show the implementation of a small project within an example.
The EC-LIB® Quick-Guide videos have the following content:
EC-LIB® Quick-Guide 1 – Technical Concepts
This first video of the EC-LIB® quick guide has the longest duration as it explains the technical concept. As it is using animations it is well worth watching even if you are a technical expert. The video includes a detailed description of the data type ECLIB_FIX, how to optimize the resolution of your fixed-point variables by means of applying the shift factor concept and it provides a good visualization of the defined software exceptions.
EC-LIB® Quick Guide 2 – Download the Demo or Free Trial Version
This second video guides you step by step via screencasts on downloading your demo or free trial version of the EC-LIB® fixed-point library.
EC-LIB® Quick Guide 3 – Integrating the EC-LIB® into Eclipse
This third video provides screencasts and explanations to demonstrate how to integrate the EC-LIB into your Eclipse software project.
EC-LIB® Quick Guide 4 – Eclipse Configuration and File Setup
This fourth video shows the Eclipse configuration and file setup for the example implementation. Screencasts guide you through the different required steps.
EC-LIB® Quick Guide 5 – Web Tool and Choice of Shift Factor
This fifth video introduces you to the example, which was implemented to demonstrate the practical work using the EC-LIB® using functions which are provided by the free demo version. This example is calculating different volumes for cuboid and pyramids of different sizes and compares the volume at the end. As the example includes the definition of the right resolution of your fixed-point variables, it is necessary to determine the shift factor which suites the requirements best. To do so the handling of the webtool ec-lib.com/#tool is explained and visualized by screencasts.
EC-LIB® Quick Guide 6 – Coding
This last quick guide video guides you through coding an example using EC-LIB® functions. Here we calculate the volume of a cuboid and a pyramid using fixed-point arithmetic. In the next step the values of the two forms are compared.
It is recommended to implement the example in an own environment based on the information provided as screencast and animation within the video.
Tool - resolution and shift factor for fixed point
This tool for fixed point arithmetic provides support for resolution related calculations. It calculates the range from lowest value to highest value, the resolution and the shift factor. In addition to this it provides initialization examples for your fixed point variables.
There are two options to compute the values. Depending on the requirements, the button can be set to the options:
Adapt shift factor | Calculates the resolution based on the required lowest and highest value
1. To calculate the resolution and correct shift factor, the lowest value and/or the highest value have to be entered.
2. After the shift factor is calculated, by moving the slide bar, an altered shift factor can be chosen,
so the range and thus the resolution can be modified.
Note: When entering only one value the resolution and the shift factor are calculated based on this single value.
Choose shift factor | Calculates the resolution based on a given shift factor
Only the shift factor has to be set with the slide bar and the other fields have to be left empty. In this case the slide bar denotes the absolute shift factor. So the exact resolution and range for your fixed point variables is calculated based on the chosen shift factor.
Please note: When switching the option from adapt shift factor to choose shift factor, all input fields will be reset.
Please consider the following rules and restriction when entering data:
- Numbers can only be displayed with the following rule (+/- 0-9 . 0-9 E/e +/- 0-9)
- Comma is not a valid input. For decimal points please use the dot
- The tool supports a resolution between 10-12 and 1012