Menu English Ukrainian russian Home

Free technical library for hobbyists and professionals Free technical library


ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING
Free library / Schemes of radio-electronic and electrical devices

USB module Ke-USB24A. Encyclopedia of radio electronics and electrical engineering

Free technical library

Encyclopedia of radio electronics and electrical engineering / Computers

Comments on the article Comments on the article

In this article, I would like to introduce you to the Ke-USB24A USB module from KERNELCHIP (kernelchip.ru). What is it and why is it needed?

Surely, those who are engaged in the development and operation of interface devices with a computer are well aware of both LPT and COM ports - of course, because until recently they were the main means of communication between an external circuit and a computer. However, at the present time, these ports are gradually disappearing from the motherboards of modern computers. There is a question about the transition to the USB bus. In addition to a bunch of advantages, using this bus requires much more effort than, for example, a regular COM port. Now you need to program the USB microcontroller, develop a USB driver, and significantly complicate the software. Even using a HID device is not always convenient - a rather cumbersome procedure for working with the device on the PC side is required. Examples for working with it are widespread for the C++ language. But what if we want to use, for example, Java?

If we are faced with the task of controlling external devices, for example, keys, relays, etc. via the USB bus, an interesting move would be to use the Ke-USB24A module. It is designed to interface external digital and analog devices, sensors and actuators with a computer via the USB bus. The module has 24 input/output lines with the ability to independently set the direction of data transfer.

USB module Ke-USB24A

One of the most interesting features of this module is that when it is connected to a computer, it is defined by the operating system as an additional COM port! Those. if you install drivers for the module (ready-made and available for download on the developer's website), then a new COM port will appear in the device manager in the serial ports section. It is through it that we will communicate with the module.

USB module Ke-USB24A

This means that from a software point of view, the exchange of information between the module and the computer is carried out through the interface of a conventional serial port. The latter circumstance greatly simplifies programming, since there is no need to use additional dynamic libraries, complex interfaces and direct communication with the driver. To write your own control programs for the module, you can use any programming language/environment that supports the ability to work with COM ports. You can use C++, Delphi, VisualBasic, Java, and even Excel's built-in VBA!

Also, a 10-bit analog-to-digital converter (ADC) with a sampling frequency of up to 400 Hz is already integrated inside the module. Also, the module has the ability to save the settings for the directions of input / output lines, allows you to save user data in its memory. The module also allows you to change your USB device string descriptor. This is the text that appears in Windows when a new USB device is connected. You have the ability to set and save your own text that will appear when you connect the module to your computer.

How is the module managed? The solution is also very interesting - text commands are used, similar to those used in modem control. For example, to set a high voltage level (+5 V) on the input/output line number 14, you need to write a command of the form to the COM port associated with the module $KE,WR,14,1to apply a logical zero - $KE,WR,14,0 etc. For further acquaintance with the module, I recommend downloading the description of the Ke-USB24A control commands (kernelchip.ru/Ke-USB24A.php).

Let's take a closer look at the conclusions of the module. The purpose and layout of their location are shown in the figure and in the table below.

USB module Ke-USB24A. Module pins
Pin number designation Output Description
1, 32 + 5 V If the JM1 jumper is installed, the output is set to +5 V from the USB bus (the module is powered from the USB bus). If the jumper is not installed, this pin must be supplied with +5 V voltage from an external source to power the Ke-USB24A module (the module is physically disconnected from the USB power bus).
2 Vadc Analog input ADC
3 I / O1 I/O line 1
4 I / O2 I/O line 2
5 I / O3 I/O line 3
6 I / O4 I/O line 4
7 I / O5 I/O line 5
8 I / O6 I/O line 6
9 I / O7 I/O line 7
10 I / O8 I/O line 8
11 I / O9 I/O line 9
12 I / O10 I/O line 10
13,14,15 NC Pin is not used (Not Connected)
16, 17 GND Lands
18 I / O11 I/O line 11
19 I / O12 I/O line 12
20 I / O13 I/O line 13
21 I / O14 I/O line 14
22 I / O15 I/O line 15
23 I / O16 I/O line 16
24 I / O17 I/O line 17
25 I / O18 I/O line 18
26 I / O19 I/O line 19
27 I / O20 I/O line 20
28 I / O21 I/O line 21
29 I / O22 I/O line 22
30 I / O23 I/O line 23
31 I / O24 I/O line 24

Now let's move on to the practical use of the module. Let's assemble a module-based circuit to control external loads via the USB bus, for example, let's control the LEDs connected to the I / O lines. The recommended scheme from the manufacturer is presented below. The circuit is extremely simple - LEDs are simply connected to the I / O lines. All LEDs are planted on a common wire of the circuit - for example, terminal 16 of the module. Please note that if you want to drive more powerful loads, such as light bulbs, relays or motors, you need to take care of the buffer circuit, because. Ke-USB24A will not withstand such a load and will burn out. LEDs can be connected quite easily.

USB module Ke-USB24A. Module-Based Schema Example

We figured out the circuitry - it's time to move on to the software. We need a program that could transmit data through the COM port. There are several options here - you can use a ready-made program, for example, HyperTerminal, which is part of any Windows OS. You can use a special terminal program KeTerm recommended by the developer (source codes are available for it in C++, Microsoft Visual C++ 6.0 development environment). You can download it from the Kernelchip website. And finally, the most interesting option is to write your own program. This is quite simple, because we only need knowledge of COM port programming - we don’t even need to remember about USB programming.

Let's start with HyperTerminal. it is in any version of Windows and is always at hand. To launch it, select Start -> Programs -> Accessories -> Communications -> HyperTerminal. The wizard for creating a new connection will immediately launch, prompting you to specify a name for the connection. Specify any name, click "OK". The next step is to select the COM port through which you want to establish a connection. In the list, select the port number that was allocated by Windows for the module (you can see it in the device manager). Click OK. Next, the wizard will offer to change the port settings. Here it is necessary to make an important remark - such parameters as speed, number of data bits, parity bits and other settings do not have any meaning for the module, because. in fact, the data is transferred over the USB bus. You can safely leave all the default settings. Click OK". So, the connection is established. Next, it is strongly recommended to change some settings in the program for ease of use. In the main program panel, click on the "Properties" button. In the window that opens, go to the "Settings" tab and click on the "ASCII Options... ". Check the boxes as in the picture below. Pay attention to the first box. The command syntax of the module requires that all commands end with a carriage return and a newline character. Click "OK".

USB module Ke-USB24A. HyperTerminal Program

All settings are done. You can get to work. First, let's send the module the simplest $KE command - the check command. Type the text $KE and press Enter. In response, we get the string #OK - this means that the module is working and ready to work.

USB module Ke-USB24A. HyperTerminal

Well, then it's a matter of technology - we use the $KE,WR command with the desired line number and the required value for recording. We send different commands - blink LEDs.

With this, I would like to end this introductory article. Next, we will get acquainted with how to manage the module from programs written in C ++, Delphi and even from EXcel. Get to know other useful features of the module, such as ADC.

Go to the second part of the article: Ke-USB24A module control from Excel

Author: Dmitry Ivanov (Grirog); Publication: cxem.net

See other articles Section Computers.

Read and write useful comments on this article.

<< Back

Latest news of science and technology, new electronics:

Artificial leather for touch emulation 15.04.2024

In a modern technology world where distance is becoming increasingly commonplace, maintaining connection and a sense of closeness is important. Recent developments in artificial skin by German scientists from Saarland University represent a new era in virtual interactions. German researchers from Saarland University have developed ultra-thin films that can transmit the sensation of touch over a distance. This cutting-edge technology provides new opportunities for virtual communication, especially for those who find themselves far from their loved ones. The ultra-thin films developed by the researchers, just 50 micrometers thick, can be integrated into textiles and worn like a second skin. These films act as sensors that recognize tactile signals from mom or dad, and as actuators that transmit these movements to the baby. Parents' touch to the fabric activates sensors that react to pressure and deform the ultra-thin film. This ... >>

Petgugu Global cat litter 15.04.2024

Taking care of pets can often be a challenge, especially when it comes to keeping your home clean. A new interesting solution from the Petgugu Global startup has been presented, which will make life easier for cat owners and help them keep their home perfectly clean and tidy. Startup Petgugu Global has unveiled a unique cat toilet that can automatically flush feces, keeping your home clean and fresh. This innovative device is equipped with various smart sensors that monitor your pet's toilet activity and activate to automatically clean after use. The device connects to the sewer system and ensures efficient waste removal without the need for intervention from the owner. Additionally, the toilet has a large flushable storage capacity, making it ideal for multi-cat households. The Petgugu cat litter bowl is designed for use with water-soluble litters and offers a range of additional ... >>

The attractiveness of caring men 14.04.2024

The stereotype that women prefer "bad boys" has long been widespread. However, recent research conducted by British scientists from Monash University offers a new perspective on this issue. They looked at how women responded to men's emotional responsibility and willingness to help others. The study's findings could change our understanding of what makes men attractive to women. A study conducted by scientists from Monash University leads to new findings about men's attractiveness to women. In the experiment, women were shown photographs of men with brief stories about their behavior in various situations, including their reaction to an encounter with a homeless person. Some of the men ignored the homeless man, while others helped him, such as buying him food. A study found that men who showed empathy and kindness were more attractive to women compared to men who showed empathy and kindness. ... >>

Random news from the Archive

Professions disappearing and promising 05.08.2021

Over the next ten years, a number of currently popular specialties will lose their relevance as unnecessary or will be abolished due to technological progress. This is stated in the study Development of corporate social responsibility on the Career Hub platform.

In ten years, employers will give preference to employees who are fluent in technology, and stress resistance, high organization and mobility will become important criteria.

Skills likely to disappear before 2030:

- auditor;
- secretary;
- realtor;
- driver;
- sports commentator;
- agronomist;
- loader;
- handyman;
- accountant;
- economist;
- legal advisor;
- packer.

Specialties that will be popular by 2030:

- curator of personal memory;
- travel manager in virtual reality;
- highway controller;
- advisor on digital currencies;
- a surgeon to increase memory;
- space pilot;
- ethics manager;
- digital rehabilitation consultant;
- companion for pensioners;
- trash designer.

Other interesting news:

▪ Food for everyone

▪ Video games on the real world map

▪ Characters and musical tastes

▪ Rains come from outer space

▪ The danger of global warming for aircraft

News feed of science and technology, new electronics

 

Interesting materials of the Free Technical Library:

▪ section of the site Tools and mechanisms for agriculture. Article selection

▪ article Physiological effects of meteorological conditions on a person. Basics of safe life

▪ article Which country has several heavy metal bands specifically for children? Detailed answer

▪ Article Canarium Indian. Legends, cultivation, methods of application

▪ article Improved musical metronome. Encyclopedia of radio electronics and electrical engineering

▪ article Focus with four cards. Focus Secret

Leave your comment on this article:

Name:


Email (optional):


A comment:





All languages ​​of this page

Home page | Library | Articles | Website map | Site Reviews

www.diagram.com.ua

www.diagram.com.ua
2000-2024