Embedded Firmware Library (EFL)
Many Elektor-readers really like to modify projects, not to build them as they are. So about 99% of the Elektor projects are published with open source microcontroller firmware. However, developers always use their favorite controllers, and if you want to modify the code, you often have to dive deep in the datasheet of that controller.
Many Elektor-readers really like to modify projects, not to build them as they are. So about 99% of the Elektor projects are published with open source microcontroller firmware. However, developers always use their favorite controllers, and if you want to modify the code, you often have to dive deep in the datasheet of that controller. The "Embedded Firmware Library" is an upcoming project which offers a kind of API to control the controller-functions and the functions of the peripheral blocks on a certain board. As an application developer, you don't have to know anything about the registers of the controller. And you can write controller- and board-independent code. In principle, another developer can use your code without modifications on his board and with his favorite controller.
The hardware layer:
ControllerEFL.h/.c
Controller/Register dependent definitions
Functions to control the internal features of the controller
For IO, ADC, UART, SPI, DAC, Timer
_Setup-Function
_Set/_Get/_Read/_Send-Functions
BoardEFL.h/.c
Functions to control board-blocks like a display (connected via SPI or 4-wire), RS485-driver (connected to UART), LEDs and Relays (connected to certain IO-Pins), Buttons and Switches (connected to certain IO-Pins) and more
ExtensionEFL.h/.c
The same as BoardEFL.h/.c for an extension-board.
On top of this hardware-layer you can find hardware-independent library-modules, e.g. for display, SD-card, stepper-motor and so on. With those libraries, you can control more than one "block" of stepper-motor, display and so on in your system. Protocol-libraries like the ElektorBus can be combined in a flexible way to interface-libraries like a UARTInterface- or a TCP/IP-Library, so you can send and receive messages over various physical channels.
We would like to recommend the library for automation, control, regulating, measuring applications which don't need an accurate timing, real-time-features or high frequencies, bandwiths or baudrates.
Current Status:
Sourcecode is hosted on http://sourceforge.net/projects/embeddedlib/.
See Tab "code".
Supported Controllers and Controller-Functions (selection):
Other controllers will follow.
Libraries (hardware-independent, selection):
* Display
* Stepper Motor
* TCP/IP-Module
* SD-card (Raw data)
* LED/Button
* ElektorBus-Protocol
* BlockProtocol (ASCII-based protocol to control some controller-functions from a PC-terminal), see Elektor article www.elektor.com/130154.
Others will follow.
Software-Download is now available with some demo-applications for Elektor-projects:
Xmega-Webserver-Board (www.elektor.com/120126)
ElektorBus StepperMotor Driver (www.elektor.com/120509)
3-Wire-Interface, Arduino Uno (www.elektor.com/130154)
ElektorBus & Python (www.elektor.com/120744)
Upcoming Projects:
Wireless Modules (Autumn 2013)
ATmega Board for Beginners (Winter 2013)
Webserver with the Xmega (Winter 2013)
Multitester (Spring 2014)
EFL on ARM (Spring 2014)
EFL on Linux (Spring 2014)
Software and Doxygen Doku is "under construction"!
Extra document as "Manual" is available (German and English language).
Extra-project in the codebase: ArduinoDemoWebinar. Control an ArduinoUno from a Terminal-Program (9600 Baud):
L 0 0 + <CR>
L 0 0 - <CR>
switch LED on and off.
C 0 x + <CR>
C 0 x - <CR>
Connectorpin x at the Arduino-Connector high or low.
More on the protocol in www.elektor.com/130154
Software-Download EFL Codebase:
www.elektor.com/Uploads/dot_labs_large_files/efl_code_version_0_84.zip
Discussion (0 comments)