AuthorIo. D

Convert Motorola-S file to bytes array in C# (limited to S3 record)

Motorola S-record is a file format, created by Motorola, that conveys binary information in ASCII hex text form. This file format may also be known as SRECORD, SREC, S19, S28, S37. It is(was) commonly used for programming flash memory in microcontrollers, EPROMs, EEPROMs, and other types of programmable logic devices. In a typical application, a compiler or assembler converts a program’s...

C# Sending an e-mail

This is something that may sound simple but looking around the internet you will find several solutions that … most of them are NOT working at all. For that reason, I decided to post the following solution which is working perfectly with Outlook and it is also tested with Gmail. (And of course, have a personal backup of this piece of code a.k.a snippet). (Just for those who will try to use...

C# Extension methods for everyday usage

Following up a previous post:  , in this post there will be listed some quite useful and commonly used extension methods for simple operations. (Basically, I do not currently maintain the NuGet package -lack-of-time-) I have various extension methods in my CommonLib file, however, in this post, I will only enumerate some of them. “Extension methods enable you to add...

C# CRC16 Algorithm

Below you will find the CRC16 algorithm that you can use in your software. “A cyclic redundancy check (CRC) is an error-detecting code commonly used in digital networks and storage devices to detect accidental changes to raw data. Blocks of data entering these systems get a short check value attached, based on the remainder of a polynomial division of their contents. On retrieval, the...

C# Flexible API for PEAK-CAN USB (PCANBasic)

There are several USB-to-CAN devices, however for developers usually there is limited support (at least free) and when you have to do things quick could lead to unexpected problems. For that reason, and due to the fact that nowadays several devices are using CANBuses below is a quick-n-dirty way to interface your PC application to a CANbus. In this post, you will find a simple yet effective way...

STM32 video player over network

This example presents a simple video streaming(PC) and video player(STM32F746 board). The video streaming solution is designed to be flexible with a simple “threading” architecture that allows customization. Due to the image processing limitations (missing JPEG decoder) of the STM32F746) which acts as a client, the server (linux PC) is responsible to decode the selected media files and transmit...

I2C Bitbanging for Embeded Systems

Interacting with I2C devices is usually done with a microcontroller and an I2C library, but sometimes either the microcontroller is not supporting I2C or you have some other restrictions which do not allow you to use the provided I2C library. For that reason you can always Bitbang the I2C protocol a.k.a emulate the behavior of this protocol by manually toggling the pins. The following example is...

Poweroff Timer application in Microsoft Store

Poweroff Timer is a windows universal application(UWP) in Microsoft Store written in C#. This application enables you to set a timer to shutdown your PC at a specific time. It makes your power management much easier and more convenient. When you assign the timer, PowerOff Timer will minimize in the system tray and run silently in the background. if you right-click on its icon, the menu that...

How to add Hotkeys/Shortcuts in WPF

In any application, hotkeys (shortcuts) are useful for navigation as well as to launch a control’s code, unfortunatelly Hotkeys in WPF are not as easy as in Windows Forms. In this post we will briefly present an example of how keyboard shortcuts can be used to execute commands using key bindings. What you will need is to create a new WPF window and follow the instructions below. Step 1: In...

Disclaimer: The present content may not be used for training artificial intelligence or machine learning algorithms. All other uses, including search, entertainment, and commercial use, are permitted.

Categories

Tags