找回密碼
 立即注冊(cè)

QQ登錄

只需一步,快速開始

搜索
查看: 3059|回復(fù): 1
打印 上一主題 下一主題
收起左側(cè)

程序是STM32f103驅(qū)動(dòng)大型點(diǎn)陣屏幕的

[復(fù)制鏈接]
跳轉(zhuǎn)到指定樓層
樓主
ID:435840 發(fā)表于 2018-11-29 16:20 | 只看該作者 回帖獎(jiǎng)勵(lì) |倒序?yàn)g覽 |閱讀模式
實(shí)際測(cè)試,動(dòng)態(tài)掃描的屏幕能驅(qū)動(dòng)1.5W分辨率,靜態(tài)屏可以驅(qū)動(dòng)更大的屏幕。只適合做LED點(diǎn)陣驅(qū)動(dòng)。

單片機(jī)源程序如下:
  1. /************************************************************
  2. 發(fā)布時(shí)要在DEBUG.h中屏蔽啟用調(diào)試,否則不能燒錄字庫
  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. * 函數(shù)名:StartInt()
  19. * 描述  : 初始化函數(shù)
  20. * 輸入  :無
  21. * 輸出  : 無
  22. */

  23. void StartInt()
  24. {
  25.         uint8_t XSPXT[16]="   顯示屏系統(tǒng)   ";
  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();//基本定時(shí)器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) )//開機(jī)自檢畫面
  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)//開機(jī)自檢后退出
  59.                 {
  60.                         IWDG_Feed();
  61.                         if(!StartTime)
  62.                         {
  63.                                 ClearTFI();
  64.                                 return;
  65.                         }
  66.                 }
  67.                
  68.         }
  69. }




  70. /*
  71. * 函數(shù)名:main
  72. * 描述  : 主函數(shù)
  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();//串口數(shù)據(jù)處理
  89.                 }
  90.         }          
  91. }
復(fù)制代碼

所有資料51hei提供下載:
STM32顯示屏.rar (353.38 KB, 下載次數(shù): 69)


分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏1 分享淘帖 頂 踩
回復(fù)

使用道具 舉報(bào)

沙發(fā)
ID:1 發(fā)表于 2018-12-1 03:43 | 只看該作者
補(bǔ)全原理圖或者詳細(xì)說明一下電路連接即可獲得100+黑幣
回復(fù)

使用道具 舉報(bào)

本版積分規(guī)則

手機(jī)版|小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術(shù)交流QQ群281945664

Powered by 單片機(jī)教程網(wǎng)

快速回復(fù) 返回頂部 返回列表