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

Frequency meter on the microcontroller. Encyclopedia of radio electronics and electrical engineering

Free technical library

Encyclopedia of radio electronics and electrical engineering / Measuring technology

Comments on the article Comments on the article

The principle of operation of the described device (as well as other frequency meters) is to count the pulses that have come to its input for a fixed period of time. Here are its main technical characteristics: the interval of the measured signal frequency is from 1 Hz to 50 MHz with a minimum input signal voltage of 0,5 V. The digit capacity of the indicator is 8, which allows you to measure high-frequency signals with an accuracy of 1 Hz. The supply voltage is 9 V. and the current consumption depends on the indicators used.

On fig. 1 shows a diagram of a frequency meter.

Frequency counter on the microcontroller
(click to enlarge)

In the KR1878BE1 microcontroller used, the sixteen-bit timer-counter has an eight-bit prescaler and a three-bit overflow counter, which is 27 bits in total. Thus, the counter can count up to 134. The speed of the microcontroller is limited to a frequency of 217 MHz. This value is the maximum measurable signal frequency. The second interval is counted using software-organized cycles, which also include dynamic indication of readings.

At the end of the count, the value of the measured frequency can be obtained by simply polling the registers only from a sixteen-bit timer-counter and a three-digit overflow counter. Data in an eight-bit prescaler. extracted by counting. Single pulses and are fed to the input of the prescaler. when its overflow is fixed (zeros in all digits), the value written in it is calculated, equal to 256 minus the number of pulses applied. After that, the binary number is converted to BCD, and then to the seven-element indicator code. Insignificant zeros are extinguished in it and displayed on the scoreboard at the next measurement.

The device uses three three-digit high-brightness LED indicators from AON. In their absence, you can use any other LED indicators for the required number of digits, for example, the ALC318 series. Anodes of indicators through current-limiting resistors R8-R15 are connected to port B of the microcontroller. The cathodes are connected to the outputs of the decoder DD3 K555ID10, the output current of which is in the log state. 0 can reach 24 mA. The indication goes from right to left, i.e. the first digit is the right one according to the scheme. The ninth digit is not connected, however, if necessary, it can be used to display any service information.

To improve stability, the reference frequency generator is made on DDI elements. 1-DD1.3. powered by a separate stabilizer DA1. The software method of counting the measurement time allows the use of quartz resonators at any frequency. You only need to change the program cycles, and this is very simple, since all instructions in the microcontroller are executed in two cycles. The upper value of the reference frequency is 8 MHz, the lower value is determined by the fact that the output signal of the prescaler is synchronized by the processor clock signal and cannot exceed 1/4...1/12 of its value, depending on the processor type. Unfortunately, these parameters are not specified in the documentation for the microcontroller. In a similar Microchip controller, the duration of the input signal should not be less than four processor cycles. Given an eight-bit asynchronous prescaler, let's determine the minimum reference frequency: 50X000/4 = 256 kHz.

The frequency meter is assembled on a breadboard measuring 30x72 mm. Connections are made by surface mounting with MGTF wire.

A properly assembled frequency meter after switching on should show the number 87654321 on the display and then go into counting mode, indicating zero in the first digit in the absence of an input signal. If there is no indication, you should check for the presence of a reference frequency signal. Then you need to make sure that a scanning code is being fed to the decoder inputs. Input 8 of the DD3 chip must be connected to a common wire, otherwise its outputs will be closed. In addition, you can try to perform an external reset by temporarily shorting the terminals of the capacitor C3.

To check, you can apply a signal from the reference frequency generator to the input of the microcontroller by connecting the output of the element DD1.3 to the input DD1.4. Its frequency will be displayed on the indicator, in our case - 4 MHz. Calibrate the frequency meter using an external generator.

You cannot apply the measured signal directly to the timer pin of the microcontroller (PA4 / TCLC), since the counting signal is applied to this pin. To prevent overload and possible damage to the device elements, a current-limiting resistor R6 is included.

The program that controls the microcontroller is very simple, it is easy to upgrade or add new functions. Program codes are given in the table (zeros are written in cells from address 0000 to 01FF).

Full author's version of the program

Frequency counter on the microcontroller
(click to enlarge)

Description of the KR1878BE1 microcontroller - on the Internet on the manufacturer's website angstrem.ru. Unfortunately, the documentation contains errors in the pinout of the microcontroller and the description of the TESSA compiler. Instead of commands etc. ctz. ctn. ctie must be clc, elz, cln. die. When programming the microcontroller, you should enable the internal generator mode at a frequency of 500 to 8000 kHz.

Scheme of a simple programmer for KR1878BE1. connected to the parallel port of the computer is shown in fig. 2. It is assembled on a 42x52mm breadboard. All connections are made with MGTF wire.

Frequency counter on the microcontroller

The appearance of the programmer is shown in fig. 3.

Frequency counter on the microcontroller

On fig. Figure 4 shows the digital scale layout for a KB receiver or transceiver. Structurally, the scale, like the frequency meter. assembled on two boards connected by a connector: the LCD board and the main board, on which all other parts are located (the board is shown separately in the photo).

Frequency counter on the microcontroller

Schematically, the digital scale differs from the frequency meter by the presence of an LCD instead of an LED indicator and the absence of the K555ID10 chip that has become unnecessary, which acts as a buffer in the frequency meter.

Author: D. Bogomolov, Moscow

See other articles Section Measuring technology.

Read and write useful comments on this article.

<< Back

Latest news of science and technology, new electronics:

The world's tallest astronomical observatory opened 04.05.2024

Exploring space and its mysteries is a task that attracts the attention of astronomers from all over the world. In the fresh air of the high mountains, far from city light pollution, the stars and planets reveal their secrets with greater clarity. A new page is opening in the history of astronomy with the opening of the world's highest astronomical observatory - the Atacama Observatory of the University of Tokyo. The Atacama Observatory, located at an altitude of 5640 meters above sea level, opens up new opportunities for astronomers in the study of space. This site has become the highest location for a ground-based telescope, providing researchers with a unique tool for studying infrared waves in the Universe. Although the high altitude location provides clearer skies and less interference from the atmosphere, building an observatory on a high mountain poses enormous difficulties and challenges. However, despite the difficulties, the new observatory opens up broad research prospects for astronomers. ... >>

Controlling objects using air currents 04.05.2024

The development of robotics continues to open up new prospects for us in the field of automation and control of various objects. Recently, Finnish scientists presented an innovative approach to controlling humanoid robots using air currents. This method promises to revolutionize the way objects are manipulated and open new horizons in the field of robotics. The idea of ​​controlling objects using air currents is not new, but until recently, implementing such concepts remained a challenge. Finnish researchers have developed an innovative method that allows robots to manipulate objects using special air jets as "air fingers". The air flow control algorithm, developed by a team of specialists, is based on a thorough study of the movement of objects in the air flow. The air jet control system, carried out using special motors, allows you to direct objects without resorting to physical ... >>

Purebred dogs get sick no more often than purebred dogs 03.05.2024

Caring for the health of our pets is an important aspect of the life of every dog ​​owner. However, there is a common assumption that purebred dogs are more susceptible to diseases compared to mixed dogs. New research led by researchers at the Texas School of Veterinary Medicine and Biomedical Sciences brings new perspective to this question. A study conducted by the Dog Aging Project (DAP) of more than 27 companion dogs found that purebred and mixed dogs were generally equally likely to experience various diseases. Although some breeds may be more susceptible to certain diseases, the overall diagnosis rate is virtually the same between both groups. The Dog Aging Project's chief veterinarian, Dr. Keith Creevy, notes that there are several well-known diseases that are more common in certain breeds of dogs, which supports the notion that purebred dogs are more susceptible to disease. ... >>

Random news from the Archive

Solid State Drives SSDNow KC380 from Kingston Technology 20.06.2013

The start of sales of SSDNow KC380 solid-state drives was announced by Kingston Technology, a company specializing in the production of data storage devices. The Kingston SSDNow KC380 solid state drive is designed in 1,8-inch form factor, so it is well suited for installation in laptops, tablets and netbooks with a reduced storage bay. The novelty weighs less than hard drives, surpassing them in reliability and speed.

The SSDNow KC380 uses the SandForce SF2241 controller. To connect to the host, use the SATA 6 Gb / s interface. According to the manufacturer, the sequential read speed reaches 550 MB / s, sequential write - 520 MB / s.

The series includes models with a capacity of 60 and 120 GB. The maximum performance in 4 KB read mode is 86000 IOPS. The maximum performance in the write mode in blocks of 4 KB depends on the volume and is 79000 IOPS for the younger model, 48000 IOPS for the older one. In the case of random access in blocks of 4 KB, the performance on read operations is 14000 and 17000 IOPS, and on write operations - 77000 and 45000 IOPS for SSDs of 60 and 120 GB, respectively.

The manufacturer estimates the drive resource at 46,5 TB and 93 TB (the total amount of information that can be recorded over the entire service life). The warranty period is three years. With dimensions of 78,5 x 54 x 5 mm, the devices weigh 27,43 g.

Other interesting news:

▪ Noise canceling headphones with heart rate measurement

▪ Intercity travel by car

▪ Garlic makes men more attractive

▪ Tourism helps treat dementia

▪ Apple TV

News feed of science and technology, new electronics

 

Interesting materials of the Free Technical Library:

▪ section of the site Microcontrollers. Article selection

▪ article Seven cities compete for honor. Popular expression

▪ article Which artist was the most prolific? Detailed answer

▪ article Catamaran on mattresses. Personal transport

▪ article This complicated Ohm's law. Encyclopedia of radio electronics and electrical engineering

▪ article Switchgears and substations with voltages above 1 kV. Pneumatic economy. Encyclopedia of radio electronics and electrical engineering

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