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

Running line on the microcontroller. Encyclopedia of radio electronics and electrical engineering

Free technical library

Encyclopedia of radio electronics and electrical engineering / Microcontrollers

Comments on the article Comments on the article

The proposed design of the "creeping line" can serve for advertising, information, entertainment and other purposes. When developing the design, one of the tasks was maximum versatility: the ability to use a scoreboard with a different number of segments, as well as getting rid of a standard character generator (character generator). And to enable the user directly, without changing the program and changing the controller, to create (draw) images thanks to a convenient interface - a computer PS / 2 mouse.

Features

Supply voltage, volt: 5
LED matrix volume (length/height): 64x8
Minimum volume of LED matrix: 23x5
Graphic EEPROM size, bytes 2048

Principled controller block diagram (Fig. 1). The quartz resonator ZQ1 is connected to the built-in clock generator of the controller DD1. The MCLR reset input (pin 1) is connected directly to +5V, a stable reset provides an activated built-in reset timer when the controller is powered on. Control buttons SA1-SA2 are connected to port_B of the controller and loaded with built-in "pull-up" resistors. The mouse is connected to the device via a PS/2 (MiniDIN-6) connector and is serviced by the controller's control program. To the pins of port_C PC3 and PC4 connected EEPROM graphics DD2 with serial exchange on the interface I2C by means of the MSSP module built into the controller, and operates at an increased CLOCK (1 MHz) frequency.

Running line on the microcontroller. Controller block diagram
Rice. 1. Diagram of the controller block (click to enlarge)

Principled diagram of the indicator block. On fig. 2 shows the control scheme of the LED matrix using decoders. The use of K555ID10 decoders is good because they have powerful open-collector outputs. It is possible to use other decoders, for example, K155ID3, K555ID4, ID7, which, however, have a lower load capacity at the outputs. To reduce the number of in-line decoders, which is especially important with a large matrix length, matrix row multiplexers are used, made on DD1, DD2 bus driver chips. Thus, increasing the number of lines by 2 times justifies itself by reducing the number of ordinary decoders by the same amount.

Running line on the microcontroller. Schematic diagram of the indicator block
Rice. 2. Schematic diagram of the indicator unit

The RES signal, which is set to 1 at the beginning of the sweep, resets the DD3 counter and connects the first row of the matrix through the DD5 decoder. Next, the RES signal goes to level 0 and, by means of a signal drop CLK, the counter DD1 is increased by 3 and the next row of the matrix is ​​connected through the decoder DD5. On fig. 3. shows the control scheme of the LED matrix using shift registers.

This circuit is simpler, but the outputs of the shift registers are less powerful, and if you need to get more brightness of the LEDs, each output must be supplemented with a transistor switch. A buffer amplifier is made on the DD1 chip. The KR1533IR24 registers are convenient in that they have a separate carry output from the high order and are widely used. When using K555IR8 registers or especially convenient 24-bit KR1533IR31 registers and combining them (if the matrix LEDs are connected directly to their outputs), then the last transfer bit must be connected to the LEDs only through a transistor switch, because loaded on a number of LEDs, the output will not be able to provide the necessary logic levels.

Running line on the microcontroller. Scheme for driving an LED matrix using shift registers
Rice. 3. LED matrix control circuit using shift registers

At the beginning of the image sweep, the DAT signal goes to level 0 and, using the edge of the CLK signal, 0 is written to the first bit of the shift register. Further, the DAT signal goes to level 1 and, using the clock signal CLK, a sequential shift of 0 into the next bit of the register occurs, thus switching the corresponding row of the matrix. If it is necessary to use an LED matrix with a "common anode" (i.e., a number of LEDs are combined by anodes), then instead of the DAT signal, an inverse RES signal must be applied to the input of the first register, and a sequential shift of level 1 will occur at the outputs of the registers. Buffer amplifier DD1 then needs to be replaced with K555AP3 which inverts the output signals, while pin 19 must be connected to ground.

Construction and details. Controller DD1 PIC16F877 4 MHz in a DIP package, it is also possible to use the PIC16F874 controller, which differs from F877 in a smaller amount of memory that is not used by the program. It is possible to replace the DD2 EEPROM with 24C01/02/04/08/ having 128/256/512/1024 bytes, respectively, the missing memory sizes will be read as units. Microcircuits of the K555 series can be replaced with similar ones from the KR1533 or K155 series. The scoreboard was made on ALS362B LED indicators (4 rectangular LEDs) according to the scheme with decoders and line switching. Structurally, the scoreboard can be made on a board made of foil fiberglass, with drilled holes for the LED leads and cut out the longitudinal tracks of the rows with a cutter, solder the rows with a mounting wire. At the bottom of the board, cut out contact pads for control microcircuits. The display unit is connected by a cable to the controller board.

Management

В editor mode (switch SA4 open) moving the mouse over the coordinates changes the corresponding position of the cursor (luminous LED if the image element behind it is off and not luminous if vice versa). pressing on the left button mouse leads to the removal/appearance, respectively, of the luminous/non-luminous selected image element. pressing to the right the mouse button only deletes the selected item. pressing to the middle the mouse button only turns on the selected image element. Having reached, by moving the cursor along the X coordinate, one of the edges of the indicator, its further movement will cause the image to "scroll" in the corresponding direction. The following functions are also available in the "Editor" mode: Closing the contacts of switch SA4 will put the device directly into running line mode. Service options such as: the beginning of the ticker, the end, the speed, and also, if necessary, the place of the temporary stop are determined by the parameters in "Settings" mode. "Settings" mode accessible from the "Editor" mode by pressing to the SA1 button. Note. The minimum size of the LED matrix is ​​23x5 due to the fact that in this mode, with a smaller number of LEDs, it will be impossible to see the numbers on the display, in principle, the dimensions of the matrix are not limited. As a result, two numbers will appear on the display: the number on the left means the parameter number, the number on the right is its value. The parameter functions are shown in the following table:

Parameter No. Range of values Function
0 0-2047 Determines where the scroll starts in the "marquee"
1 0-2047 Specifies the end of the scroll in the "marquee"
2 0-2047 Determines the place of temporary stop of the "marquee"
3 0-255 Determines the duration of the temporary stop of the "creeping line". A value of 1 excludes a stop.
4 0-2047 Determines the sweep frequency of the "Crawling Line" and, accordingly, its speed.
5 0-255 Specifies the physical length of the device's LED matrix
6 0-2047 Determines the sweep frequency in all modes except "Crawling Line"
7 0-255 Specifies the duration of the delay during writing to the EEPROM

In this mode, the mouse performs the following functions: moving along the X coordinate will change the number of the edited parameter. By pressing and holding left button mouse and moving it along the X coordinate will change the value of the selected parameter. Clicking on right button mouse will exit to editor mode. To define numerical values ​​for functions such as start/end/break point, the menu that appears when you press and hold the SA3 button in the "Editor" mode. A number will appear on the display indicating the position of the cursor along the X coordinate in the memory field (0-2047). Also being in this mode (i.e. holding the SA3 button) short press on SA4 button will clear that page of memory (256 bytes) in which the cursor was currently located. After checking the changes made to the parameters, if necessary, you can save them as start ones when the device is turned on for a short time. by pressing SA3, the values ​​will be written to the non-volatile data memory of the controller.

When first turned on

  1. Enter the "Settings" mode by pressing the SA1 button, selecting parameter No. 5, set the value equal to the length of the matrix
  2. In parameter No. 6, set the value corresponding to the optimal flicker frequency
  3. Clear the required amount of EEPROM memory (see above)
  4. By selecting the value of parameter No. 7 (aiming for the smallest value), eliminate the "blurring" of the image to the right of the cursor on the display after pressing one of the mouse buttons in the "Editor" mode. This parameter depends on the speed of the EEPROM
  5. Write the changes to the non-volatile data memory of the controller.

Notes

1. If the SA4 switch is closed when the power is turned on, the mouse will not be initialized (it may be absent) and will not work when you exit the "Editor" mode.

2. If there is no mouse and the power is turned on, the device will not work until the mouse is connected.

3. Disconnecting the mouse when the device is turned on and then connecting it will lead to its software non-functioning (it is necessary to re-initialize it when the power is turned on).

Publication: cxem.net

See other articles Section Microcontrollers.

Read and write useful comments on this article.

<< Back

Latest news of science and technology, new electronics:

Air trap for insects 01.05.2024

Agriculture is one of the key sectors of the economy, and pest control is an integral part of this process. A team of scientists from the Indian Council of Agricultural Research-Central Potato Research Institute (ICAR-CPRI), Shimla, has come up with an innovative solution to this problem - a wind-powered insect air trap. This device addresses the shortcomings of traditional pest control methods by providing real-time insect population data. The trap is powered entirely by wind energy, making it an environmentally friendly solution that requires no power. Its unique design allows monitoring of both harmful and beneficial insects, providing a complete overview of the population in any agricultural area. “By assessing target pests at the right time, we can take necessary measures to control both pests and diseases,” says Kapil ... >>

The threat of space debris to the Earth's magnetic field 01.05.2024

More and more often we hear about an increase in the amount of space debris surrounding our planet. However, it is not only active satellites and spacecraft that contribute to this problem, but also debris from old missions. The growing number of satellites launched by companies like SpaceX creates not only opportunities for the development of the Internet, but also serious threats to space security. Experts are now turning their attention to the potential implications for the Earth's magnetic field. Dr. Jonathan McDowell of the Harvard-Smithsonian Center for Astrophysics emphasizes that companies are rapidly deploying satellite constellations, and the number of satellites could grow to 100 in the next decade. The rapid development of these cosmic armadas of satellites can lead to contamination of the Earth's plasma environment with dangerous debris and a threat to the stability of the magnetosphere. Metal debris from used rockets can disrupt the ionosphere and magnetosphere. Both of these systems play a key role in protecting the atmosphere and maintaining ... >>

Solidification of bulk substances 30.04.2024

There are quite a few mysteries in the world of science, and one of them is the strange behavior of bulk materials. They may behave like a solid but suddenly turn into a flowing liquid. This phenomenon has attracted the attention of many researchers, and we may finally be getting closer to solving this mystery. Imagine sand in an hourglass. It usually flows freely, but in some cases its particles begin to get stuck, turning from a liquid to a solid. This transition has important implications for many areas, from drug production to construction. Researchers from the USA have attempted to describe this phenomenon and come closer to understanding it. In the study, the scientists conducted simulations in the laboratory using data from bags of polystyrene beads. They found that the vibrations within these sets had specific frequencies, meaning that only certain types of vibrations could travel through the material. Received ... >>

Random news from the Archive

Happiness can be learned 02.04.2021

Italian scientists from the University of Trento conducted an interesting experiment, the purpose of which was to prove that any person, without exception, can learn happiness.

Specialists have developed a special intensive course, after which a person's level of anxiety, stress, anxiety decreases, and life satisfaction increases.

Volunteers took part in the experiment, who had to attend courses for 9 months at the Institute of Tibetan Culture. Tsongkhapa, located in the Tuscan region.

All this time, various presentations were read to them, video recordings of courses were included, the subjects took part in discussions about neurobiology and psychology. In addition, they conducted meditation practices and attended theoretical lessons in philosophy.

The scientists paid particular attention to the brain activity and response of the volunteers. They studied its neuroplasticity, the physiology of anxiety and stress, pleasure and pain, negative and positive emotions, empathy, addictions, and human desires. As the course progressed, scientists noted that people began to improve psychological indicators.

As a result, it was possible to determine the connection between happiness and the development of internal balance, understanding of the human mind, a benevolent attitude both to the world and to oneself. He was inspired by the idea of ​​Eastern philosophical traditions for such an interesting experiment.

Other interesting news:

▪ Transpacific submarine cable Faster

▪ Pumping water into the ocean

▪ New Mini Cooper EV 2024

▪ Smartphone Moto X Developer Edition for developers

▪ Elastic Stopwatch

News feed of science and technology, new electronics

 

Interesting materials of the Free Technical Library:

▪ site section Field strength detectors. Article selection

▪ article Nothing new under the sun. Popular expression

▪ article Why different countries do not have the same money? Detailed answer

▪ article Safety requirements for extracurricular and extracurricular activities

▪ article PWM speed controllers for low-power electric motors. Encyclopedia of radio electronics and electrical engineering

▪ article Map disappears and is located. 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