LED单元板驱动(HUB75接口)_爱FC的捷哥的博客-程序员宅基地_hub75

技术标签: stm32  STM32  LED单元板  HUB75  

开始之前先吐槽一下,搜这个的资料。要么都是Arduino,要么单片机的收费。小小的一个LED单元板,凭什么?

用Arduino是你速度快还是我ST,树莓派不好用?收费更离谱,这点东西还藏私?给你个中指凸。把原理都写出来看你怎么收费。

 

一、接口定义及原理

如图,有两个RGB通道,共占用6个IO。剩下的ABCDE为地址通道,LAT为行数据锁存通道,CLK为数据时钟,OE为低电平使能LED显示。图片这里没有E,证明它是16扫的,有E就会把B上面的地改为E。这样就是5位,2的5次方32扫。16扫控制16行显示,共2个RGB通道所以16扫可以控制16*2=32行显示。

(1)单元板的显示为单位时间内显示一行数据,然后短时间内切换到另一行显示,16扫一个显示周期为切换16次。

(2)两个RGB通道分别控制上下两部分的RGB灯。图片中的为32*16。正常来说,需要3个地址ABC,假设ABC 3个IO为高电平意味着选定第7行跟第15行,RGB1通道数据被写到第7行,RGB2数据被写到第15行。(我这个板子比较坑,有点不同)

(3)数据的写入顺序,失能LED显示,写入一行数据,选定行,锁存,使能LED显示。

(4)颜色渐变,方法是同一行扫描32次,假设R1我只显示一次,那它占空比就是1/32,显示次数越多越来亮。

         这方法挺麻烦,但暂时没想到别的方法。

 

  By the way:我这板子比较奇怪,数据写入方式跟一般的板子不一样。具体看图:

  

数据填充的时候,RBG1通道前8个时钟周期数据在第0行,接下来8个时钟周期数据却跳到第4行去了。然后又跳回第一行。

正常的应该是一直往同一行填充数据才对的。所以我买的这个板子比较奇葩。

 

二、驱动代码

使用单片机为STM32F407VE,STM32CUBEMX生成代码

#include "main.h"
#include "tim.h"
#include "gpio.h"

void SystemClock_Config(void);

#define OE_H   HAL_GPIO_WritePin(OE_GPIO_Port,OE_Pin,GPIO_PIN_SET)
#define R1_H   HAL_GPIO_WritePin(R1_GPIO_Port,R1_Pin,GPIO_PIN_SET)
#define R2_H   HAL_GPIO_WritePin(R2_GPIO_Port,R2_Pin,GPIO_PIN_SET)
#define G1_H   HAL_GPIO_WritePin(G1_GPIO_Port,G1_Pin,GPIO_PIN_SET)
#define G2_H   HAL_GPIO_WritePin(G2_GPIO_Port,G2_Pin,GPIO_PIN_SET)
#define B1_H   HAL_GPIO_WritePin(B1_GPIO_Port,B1_Pin,GPIO_PIN_SET)
#define B2_H   HAL_GPIO_WritePin(B2_GPIO_Port,B2_Pin,GPIO_PIN_SET)
#define A_H    HAL_GPIO_WritePin(A_GPIO_Port,A_Pin,GPIO_PIN_SET)
#define B_H    HAL_GPIO_WritePin(B_GPIO_Port,B_Pin,GPIO_PIN_SET)
#define CLK_H  HAL_GPIO_WritePin(CLK_GPIO_Port,CLK_Pin,GPIO_PIN_SET)
#define LAT_H  HAL_GPIO_WritePin(LAT_GPIO_Port,LAT_Pin,GPIO_PIN_SET)

#define OE_L   HAL_GPIO_WritePin(OE_GPIO_Port,OE_Pin,GPIO_PIN_RESET)
#define R1_L   HAL_GPIO_WritePin(R1_GPIO_Port,R1_Pin,GPIO_PIN_RESET)
#define R2_L   HAL_GPIO_WritePin(R2_GPIO_Port,R2_Pin,GPIO_PIN_RESET)
#define G1_L   HAL_GPIO_WritePin(G1_GPIO_Port,G1_Pin,GPIO_PIN_RESET)
#define G2_L   HAL_GPIO_WritePin(G2_GPIO_Port,G2_Pin,GPIO_PIN_RESET)
#define B1_L   HAL_GPIO_WritePin(B1_GPIO_Port,B1_Pin,GPIO_PIN_RESET)
#define B2_L   HAL_GPIO_WritePin(B2_GPIO_Port,B2_Pin,GPIO_PIN_RESET)
#define A_L    HAL_GPIO_WritePin(A_GPIO_Port,A_Pin,GPIO_PIN_RESET)
#define B_L    HAL_GPIO_WritePin(B_GPIO_Port,B_Pin,GPIO_PIN_RESET)
#define CLK_L  HAL_GPIO_WritePin(CLK_GPIO_Port,CLK_Pin,GPIO_PIN_RESET)
#define LAT_L  HAL_GPIO_WritePin(LAT_GPIO_Port,LAT_Pin,GPIO_PIN_RESET)

//此单元板4扫一次性输入2行数据,2个通道,故控制2*2*LED_ROW=16行
#define LED_ROW      4
//一行32个点
#define LED_COLUMN   32

typedef struct
{
	uint16_t B:5;
	uint16_t G:5;
	uint16_t R:5;	
	uint16_t null:1;		
}led_data;


extern const unsigned char gImage_111[1024];
led_data *img_data = (led_data*)gImage_111;



void delay(uint16_t time)
{
  uint16_t i,j;
	
  for(i=0;i<time;i++)
    for(j=0;j<100;j++);	  
}



void led_DRamDis(led_data *pdata)
{
	  uint16_t col_depth;
	  uint16_t j,k,l;
	  uint16_t row=0;
	  uint16_t pos_down = LED_COLUMN*LED_ROW*2;  //指向LED下半部分数据起点

          if(pdata == NULL) return;

	  for(row = 0;row<LED_ROW;row++)  //发送一扫数据
	  {
		for(col_depth=0;col_depth<32;col_depth++) //每种颜色5bit,32种变化
               {
		 OE_H;
				
		 for(l=0;l<4;l++)   //一行4*8像素点数据
		 {		
			for(k=0;k<2;k++)  //发送16像素点数据后,数据被续写
			{
				for(j=0;j<8;j++)   //发送8像素点数据后数据会跳转
				{           

					if(col_depth<pdata[j+row*32+32*LED_ROW*k+l*8].B) B1_H; 
					else                                             B1_L; 
					if(col_depth<pdata[j+row*32+32*LED_ROW*k+l*8].R) R1_H; 
					else                                             R1_L; 
					if(col_depth<pdata[j+row*32+32*LED_ROW*k+l*8].G) G1_H; 
					else                                             G1_L; 
					if(col_depth<pdata[j+row*32+pos_down+32*LED_ROW*k+l*8].B) B2_H; 
					else                                                      B2_L; 
					if(col_depth<pdata[j+row*32+pos_down+32*LED_ROW*k+l*8].R) R2_H; 
					else                                                      R2_L; 
								
					if(col_depth<pdata[j+row*32+pos_down+32*LED_ROW*k+l*8].G) G2_H; 
					else                                                      G2_L; 	
								
					CLK_L;
					CLK_H;			
				}					
			}
		}

		//使能一行数据
		if(row&0x01) A_H;
		else         A_L;
					
		if(row&0x02) B_H;
		else         B_L;

					
		LAT_L;
		LAT_H;         
		OE_L;	
		delay(10); //短暂延时,让当前行数据显示一段时间
					
	}				
				
  }		
}


led_data img_data2[512];

void RedDis(uint8_t r)
{
  uint16_t i;

  for(i=0;i<512;i++)
  {
    img_data2[i].R = r;
    img_data2[i].G = 0;
    img_data2[i].B = 0;			
  }

  for(i=0;i<5;i++)
    led_DRamDis(img_data2);
}

void BlueDis(uint8_t b)
{
  uint16_t i;

  for(i=0;i<512;i++)
  {
    img_data2[i].R = 0;
    img_data2[i].G = 0;
    img_data2[i].B = b;			
  }

  for(i=0;i<5;i++)
    led_DRamDis(img_data2);
}

void GreenDis(uint8_t g)
{
  uint16_t i;

  for(i=0;i<512;i++)
  {
    img_data2[i].R = 0;
    img_data2[i].G = g;
    img_data2[i].B = 0;			
  }

  for(i=0;i<5;i++)
    led_DRamDis(img_data2);
}


int main(void)
{
  uint16_t i;
  uint16_t *p;
 
  HAL_Init();

  SystemClock_Config();

  MX_GPIO_Init();
  MX_TIM7_Init();

  while (1)
  {
    for(i=0;i<16;i++)
      RedDis(i);		
    for(i=0;i<16;i++)
      BlueDis(i);	
    for(i=0;i<16;i++)
      GreenDis(i);			
	
    for(i=0;i<100;i++)
      led_DRamDis(img_data);
  }
}


void SystemClock_Config(void)
{
  RCC_OscInitTypeDef RCC_OscInitStruct = {0};
  RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};

  /** Configure the main internal regulator output voltage 
  */
  __HAL_RCC_PWR_CLK_ENABLE();
  __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
  /** Initializes the CPU, AHB and APB busses clocks 
  */
  RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
  RCC_OscInitStruct.HSEState = RCC_HSE_ON;
  RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
  RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
  RCC_OscInitStruct.PLL.PLLM = 8;
  RCC_OscInitStruct.PLL.PLLN = 336;
  RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
  RCC_OscInitStruct.PLL.PLLQ = 4;
  if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
  {
    Error_Handler();
  }
  /** Initializes the CPU, AHB and APB busses clocks 
  */
  RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
                              |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
  RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
  RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
  RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
  RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;

  if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5) != HAL_OK)
  {
    Error_Handler();
  }
}

void Error_Handler(void)
{

}

图像数据数组采用Image2Lcd 2.9生成,搞单片机的人应该对此很熟悉。16位RBG555数据格式

const unsigned char gImage_111[1024] = { /* 0X00,0X10,0X20,0X00,0X10,0X00,0X00,0X1B, */
0XE9,0X03,0XE9,0X03,0XE9,0X03,0XC9,0X03,0XE9,0X03,0XC9,0X03,0XE9,0X03,0XE9,0X03,
0XE9,0X03,0XE9,0X03,0XE9,0X03,0XE9,0X03,0XE9,0X03,0XE9,0X03,0XE9,0X03,0XE9,0X03,
0XC9,0X03,0XE9,0X03,0XC9,0X03,0XE9,0X03,0XE9,0X03,0XE9,0X03,0XE9,0X03,0XE9,0X03,
0XE9,0X03,0XC9,0X03,0XE9,0X03,0XE9,0X03,0XC9,0X03,0XE9,0X03,0XC9,0X03,0XE9,0X03,
0XE9,0X03,0XE9,0X03,0XE9,0X03,0XE9,0X03,0XE9,0X03,0XC9,0X03,0XC9,0X03,0XC9,0X03,
0XE9,0X03,0XC9,0X03,0XE9,0X03,0XC9,0X03,0XE9,0X03,0XE8,0X03,0XE9,0X03,0XE9,0X03,
0XE9,0X03,0XC9,0X03,0XE9,0X03,0XC9,0X03,0XCA,0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X00,0X7C,0X00,0X7C,0XE9,0X03,0X00,0X7C,0X00,0X7C,0X00,0X7C,0XC9,0X03,
0X1F,0X00,0X1F,0X00,0X1F,0X00,0X1F,0X00,0X1F,0X00,0X1F,0X00,0XC9,0X03,0XC9,0X03,
0XE9,0X03,0XE9,0X03,0XFF,0X7F,0XFF,0X7F,0XFF,0X7F,0XE9,0X03,0XE9,0X03,0XC9,0X03,
0XE0,0X7F,0XE0,0X7F,0XE0,0X7F,0XE0,0X7F,0XE0,0X7F,0XE9,0X03,0XE9,0X03,0XE9,0X03,
0XE9,0X03,0XE9,0X03,0XE9,0X03,0XC9,0X03,0XE9,0X03,0XE9,0X03,0XC9,0X03,0XE9,0X03,
0XC9,0X03,0XC9,0X03,0XC9,0X03,0XE9,0X03,0XE9,0X03,0XE9,0X03,0XC9,0X03,0XE9,0X03,
0XE9,0X03,0XC9,0X03,0XE9,0X03,0XE9,0X03,0XC9,0X03,0XE9,0X03,0XE9,0X03,0XE9,0X03,
0XE9,0X03,0XC9,0X03,0XC9,0X03,0XE9,0X03,0XE9,0X03,0XE9,0X03,0XC9,0X03,0XE9,0X03,
0XE9,0X03,0XE9,0X03,0XC9,0X03,0XE9,0X03,0XE9,0X03,0XC9,0X03,0XE9,0X03,0XC9,0X03,
0XE9,0X03,0XC9,0X03,0XE9,0X03,0XC9,0X03,0XE9,0X03,0XE9,0X03,0XE9,0X03,0XE9,0X03,
0XC9,0X03,0XE9,0X03,0XE9,0X03,0XE9,0X03,0XC9,0X03,0XE9,0X03,0XE9,0X03,0XE9,0X03,
0XE9,0X03,0XE9,0X03,0XE9,0X03,0XE9,0X03,0XE9,0X03,0XC9,0X03,0XE9,0X03,0XC8,0X03,
0XE9,0X03,0XE9,0X03,0XE9,0X03,0XE9,0X03,0XE9,0X03,0XE9,0X03,0XE9,0X03,0XE9,0X03,
0XE9,0X03,0XE9,0X03,0XE9,0X03,0XE9,0X03,0XE9,0X03,0XE9,0X03,0XE9,0X03,0XE9,0X03,
0XE9,0X03,0XE9,0X03,0XC9,0X03,0XE9,0X03,0XE9,0X03,0XE9,0X03,0XC9,0X03,0XC9,0X03,
0XE9,0X03,0XC9,0X03,0XE9,0X03,0XE9,0X03,0XC9,0X03,0XE9,0X03,0XC9,0X03,0XE9,0X03,
};

 

三、效果图

       改变每个RGB通道的占空比实现渐变(一行扫描32次),所以闪烁会严重些。

 

 

 

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/a3748622/article/details/106658193

智能推荐

Java开发必须要会!java并发编程实战英文pdf_普通网友的博客-程序员宅基地

阿里面试总结1.一面首先确认对阿里的意向度;其次面试官会针对你曾经做过的项目来做具体技术的交流,你对项目细节是不是掌握到位,以及java技术基础和原理掌握程序,比如并发编程以及数据库和JVM三个方面,也会交流到分布式、线程池的实现等等(重点考察有没有深入钻研技术和技术上的亮点);2.二面技术面,根据项目深入的了解技术实力,了解你的知识面、问题解决能力以及技术灵活运用能力,也通过这一过程考察团队合作能力、学习主动性和创新性,可以挑选2-3个做过的有典型性的项目做一个仔细技术回顾和自己独到的理解(这是加

自主访问控制 强制访问控制_快速访问控制_cunchi4221的博客-程序员宅基地

自主访问控制 强制访问控制In this tutorial, we’ll discuss about Swift Access Control. Before we get a hang of it, let’s understand an important term that we’ll be using throughout this tutorial: Modules. 在本教程中,我们将...

SpringBoot @Value中文乱码_如漩涡的博客-程序员宅基地[email protected]注解 中文乱码

Spring Boot在配置文件application.properties中写入中文,用@Value获取时乱码解决现象有些时候可以将固定中文等放入配置文件中,便于后期要改的时候,不用改代码重新打包,直接在配置文件中改,但出现了个问题jx.url = http://127.0.0.1:8080/indexinformation.review.content = 通过某某平台通知您有待审核公...

kettle-文本文件输入_weixin_33737774的博客-程序员宅基地

转载于:https://www.cnblogs.com/LXL616/p/10836225.html

JavaScript ES6新增语法相关个人总结(二)_Scorpio_sky的博客-程序员宅基地_js es6 自增

目录第7种数据类型,Symbol- Symbol创建对象属性- Symbol内置的值迭代器,for...of- 基本使用及实现原理- 使用迭代器自定义遍历对象生成器函数- 生成器函数传参- 生成器函数-模拟请求数据第7种数据类型,SymbolSymbol 的值是唯一的,用来解决命名冲突的问题Symbol 值不能与其他数据进行运算Symbol 定义的对象属性不能使用for…in循环遍历,但是可以使用Reflect.ownKeys 来获取对象的所有键名 - 代码例:// 创建Symbollet

Codeforces Round #342 (Div. 2)-A. Guest From the Past_绝尘花遗落的博客-程序员宅基地

time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard outputKolya Gerasimov loves kefir very much. He lives in year 1984 and knows all the details of buyi

随便推点

java.awt.Graphics2D 生成图片--个人章的方法_allsmallpig的博客-程序员宅基地_signimage.params

# java.awt 画矩形踩坑 本来使用Graphics2D的drawRect()方法画图的,但是出现了下边框过粗,不得已 使用了画线的方法,四个边框,单独划线,这里要注意坐标轴和线的宽度--高度height 一下是代码/** * 创建私人章的方法 * @param drawStrName 输入的姓名 1- 18 位 ...

PerconaXtrabackup 压缩备份集_Fan_-_的博客-程序员宅基地

事件调度器event 相当于oracle scheduler CREATE [DEFINER = { user | CURRENT_USER }] EVENT [IF NOT EXISTS] event_name ON SCHEDULE schedule [ON COMPLETION [NOT] PRESERV

Unity Shader入门精要笔记(十二):纹理属性_Aimar_Johnny的博客-程序员宅基地_unity clamp repeat

纹理从广义上讲不是一个普通的图片,我们今后会遇到各种功能性纹理,比如法线纹理,立方体纹理等,我们在Unity中选中一个纹理,属性面板会看到很多属性,比如上一篇的普通纹理

javaweb学习笔记:XML_Code进阶狼人的博客-程序员宅基地

XML:1. 概念:Extensible Markup Language 可扩展标记语言 * 可扩展:标签都是自定义的。 &lt;user&gt; &lt;student&gt; * 功能 * 存储数据 1. 配置文件 2. 在网络中传输 * xml与html的区别 1. xml标签都是自定义的,html标签是预定义。 2. xml的语法严格,html语法松散...

数据库连接池连接异常com.alibaba.druid.pool.GetConnectionTimeoutException_weixin_30648587的博客-程序员宅基地

1、事务没提交开启了事务,但是没有关闭事务,导致连接池一直被占用事务管理代码:@Autowired private PlatformTransactionManager platformTransactionManager; protected TransactionStatus startTx() { TransactionSta...

Android Studio首次启动卡住解决办法_jingjc的博客-程序员宅基地_android studio 停在开启

用vpn 改host也不行,折腾了好几次最后还是在Android Studio安装目录的bin目录下面的idea.properties文件,添加一条禁用开始运行向导的配置项: disable.android.first.run=true解决的,其实按道理用vpn应该是可以的,如果又那位大神知道原因,请告知,谢谢

推荐文章

热门文章

相关标签