Design of 16x16 LED dot matrix using single chip microcomputer (74HC154+74LS04 driver)

Publisher:工号待定Latest update time:2019-12-19 Source: 51heiKeywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The 16x16 LED dot matrix designed based on 51 single chip microcomputer uses 74HC154 and 74LS04 as the driver for the 16x16 LED dot matrix.
The simulation schematic diagram is as follows

The microcontroller source program is as follows:

#include

#define uchar unsigned char 

#define uint unsigned int

#define out1 P1

#define out0 P0

#define out2 P2


void delay(uint j)

{

        fly i=250;

        for(;j>0;j--)

        {

                while(--i);

                i=100;

        }

}


uchar code string[]=

{

                0x7F,0xFF,0x7F,0xFF,0x7F,0xFF,0x03,0xE0,0x7B,0xEF,0x7B,0xEF,0x03,0xE0,0x7B,0xEF,

                0x7B,0xEF,0x7B,0xEF,0x03,0xE0,0x7B,0xEF,0x7F,0xBF,0x7F,0xBF,0xFF,0x00,0xFF,0xFF,

        //

                0xFF,0xFF,0x03,0xF0,0xFF,0xFB,0xFF,0xFD,0xFF,0xFE,0x7F,0xFF,0x7F,0xFF,0x7F,0xDF,

                0x00,0x80,0x7F,0xFF,0x7F,0xFF,0x7F,0xFF,0x7F,0xFF,0x7F,0xFF,0x5F,0xFF,0xBF,0xFF,

        //

                0xF7,0xFB,0xF7,0xFB,0xF7,0xFB,0x40,0x80,0xF7,0xFB,0xD7,0xFB,0x67,0xC0,0x73,0xEF,

                0x74,0xEE,0xF7,0xF6,0xF7,0xF9,0xF7,0xF9,0xF7,0xF6,0x77,0x8F,0x95,0xDF,0xFB,0xFF,

        //

                0x7F,0xFF,0x7F,0xFB,0x7F,0xF7,0x7F,0xFF,0x00,0x80,0x7F,0xFF,0x3F,0xFE,0x5F,0xFD,

                0x5F,0xFB,0x6F,0xF7,0x77,0xE7,0x7B,0x8F,0x7C,0xDF,0x7F,0xFF,0x7F,0xFF,0xFF,0xFF

};

                                                                                        

void main()

{

        flying i,j,n;

        while(1)

        {

                for(j=0;j<4;j++)

                {

                        for(n=0;n<40;n++)

                        {

                                for(i=0;i<16;i++)

                                {

                                        out1=i%16;

                                        out0=string[i*2+j*32];

                                        out2=string[i*2+1+j*32];

                                        delay(4);

                                        out0=0xff;

                                        out2=0xff;

                                }

                        }

                }

        }

}



Keywords:MCU Reference address:Design of 16x16 LED dot matrix using single chip microcomputer (74HC154+74LS04 driver)

Previous article:51 single-chip digital clock source code with detailed comments (with alarm clock perpetual calendar)
Next article:Fingerprint attendance machine source program based on 51 single chip microcomputer

Recommended ReadingLatest update time:2024-11-23 07:49

C8051F350 single chip microcomputer in the full automatic CCFL film viewer brightness
introduction Since the beginning of the 21st century, the world of information has changed rapidly. Maybe a high-tech product will be released today and a better similar product will be released tomorrow. The update cycle of electronic computer science and technology is about 2 to 3 years. With the development
[Microcontroller]
MCU avr timer/counter T/C2
T/C2: 8-bit timer/counter that generates pulse width modulated signals with no output jitter and adjustable phase. FOC2 Forced Output Compare: Only valid when WGM indicates non-PWM mode. However, to ensure compatibility with future devices, when using PWM, TCCR2 must be cleared to 0 when written. After writing
[Microcontroller]
MCU avr timer/counter T/C2
MCU Novice Learning Series 15 Summary of Failed MCU Program Download
The whole process of lighting up the first LED was introduced above. Many people may be lucky enough to light up the LED, but it is also very likely that many people are very unlucky and fail to download the program. Beginners often encounter situations where the program cannot be downloaded. Many people are frustrated
[Microcontroller]
STC51 MCU SPI interface single master single slave mode communication - assembly language
;============================================ ;STC12C5410 spi communication ; Single master and single slave mode ;============================================ ;MASTER EQU 1 ;Master microcontroller MASTER EQU 0 ; Slave ;---------------------------------------- ;Define COM baud rate auto-reload constant ;
[Microcontroller]
JTAGICE mkII or AVR MCU issues
I used the JTAG function of JTAGICE mkII to simulate a program these days and found a problem. I don't know if it is a chip problem or a simulator problem. I wrote the program using GCC of AVRSTDIO4 and used JTAGICE mkII to simulate it. The chip is ATmega32. The program is in the appendix. The problem is: when the cod
[Microcontroller]
The difference between Flash and EEPROM in MCU decryption
1. Meaning of Flash and EEPROM The data of the microcontroller when it is running is stored in RAM (Random Access Memory). The data in RAM cannot be retained after power failure. So how to prevent the data from being lost after power failure? This requires the use of memory such as EEPROM or FLASHROM. Insert a parag
[Microcontroller]
The difference between Flash and EEPROM in MCU decryption
The circuit composition and function of the single chip microcomputer minimum system
Below we will first briefly introduce the specific functions of each pin of the 51 single-chip microcomputer, and then focus on introducing the concept, composition and practical uses of the circuit schematics of the single-chip microcomputer minimum system. According to the pin identification method of the integrat
[Microcontroller]
The circuit composition and function of the single chip microcomputer minimum system
Application of single chip microcomputer and MCGS configuration software in full automatic central heating system
The monitoring platform is composed of a single-chip microcomputer and MCGS configuration software to realize dynamic testing, detection and alarm of the entire central heating system. It has the advantages of being intuitive, easy to control, advanced in technology and low in price. Central heating water heaters ar
[Microcontroller]
Application of single chip microcomputer and MCGS configuration software in full automatic central heating system
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号