Controlling a
16 channel RS485 Modbus relay board is discussed in this post.
The board needs to be powered with a 12V power supply.
It has has a DIP switch to set its ID. If only the switch 1 is on and others are off, its ID will be 1.
To communicate the board from a PC, a USB to RS485 converter can be used. The setup is illustrated in the following figure.
Alternatively, you can use a USB UART adapter together with a UART to RS485 converter.
Wire connection for this setup is shown below.
Unlike conventional RS485 devices, these devices do not have the control line for transmit or receive.
They use autoflow control as shown below.
Tuesday, October 5, 2021
Friday, September 17, 2021
V4L2 Capturing as Bitmap Image
V4L2 (Video for Linux 2) consists of drivers and API for video capturing on Linux
[1].
In this article, we will discuss about using the library and analysis of video capture example.
There are utilities for controlling media devices on Linux called v4l-utils
[2].
We will explore about using and testing webcam with them also.
Wednesday, July 7, 2021
K82 USB CDC Virtual Comm
In this article, we will discuss about using K82 as a USB CDC virtual com device.
Setting up environment for K82 development is discussed in previous article at the following link.
http://cool-emerald.blogspot.com/2020/01/getting-started-with-frdm-k82f.html
http://cool-emerald.blogspot.com/2020/01/getting-started-with-frdm-k82f.html
Monday, July 5, 2021
Software timers and Ring Buffered UART Com for Kinetis K82 MCU
In this article, I would like discuss about using
Kinetis K82 MCU with MCUXpresso IDE.
I will use
FRDM-K82F development board as a hardware platform.
Setting up environment for K82 development is discussed in previous article at the following link.
http://cool-emerald.blogspot.com/2020/01/getting-started-with-frdm-k82f.html
http://cool-emerald.blogspot.com/2020/01/getting-started-with-frdm-k82f.html
Wednesday, April 7, 2021
DrawBot XY Plotter with Arduino GRBL Controller
In this article, I would like to discuss about using DIY XY plotters which are also called draw bots.
You can buy them at online stores such as LYCNC store
or Global Tech. Factory Store on Aliexpress.
Friday, October 16, 2020
Wednesday, April 15, 2020
Cross Compiling C++ Programs for Raspberry Pi that Uses Static or Shared Libraries Such as OpenCV and wxWidgets
In this article, cross compiling C++ programs for Raspberry Pi on Ubuntu Linux system is discussed.
We use "schroot" to avoid messing the main system and to get clean build environment.
Sunday, April 5, 2020
Using Orange Pi
Orange Pi is a cheap alternative to Raspberry.
They can be bought at their online store Shenzhen Xunlong at Aliexpress.
There are many Orange Pi models.
For example, Orange Pi One costs only ~USD 10.
Another model called Orange Pi PC Plus even has 8 GB eMMC onboard and costs ~USD 25 only.
Saturday, March 28, 2020
Tesseract OCR with C++, OpenCV, and wxWidgets
Tesseract is a free optical character recognition software and
it is considered one of the most accurate open-source OCR engines
[1].
Getting Started with FRDM-K64F
To use FRDM-K64F with the latest MCUXpresso IDE, you need to update the firmware
for its debugger.
It is similar to FRDM-K82F where the details can be seen at the following post.
http://cool-emerald.blogspot.com/2020/01/getting-started-with-frdm-k82f.html
There are only a few minor difference between FRDM-K64F and FRDM-K82F to get started. Therefore, I will only list some major points here.
Original OpenSDA appears as MBED drive. And it is not working with MCUXpresso. To update the firmware for its debugger,
http://cool-emerald.blogspot.com/2020/01/getting-started-with-frdm-k82f.html
There are only a few minor difference between FRDM-K64F and FRDM-K82F to get started. Therefore, I will only list some major points here.
Original OpenSDA appears as MBED drive. And it is not working with MCUXpresso. To update the firmware for its debugger,
- Disable 'Windows storage services' ( https://os.mbed.com/blog/entry/DAPLink-bootloader-update/)
- Hold reset button and connect the device to a USB port. It should now appear as a drive called BOOTLOADER
- Drag and drop bootloader ‘0244_k20dx_bootloader_update_0x5000.bin’ into the drive.
- Remove and reconnect without holding reset. Board shows as ‘MAINTANCE’.
- Drag and drop Segger jLink OpenSDA for board specific firmware for K64F (‘02_OpenSDA_FRDM-K64F.bin’) which is available at https://www.segger.com/downloads/jlink#JLinkOpenSDABoardSpecificFirmwares
- Remove and reconnect without holding reset button. It now appears as ‘FRDM-K64FJ’
- To use JLink , open cmd and enter
> cd "C:\Program Files (x86)\SEGGER\JLink" > JLink.exe -speed auto -device 'MK64FN1M0xxx12' -if SWD
- At the JLink prompt
J-Link> r J-Link> erase J-Link> q
- After that, it should be OK to use MCUXpresso
Subscribe to:
Posts (Atom)





