Skip to main content

Posts

Showing posts with the label Delphi

Portable Image File (PIF) library for Lazarus and Delphi

Portable Image File (PIF) is an embedded-systems friendly, bitmap-like image format with ease of use and small size. This image format develops by the gfcwfzkm ( aka Pascal ) for low-end embedded systems. The file format and PIF's original implementation are available at https://github.com/gfcwfzkm/PIF-Image-Format . In this project, I developed an open-source library for the above file format to get used in Lazarus and Delphi programming languages.  This PIF library supports Windows and Linux operating systems, including Raspberry Pi OS . Sample application in Linux environment. The library is available at https://github.com/dilshan/pascal-pif-library .  The library methods are self-explanatory, and sample projects are available for Lazarus and Delphi . For example, the following code block demonstrates opening the Portable Image File and displaying it on the TImage . var pifObj: TPortableImageFile; begin pifObj := TPortableImageFile.Create('sample-image.pif'...

BMP180 based USB atmospheric pressure monitor

We initially developed this USB atmospheric pressure monitor to study some operating characteristics of Bosch BMP180 sensor . BMP180 is a low-cost sensor for measuring barometric pressure and temperature. According to the datasheet this sensor can use to measure pressure ranging between 300hPa to 1100hPa . This sensor is introduced a couple of years back but still, it is popular due to lower cost and simplicity of its interface. BMP180 based sensor module We did this unit to test the BMP180 sensor more accurately and to study its behaviors. This unit is based on PIC18F2550 microcontroller and the main reason to select this MCU is because of its built-in USB 2.0 interface. BMP180 sensor monitor application To display sensor calibration data and it’s readings we did small windows application. This application display and plot temperature and pressure readings captured from the BMP180 sensor. This unit is programmed to work as a USB HID device and no special device drive...

Sensor framework for Data Logging

This is a simple sensor kit to drive 8 active or passive sensors and log its data into a remote Android application. This system also has an option to activate an external device(s) based on the specified threshold of sensor data. This sensor controller is mainly built around the Raspberry Pi Model 3 B+ and PIC16F877A MCU. PIC16F877A MCU is used to interface/select sensors and it's built-in 10bit multi-channel ADC is used to capture the analog signals from sensors. During the prototype stage following sensors are tested with this system: LM35 precision temperature sensor MQ7 Carbon Monoxide gas sensor Electret Microphone NSL-19M51 LDR HC-SR501 PIR sensor A3144 Hall effect sensor Apart from the above list this system can use to drive and capture most of the other analog/digital sensor signals such as current sensors, pressure sensors, chemical sensors, humidity sensors, etc. In this system, Android monitoring application is designed to connect with the sen...

Audible Morse code to text message converter

Morse View is an open source software project to convert audible Morse codes to text messages. This application is capable to convert Morse codes from wave files or from the audio line/microphone inputs. Conversion from Morse code to text can perform based on amplitude and frequency decomposition of the input audio stream. Morse View decoding 25 WPM Morse code wave file We extensively test this application using Morse code files available at ARRL - W1AW code practice page . During the testing we may be able to use this application to decode 5WPM – 40WPM Morse code inputs. As per our test result, after 25WPM, accuracy of the decoder is heavily depends on the quality of the sound card / audio capture device (ADC) and with the system configuration. We test this system with few audio adapters, and out of those adapters both Creative Sound Blaster X-Fi and VIA VT1723 generate more accurate results, especially on 25WPM – 40WPM range. We test this software with different noise c...

Audio / Visual Morse code Generator for Android

This is an Android application to send Morse code messages using tones or flash (light) signals. This application supports for basic Latin alphabet, Arabic numerals and it can transmit messages with specified speed which can vary from 100ms to 500ms. Main application view  This application is developed using Delphi XE5 and it supports for Android version 2.3.3 ( Gingerbread ) to 4.2 ( Jelly Beans ) except Android version 3.2 ( Honeycomb ). This application is specifically design for 3.4 inch - 5.0 inch Android smartphones and we tested this application with few Huawei , Samsung and HTC devices. Audio / Visual Morse code Generator is an open source software project and its source code is available at http://github.com/dilshan/signalman . Compiled package is available to download at http://github.com/dilshan/signalman/releases . This project is distributed under the terms of MIT license . Delphi Android compiler platform is still evolving and some bug can be expecte...

ParseGen - parser generator for FPC

ParseGen is rule driven, parser generator for FPC / Lazarus . ParseGen is design using FPC, FCL and Lazarus and it mainly supports for Windows and Linux operating systems. ParserGen scanner is slight DFA (deterministic finite automaton) state machine. This scanner can operate on case sensitive or case-insensitive modes and it can easily configure/extend through given class structure. The parser of the ParseGen is recursive descent parser. ParseGen generate this parser using high-level source language and this language is logically similar to EBNF grammar. For example, in ParseGen, definition for "term" and "expression" can be written like this: define: expression   optional: "-","+"   end          term          loop: "-","+"     term   end   end define: term   factor   loop: "*","/"     factor   end   end This parser generator...

microTone Module - Simple Analog Hardware Interface

microTone Module is analog interface to connect microcontrollers or digital logic systems with PCs. This interface use PC sound card’s audio output terminal to send commands to external hardware systems. microTone Module is an open source project and all its software source codes and hardware designs are available to download at sourceforge.net/p/microtone . All the compiled software and source codes of this project are distributed under the terms of GNU Lesser General Public License . Hardware design and other documents are distributed under the terms of Creative Commons Attribution-ShareAlike 3.0 Unported License . Software library of microTone Module is a Win32 DLL and it can use with any programming language which allows interface with dynamic link libraries (e.g: C++ , C# , Python , Java , Delphi , Visual Basic , etc.) Some wrappers for this DLL are already implemented and available to download at microTone Module sourceforge.net code repository. And also if you implement or...

An open scriptable USB interface for host driven electronic experiments

SigLab is a combination of open hardware and FOSS ( free and open source software ) projects to provide easy to use and full featured scriptable USB interface for digital electronic experiments. SigLab USB interface consisted with Microchip's PIC18F2550 microcontroller unit and it provides 14 bidirectional (digital) I/O ports for external interfacing. Scriptable language of SigLab had some resemblance to Pascal programming language and this system provides complete IDE for script editing and debugging. Current version of SigLab offers following core features to its users: Provide easy to use USB controller for digital electronic projects Avoid complexities of USB peripheral programming by providing full featured, easy to use scriptable interface Introduce DIY - USB controller with standard electronic components Provide live workspace to debug/watch hardware and firmware operations All the SigLab source codes, design files and other reference documents are available to download at ...

8 Channel USB Logic Analyzer

Logic analyzers are allowing us to monitor and /or diagnose a large number of digital signals simultaneously and these devices are essential when developing complex digital systems. In this project we design simple 8 channel USB logic analyzer with Windows version of driver software. Design of this logic analyzer is based around Future Technology Devices FT245 USB FIFO chip. With the given oscillator this system takes 14MSPS (Mega samples per second) and this system is design to work as (USB) self powered device (without any external power source). Driver part of this project is based on FTD2XX driver and GUI is developed using Delphi. Current version of driver software is design to work with Windows NT operating systems and it is highly recommended to use it with 1360 × 768 or with higher video resolutions (with aspect ratio of 16:9). This design also contains real-time logic level indicators to monitor "low frequency" signal levels and construction of that portion i...

9 Pin dot matrix printer using PIC16F84A

In this project we design 9 pin Microsoft Windows NT compatible dot matrix printer using two PIC16F84A microcontrollers. Printer mechanism is based on old Commodore dot matrix printer. At the moment this device support for Microsoft Windows 2000 and XP operating systems. Other most notable features of this implementation are, Drive 18V - 9pin magnetic dot matrix head unit Handle 12V paper feeder and head movement stepper motors Support A4 and compatible page formats System drives using 240V - 18V step-down transformer Audible warning system Low power consumption due to CMOS implementation Works with Standard Printer Port In this implementation we use Microsoft Windows Driver Development Kit (DDK) with Microsoft Visual C++ to create device driver for the system and use Delphi 7 to create front end application (printer maintenance – control panel applet). Both microcontrollers are programmed using MPLAB – ASM. In this system we use 2 microcontrollers with 7MHz oscillators, One PIC16F84A ...

Is Delphi for PHP successes ?

I’m trying Delphi for PHP 2.0 in few days back and I'm get very frustrated about it because of its pour implementation and technologies. Some key failures in Delphi for PHP 2.0 are, - IDE is very buggy and most of the times it produces "Access Violation" errors and IDE get confused. (In my computer Delphi 7 tries to debug it.) - Help is very pour and incomplete. - JavaScript and PHP integration is very complex and buggy. Most of the time JavaScript codes may not work in client side and it is heavily depends on the web browser. - Some times it is necessary to deploy entire "VCL" directory to the web server otherwise some of the VCL components produces invalid outputs. (specially RichEdit and TrackBar components) - MySQL integration is pour and buggy. - Build-in Apache web server crash several times and because of that reason we may not be able to debug/run web application using IDE. - Some times XML file (xml.php) generated by Form Designer may not compatible wit...