ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING Frequency meter on the microcontroller. Encyclopedia of radio electronics and electrical engineering Encyclopedia of radio electronics and electrical engineering / Measuring technology 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. 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 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. The appearance of the programmer is shown in fig. 3. 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). 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. Latest news of science and technology, new electronics: The world's tallest astronomical observatory opened
04.05.2024 Controlling objects using air currents
04.05.2024 Purebred dogs get sick no more often than purebred dogs
03.05.2024
Other interesting news: ▪ Noise canceling headphones with heart rate measurement ▪ 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
Leave your comment on this article: All languages of this page Home page | Library | Articles | Website map | Site Reviews www.diagram.com.ua |