实际测试,动态扫描的屏幕能驱动1.5W分辨率,静态屏可以驱动更大的屏幕。只适合做LED点阵驱动。
单片机源程序如下:
- /************************************************************
- 发布时要在DEBUG.h中屏蔽启用调试,否则不能烧录字库
- **********************************************************/
- #include "stm32f10x.h"
- #include "IO.h"
- #include "Uart.h"
- #include "Timer.h"
- #include "Adc.h"
- #include "Spi.h"
- #include "Flash.h"
- #include "Iwdg.h"
- #include "Datahandle.h"
- #include "Display.h"
- #include "Move.h"
- #include "Font.h"
- #include "DEBUG.h"
- /*
- * 函数名:StartInt()
- * 描述 : 初始化函数
- * 输入 :无
- * 输出 : 无
- */
- void StartInt()
- {
- uint8_t XSPXT[16]=" 显示屏系统 ";
- uint8_t ZZJDZJ[16]=" 正在加电自检 ";
- ////////////////////////////////////////////////////
- IO_Init();//IO
- USART_Config();//串口1,232接口,DB9-235
- USART_Config2();//串口2,232接口,白色座子
- USART_Config3();//串口3,485接口,DB9-67
- BASIC_TIM_Init();//基本定时器6、7
- ADCx_Init();//ADC
- SPI_FLASH_Init();//Flash,SPI
- USART485RX;//485接收模式
- IWDG_Config(IWDG_Prescaler_256 ,781);//初始看门狗5S
- //////////////////////////////////////////////////
- if((GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_13) == 1) && (!DEBUG) )//开机自检画面
- {
-
- ColorLine1 = ColorLine2 = ColorLine3 = 3;
- Display_flag = 0;
- X_Axesbit = 0;
- Y_Axes = 20;
- for(GetIndex = 0;GetIndex<16;)
- {
- WordCodeCount20(XSPXT[GetIndex],XSPXT[GetIndex+1]);
- }
- X_Axesbit = 0;
- Y_Axes = 40;
- for(GetIndex = 0;GetIndex<16;)
- {
- WordCodeCount20(ZZJDZJ[GetIndex],ZZJDZJ[GetIndex+1]);
- }
- Display_flag = 1;
- StartTime = 400;//4S
- //////////////////////////////////////////////
- while(1)//开机自检后退出
- {
- IWDG_Feed();
- if(!StartTime)
- {
- ClearTFI();
- return;
- }
- }
-
- }
- }
- /*
- * 函数名:main
- * 描述 : 主函数
- * 输入 :无
- * 输出 : 无
- */
- int main(void)
- {
- StartInt();
- while(1)
- {
- IWDG_Feed();//看门狗
- if((GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_13) == 0) && (!DEBUG)) //字库
- {
- Font_Write();//烧录字库
- }
- else
- {
- DoDatahandle();//Datahandle();//串口数据处理
- }
- }
- }
复制代码
所有资料51hei提供下载:
STM32显示屏.rar
(353.38 KB, 下载次数: 69)
|