5248 views|12 replies

6

Posts

0

Resources
The OP
 

LED dot matrix screen, I want to ask you guys, why I only light up one light, but the whole row is lit [Copy link]

 

IMG_20200821_153249.jpg (3.27 MB, downloads: 0)

IMG_20200821_153249.jpg
This post is from 51mcu

Latest reply

Could it be a column scan problem?   Details Published on 2020-9-1 15:32
 

2w

Posts

0

Resources
2
 

It may be caused by hardware error or software error. The possibility of software error is higher.

This post is from 51mcu
 
 
 

234

Posts

0

Resources
3
 

99.9% of the time it's your program problem

This post is from 51mcu
 
 
 

6

Posts

0

Resources
4
 
foxpro2005 posted on 2020-8-22 12:52 99.9% of the time it’s your program problem

This post is from 51mcu
 
 
 

7422

Posts

2

Resources
5
 

Crossover IO outputs? The crossover IO is not correct.

This post is from 51mcu
 
Personal signature

默认摸鱼,再摸鱼。2022、9、28

 
 

4005

Posts

0

Resources
6
 

What screen? It sounds like ws2812.

This post is from 51mcu
 
 
 

6

Posts

0

Resources
7
 
huo_hu posted on 2020-8-25 03:35 What screen? It sounds like ws2812

Two 16X64 dot matrix, the chips behind are 74HC245, 74HC138 and 5020

This post is from 51mcu
 
 
 

4005

Posts

0

Resources
8
 

There should be a serial-to-parallel chip.

This post is from 51mcu
 
 
 

650

Posts

8

Resources
9
 

Generally speaking, it's a problem with your program. There are many examples of this kind of screen on the Internet. You can modify it yourself and it will light up.

This post is from 51mcu
 
 
 

931

Posts

3

Resources
10
 

Could it be a column scan problem?

This post is from 51mcu
 
 
 

6

Posts

0

Resources
11
 
hujj posted on 2020-9-1 15:32 Could it be a column scan problem?

I don't know what to do. I've given up.

This post is from 51mcu
 
 
 

6

Posts

0

Resources
12
 
This post was last edited by Zhu Moumou on 2020-10-19 17:29
#include"reg51.h"
#include"intrins.h"
//寄存器
sfr AUXR = 0x8E;
sfr P1M0 = 0x92;   
sfr P1M1 = 0x91;
sfr P3M0 = 0xB2;
sfr P3M1 = 0xB1;
//IO口
sbit LA = P1^0;
sbit LB = P1^1;
sbit LC = P1^2;
sbit LD = P1^3;
sbit R1 = P1^4;
sbit R2 = P1^5;
sbit EN = P3^5;
sbit LAT = P3^6;
sbit CLK = P3^7;

unsigned char code zk[]={
0x08,0x00,0x08,0x00,0x0F,0xFC,0x14,0x00,0x24,0x00,0x47,0xF0,0x04,0x00,0x04,0x00,
0x07,0xF8,0x04,0x00,0x01,0x00,0x08,0x84,0x48,0x92,0x48,0x12,0x87,0xF0,0x00,0x00,/*"怎",0*/

0x01,0x00,0x01,0x00,0x02,0x00,0x02,0x00,0x04,0x40,0x08,0x40,0x10,0x80,0x20,0x80,
0x41,0x00,0x02,0x00,0x04,0x20,0x08,0x10,0x10,0x08,0x3F,0xFC,0x10,0x04,0x00,0x00,/*"么",1*/

0x20,0x00,0x27,0xFC,0x24,0x44,0x24,0x44,0xFC,0x44,0x27,0xFC,0x24,0x44,0x2C,0x44,
0x34,0x44,0xE7,0xFC,0x24,0x44,0x24,0x44,0x24,0x44,0x28,0x44,0xA8,0x54,0x50,0x08,/*"拥",2*/

0x02,0x00,0x02,0x00,0xFF,0xFE,0x04,0x00,0x04,0x00,0x0F,0xF0,0x08,0x10,0x18,0x10,
0x2F,0xF0,0x48,0x10,0x88,0x10,0x0F,0xF0,0x08,0x10,0x08,0x10,0x08,0x50,0x08,0x20,/*"有",3*/

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFE,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"一",4*/

0x02,0x08,0x21,0x10,0x10,0x00,0x17,0xFC,0x00,0x80,0x03,0xF8,0xF2,0x08,0x13,0xF8,
0x12,0x08,0x13,0xF8,0x12,0x08,0x13,0xF8,0x12,0x08,0x28,0x00,0x47,0xFE,0x00,0x00,/*"道",5*/

0x01,0x00,0x07,0x84,0x78,0x04,0x08,0x88,0x44,0x90,0x25,0x22,0x20,0x02,0x04,0x04,
0x7F,0x88,0x0C,0x10,0x16,0x22,0x15,0x02,0x24,0x84,0x44,0x08,0x84,0x10,0x04,0x60,/*"彩",6*/

0x10,0x00,0x10,0x00,0x11,0xFC,0x7C,0x20,0x54,0x20,0x54,0x20,0x54,0x20,0x54,0x20,
0x7C,0x20,0x50,0x20,0x10,0x20,0x14,0x20,0x1E,0x20,0xE2,0x20,0x43,0xFE,0x00,0x00,/*"虹",7*/
};
//void Delay1ms()		//@11.0592MHz
//{
//	unsigned char i, j;
//
//	_nop_();
//	_nop_();
//	_nop_();
//	i = 11;
//	j = 190;
//	do
//	{
//		while (--j);
//	} while (--i);
//}
void WriteIC(unsigned char DataR1,unsigned char DataR2)
{
	unsigned char i;
	for(i=0;i<8;i++)
	{
		R1 = DataR1&0x80;
		R2 = DataR2&0x80;
		CLK = 0;
		CLK = 1;
		DataR1 = DataR1 << 1;
		DataR2 = DataR2 << 1;	
	}
}

void Dispaly()
{
	unsigned char i,j;
	for(i=0;i<16;i++)
	{
		EN = 0;
		LAT = 0;

		for(j=0;j<8;j++)
		{
			WriteIC(zk[j*32+i*2],0);
			WriteIC(zk[j*32+i*2+1],0);
		}

		P1 = i;

		LAT = 1;
		EN = 1;		
	}
}

void main()
{
	AUXR |= 0x80;	//1T
	P1M0 = 0xff;	//推挽
	P3M0 = 0xff;
	P1M1 = 0;
	P3M1 = 0;
	while(1)
	{
		Dispaly();			
	}
}

It has been a long time since I came back to look at this problem. Actually, the program was written correctly at that time.

But at that time, I didn’t understand the use of the power and ground on this interface. The microcontroller was only connected to the signal line, and the power and ground were not connected to the microcontroller but were connected separately. Now I still use the code at that time, but just connect the power and ground on the interface to the power and ground of the microcontroller.

image.png (56.98 KB, downloads: 0)

image.png
This post is from 51mcu
 
 
 

6

Posts

0

Resources
13
 
朱某mou posted on 2020-10-19 17:09 It's been a long time since I came back to look at this question. Actually, the program was written correctly at that time, but I didn't understand the purpose of the power and ground on this interface at that time, ...

I still don't understand why this happened.

This post is from 51mcu
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list