-
It's as simple as letting the 8 LEDs controlled by the P1 port flash back and forth three times in sequence.
First flash three times, then flash three times, ·· Flash three times to return to the start loop.
I'll give you a brief note, and the rest will be the same.
start0: clr start0 entry clear Lights up the first light, lcall delay and calls the delay program.
setb set, turn off the first light.
lcall delay calls the delayer.
inc r0 r0 plus one (preceded by initialization r0 to 0 mov r0, 0 clear memory cells).
cjne r0, 3h, start0 conditional conversion statement: if the value of r0 is not equal to 3, the program will jump to start0 and repeat the program, if it is equal, then go down...
-
org 0000h program execution start address.
ljmp main jumps to main
org 4000h interrupts program entry.
main: mov r0, 0 clear memory cells.
start0:clr ;Turn the first light off (or on).
lcall delay;Delay a bit.
setb ;Turn the first light on (or off).
lcall delay;Delay a bit.
inc r0;register r0 plus 1;
cjne r0, 3h, start0 Determine whether the value in r0 is equal to 3, and jump back to start0 if you don't wait, that is, repeat the above action, turn the light off and on again, so that the light has a flashing effect, which is equal to 3
Downwards, i.e., the first light flashes 3 times and then the second light flashes 3 times, and then down.
start1:
clrlcall delay
setblcall delay
inc r0
cjne r0,#6h, start1
start2:
clrlcall delay
setblcall delay
inc r0
cjne r0,#9h ,start2
start3:
clrlcall delay
setblcall delay
inc r0
cjne r0,#0ch, start3
start4:
clrlcall delay
setblcall delay
inc r0
cjne r0,#0fh, start4
start5:
clrlcall delay
setblcall delay
inc r0
cjne r0,#12h, start5
start6:
clrlcall delay
setblcall delay
inc r0
cjne r0,#15h, start6
start7:
clrlcall delay
setblcall delay
inc r0
cjne r0,#18h, start7
sjmp main;After all eight lights have flashed, start flashing again from the first one.
delay:mov r7, 250 This is a delay program.
dl1:mov r6,#
dl2:mov r5,#
dl3:djnz r5,dl3
djnz r6,dl2
djnz r7,dl1
retend
-
Workaround:1Single-chip microcomputer is replaced with a 5V single-chip microcomputer; 2.Liquid crystal replacement for liquid crystal; 3.Raise the high level of the microcontroller pins to 5V.
Reason: Most of the programmable chips we use now (including your single-chip microcomputer and LCD driver chip) are CMOS chips. The 5V power supply LCD screen is equipped with a 5V CMOS driver chip inside to make the LCD screen display things.
CMOS devices have a specification that the voltage range of the high level, i.e., the digital signal "1", is, and the voltage range of the low level, i.e., the digital signal "0", is. Outside of these two voltage ranges, the CMOS chip will not be able to tell whether it is high or low.
Therefore, when the output of the microcontroller is low, it can be recognized by the LCD CMOS chip, and when the output is high, the pins of the microcontroller are the working voltage of the microcontroller, and the higher voltage cannot be output) This is not within the range of level recognition during CMOS, and the signal cannot be judged whether it is 0 or 1. So, the liquid crystal is not working properly.
-
LED display is widely used in information indicator, large screen display, backlight for liquid crystal display, solid lighting, etc. This paper designs a display composed of 4 16 16 dot matrix LED modules, which is controlled by a single-chip microcomputer and smoothly moves to display any plurality of text or graphic symbols, and this circuit can be cascaded and expanded to realize a display composed of any number of 16 16 dot matrix LED modules.
Control circuit design.
The control circuit is controlled by AT89C51 single-chip microcomputer, and the display screen is composed of 4 16 16 dot matrix LED modules, each 16 16 dot matrix LED module is composed of 4 8 8 dot matrix LED modules, and the user can expand and add any number of 16 16 dot matrix LED modules according to needs. 8 The structure of the 8-dot matrix LED module is shown in Figure 1, with a total of 8 rows and 8 columns, and each LED is placed at the intersection of the row line and the column line, with a total of 64 LEDs. When a column is high and a row is low, the corresponding LED is lit.
-
If it is just to show the circuit and program functions, 100 LEDs are not necessary, there are more LEDs, the power supply power requirements are also large, and the circuit device parameters should also be noted.
As for how to design the circuit? It depends on the specific needs.
Only when there is a requirement can the LED arrangement be planned and the circuit can be designed.
The device can be bought in the electronic market, and there are many on the Internet.
-
LED display controller, also known as LED asynchronous control system or LED display control card, is the core component of LED display. It is responsible for receiving the screen display information from the serial port of the computer, placing the frame memory, and generating the serial display data and scanning control timing required for the LED display in the partition drive mode.
-
One end of the LED is fixed to the positive (or negative), and the other end is connected to the MCU after the series resistor, and the MCU output is low (or high) to light up the LED;
The high level and low level here refer to the MCU connecting the interface to the MCU power supply or MCU ground through the internal circuit.
-
The so-called dynamic display is: the output display of the LED light according to the set sequence of one by one (a number with an eight-segment tube) number, because the flashing speed of the LED light is very fast, and the human eye can only recognize the change above the second gap at most. So in the eyes of people, the LED tube that keeps flashing is like a static display scattered or beating.
In the figure, the P0 port is multiplexed for segment control and bit control, and two latches 573 are selected to separate the segment control and bit control data.
Segment control: The glyph displayed by the digital tube.
Bit control: which Chongxiang digital tube display (or which digital tube to which control glyph) Note: The segment control is connected with all digital tubes.
If the bit control is fully open, the digital tube becomes a static display, and the number displayed is the same.) Bit controls are connected independently one by one.
-
This software has been modified repeatedly, we have been trying to do better, only to provide better programming methods, better products to the majority of users, so that users are satisfied is our aim. At the same time, we hope that the majority of users will provide valuable insights, and we will strive to improve.
This software has two programming methods: ** programming and graphic click programming. It is currently the most comprehensive software for programming.
When computers were introduced, only a few professionals knew how to use computers, and when the DOS operating system was introduced, although the number of users using computers increased significantly, it still could not reach every family. When the great Microsoft company's windos window desktop operating system was born, you can operate the computer with just a mouse click, since then the computer has become simple, since then the computer has entered thousands of households, users have ever remembered the windos window desktop operating system has gone through windos 98 windos me windos 2000 windos 2003 windos xp windos vista windos 7
**Programming is equivalent to DOS operating system, so that some users can learn a little, not professionals, do not need to know C language, assembly language and other programming languages can also program this controller. Since then, we have said goodbye to the era when only professionals can program, and now our third generation of graphic click programming software is born, which is enough to call it the "windos xp" of lighting controllersWelcome to experience this software, and the specific tutorials of the software can also be logged in to the company's **** center**.
The above controllers have quality assurance, non-professionals do not carry out technical modifications to the controller, and do not disassemble and assemble the company's products, otherwise the company will not assume any responsibility for all the consequences. If you encounter technical problems with this control board, you can contact our technical staff in time, and we will help you solve the problem as soon as possible.
-Detian Technology.
Single-chip microcomputer is a kind of integrated circuit chip, which is a small and perfect microcomputer system composed of a small and perfect microcomputer system composed of a silicon wafer composed of ultra-large-scale integrated circuit technology, which integrates the best processor CPU RAM, read-only memory ROM, a variety of IO ports and interrupt systems, timers and other functions (may also include display drive circuits, pulse width modulation circuits, analog multiplexers, AD converters and other circuits) into a silicon wafer, which is widely used in the field of industrial control. From the 80s of the last century, from the 4-bit and 8-bit single-chip microcomputers at that time, to the current 32-bit 300m high-speed single-chip microcomputer.
It should be that the bias resistor selection is not suitable.
This is normal, because the light on and off is driven by the low level of the single-chip microcomputer (as you can see from your program), and the high-low level load capacity given by the single-chip microcomputer is not very strong, that is to say, although it reaches the voltage, but the current is relatively small, and we write the same situation when we write programs. No problem, don't worry.
Ignoring the influence of temperature and other factors, the method of measuring voltage by series resistance can be directly adopted. >>>More
Just learn 51 first, the absolute entry-level, you can choose Guo Tianxiang's for the development board, it's been many years, the information is very complete, and then you can look at 32 or something.