找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 3051|回复: 1
打印 上一主题 下一主题
收起左侧

程序是STM32f103驱动大型点阵屏幕的

[复制链接]
跳转到指定楼层
楼主
ID:435840 发表于 2018-11-29 16:20 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
实际测试,动态扫描的屏幕能驱动1.5W分辨率,静态屏可以驱动更大的屏幕。只适合做LED点阵驱动。

单片机源程序如下:
  1. /************************************************************
  2. 发布时要在DEBUG.h中屏蔽启用调试,否则不能烧录字库
  3. **********************************************************/
  4. #include "stm32f10x.h"
  5. #include "IO.h"
  6. #include "Uart.h"
  7. #include "Timer.h"
  8. #include "Adc.h"
  9. #include "Spi.h"
  10. #include "Flash.h"
  11. #include "Iwdg.h"  
  12. #include "Datahandle.h"
  13. #include "Display.h"
  14. #include "Move.h"
  15. #include "Font.h"
  16. #include "DEBUG.h"


  17. /*
  18. * 函数名:StartInt()
  19. * 描述  : 初始化函数
  20. * 输入  :无
  21. * 输出  : 无
  22. */

  23. void StartInt()
  24. {
  25.         uint8_t XSPXT[16]="   显示屏系统   ";
  26.         uint8_t ZZJDZJ[16]="  正在加电自检  ";
  27.         ////////////////////////////////////////////////////
  28.         IO_Init();//IO
  29.         USART_Config();//串口1,232接口,DB9-235
  30.         USART_Config2();//串口2,232接口,白色座子
  31.         USART_Config3();//串口3,485接口,DB9-67
  32.         BASIC_TIM_Init();//基本定时器6、7
  33.         ADCx_Init();//ADC
  34.         SPI_FLASH_Init();//Flash,SPI
  35.         USART485RX;//485接收模式
  36.         IWDG_Config(IWDG_Prescaler_256 ,781);//初始看门狗5S
  37.         //////////////////////////////////////////////////
  38.         if((GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_13) == 1) && (!DEBUG) )//开机自检画面
  39.         {
  40.                
  41.                 ColorLine1 = ColorLine2 = ColorLine3 = 3;
  42.                 Display_flag = 0;
  43.                 X_Axesbit = 0;
  44.                 Y_Axes = 20;
  45.                 for(GetIndex = 0;GetIndex<16;)
  46.                 {                                                                                  
  47.                         WordCodeCount20(XSPXT[GetIndex],XSPXT[GetIndex+1]);
  48.                 }
  49.                 X_Axesbit = 0;
  50.                 Y_Axes = 40;
  51.                 for(GetIndex = 0;GetIndex<16;)
  52.                 {                                                                                  
  53.                         WordCodeCount20(ZZJDZJ[GetIndex],ZZJDZJ[GetIndex+1]);
  54.                 }
  55.                 Display_flag = 1;
  56.                 StartTime = 400;//4S
  57.                 //////////////////////////////////////////////
  58.                 while(1)//开机自检后退出
  59.                 {
  60.                         IWDG_Feed();
  61.                         if(!StartTime)
  62.                         {
  63.                                 ClearTFI();
  64.                                 return;
  65.                         }
  66.                 }
  67.                
  68.         }
  69. }




  70. /*
  71. * 函数名:main
  72. * 描述  : 主函数
  73. * 输入  :无
  74. * 输出  : 无
  75. */

  76. int main(void)
  77. {       
  78.         StartInt();
  79.         while(1)
  80.         {
  81.                 IWDG_Feed();//看门狗
  82.                 if((GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_13) == 0) && (!DEBUG)) //字库
  83.                 {
  84.                         Font_Write();//烧录字库
  85.                 }
  86.                 else
  87.                 {
  88.                         DoDatahandle();//Datahandle();//串口数据处理
  89.                 }
  90.         }          
  91. }
复制代码

所有资料51hei提供下载:
STM32显示屏.rar (353.38 KB, 下载次数: 69)


分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏1 分享淘帖 顶 踩
回复

使用道具 举报

沙发
ID:1 发表于 2018-12-1 03:43 | 只看该作者
补全原理图或者详细说明一下电路连接即可获得100+黑币
回复

使用道具 举报

无效楼层,该帖已经被删除
无效楼层,该帖已经被删除
5#
无效楼层,该帖已经被删除
6#
无效楼层,该帖已经被删除
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表