16*16 dot matrix Chinese character display simulation plus source code using 74hc595 driver chip

Publisher:vettykattyLatest update time:2020-01-09 Source: 51heiKeywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The schematic diagram of the 16*16 dot matrix simulation of the single chip microcomputer is as follows

The dot matrix cannot be directly connected to the microcontroller due to the large current, so 74hc595 is used to drive the serial-to-parallel chip, which can also be controlled with very few IO ports.

 
 

The microcontroller source program is as follows:

#include "reg51.h"


#define uchar unsigned char

#define uint  unsigned int


#define Lie   P1


sbit SHCP = P2^0;

sbit DS = P2^1;

sbit STCP = P2^2;


uchar code led[ ] ={

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,


0x08,0x40,0x08,0x40,0x0A,0x48,0xEA,0x4B,0xAA,0x4A,0xAA,0x4A,0xAA,0x4A,0xFE,0x7F,

0xAA,0x4A,0xAA,0x4A,0xA9,0x4A,0xF9,0x4B,0x29,0x48,0x0C,0x60,0x08,0x40,0x00,0x00, // 重


0x00,0x40,0x00,0x20,0xFC,0x9F,0x44,0x80,0x44,0x40,0x44,0x20,0x44,0x18,0x45,0x06,

0xFE,0x01,0x44,0x06,0x44,0x18,0x44,0x20,0x66,0x40,0x44,0xC0,0x00,0x40,0x00,0x00, //Celebration


0x80,0x80,0x80,0x40,0xFC,0x3F,0x96,0x02,0xA5,0x44,0x84,0x80,0xFC,0x7F,0x08,0x80,

0x08,0x40,0xC9,0x3F,0x4A,0x00,0x4E,0x00,0xE8,0x3F,0x4C,0x40,0x08,0x70,0x00,0x00, //航


0x40,0x80,0x42,0x80,0x42,0x40,0x42,0x20,0x42,0x10,0x42,0x0C,0x42,0x03,0xFE,0x00,

0x42,0x03,0x42,0x0C,0x42,0x10,0x42,0x20,0x43,0x40,0x62,0xC0,0x40,0x40,0x00,0x00, //day


0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,


}; 



//uchar led[]={}


void shift16bit(uchar dat1,uchar dat2) //595 outputs 16-bit data

{

flying i;

STCP=0;        

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

  {

   SHCP=0;

   if(dat1 &0x80) DS=1;

     else DS=0;

    dat1<<=1;

   SHCP=1;

  }

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

  {

   SHCP=0;

   if(dat2 &0x80) DS=1;

     else DS=0;

    dat2<<=1;

   SHCP=1;

  }

STCP=1;

}


void delay(uint x)

{

uint i;

for(i=0;i}


void main()

{

fly i,x=0;

uint n;


while(1)

{

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

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

  {

   Lie=i;

   shift16bit(led[2*i+1+2*x],led[2*i+2*x]);

   delay(100);

  }

  x++;

if(x==64) x=0;


/*

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

……………………



Keywords:MCU Reference address:16*16 dot matrix Chinese character display simulation plus source code using 74hc595 driver chip

Previous article:Course Design of Serial Communication between Single Chip Microcomputer and PC
Next article:51 MCU + ULN2003 drive 5V deceleration stepper motor program

Recommended ReadingLatest update time:2024-11-15 14:39

ARM7 microcontroller (learning) - (V), real-time clock (RTC) - 01
A familiar piece of music~~ Rihanna~~My cell phone ringtone~~ Today is the real-time clock (RTC)~~ I have decided~~ After finishing the ARM7 data, I will not sort out these data anymore~~ There are still many online~~ But I will still update my learning experience~~ Went to school~~ It's the second semester of junior
[Microcontroller]
ARM7 microcontroller (learning) - (V), real-time clock (RTC) - 01
Summary of PIC16F616 MCU learning experience
    1. Preface   In order to summarize the learning experience of PIC16F616 microcontroller some time ago and facilitate communication with everyone, I wrote this article about the learning experience of PIC microcontroller, which is organized in my own language after reading the manual and programming and debugging.
[Microcontroller]
Design of three-phase thyristor trigger circuit based on AVR microcontroller
Introduction: This system uses a single-chip microcomputer to control the triggering of thyristors, which is the development trend of thyristor applications. In practical applications, this system has also shown the advantages of high triggering accuracy, high reliability, easy debugging, and convenient operation. Thi
[Microcontroller]
Design of three-phase thyristor trigger circuit based on AVR microcontroller
51 single chip microcomputer 4 independent buttons control LED lights (protues simulation) (C language version)
1. Ideas and related issues 1. Logical thinking: When key1 is pressed, LED1 lights up. Because the pressing is instantaneous, no while is used, but an if statement is used. When it is released, use while(!key1) and a function call. First, imagine its general operation process in your mind, then arrange the component
[Microcontroller]
51 single chip microcomputer 4 independent buttons control LED lights (protues simulation) (C language version)
8051 MCU Tutorial Lesson 18: Interrupt System
Microcontroller Lesson 18: Interrupt System The concept of interruption What is an interrupt? Let's introduce it from an example in life. You are reading a book at home, and suddenly the phone rings. You put down the book, answer the phone, talk to the caller, then put down the phone and come back to read your boo
[Microcontroller]
EZ-USB MCU "high precision, high frequency, high stability" is guaranteed
1. Introduction In recent years, with the development of communication systems, people have higher and higher requirements for signal sources. Direct Digital Frequency Synthesis (DDS or DDFS) has been further developed in this context. It has the advantages of relative bandwidth, high frequency resolution, short freq
[Power Management]
EZ-USB MCU
STC12C5A32S2 MCU 1602 gradual display
The basic framework is written according to the program in Guo Tianxiang's Lesson 8, but when fading in, the instruction Guo used is write_com(0x18); But when I used it, it just didn't show up, so according to the 1602 manual, I used another instruction write_com(0x07) //When writing a character, the entire screen d
[Microcontroller]
STC12C5A32S2 MCU 1602 gradual display
Design of automatic switching power supply based on ATmega128 microcontroller
One of the development directions of power supply technology is to run distributed power supply system in parallel, so as to obtain fault tolerance and redundant power through N+1 redundancy, and to establish modular distributed power supply system to increase the total load current. The double-ended driver integrated
[Microcontroller]
Design of automatic switching power supply based on ATmega128 microcontroller
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号