国产免费AV|泡泡玛特欧洲总部将设在伦敦|中文天堂网www新版资源在线|一本久道综合在线中文|国精产品一二三产区的使用方法|香蕉鱼在线观看|www.27eee

 找回密碼
 注冊(cè)
搜索

Proteus仿真STM32F407ZGT6單線控制lcd2004液晶屏

[復(fù)制鏈接]
樓主
路漫漫 發(fā)表于 2020-5-23 01:25:07 | 只看該作者 |只看大圖 |倒序?yàn)g覽 |閱讀模式
一,打開(kāi)文件(可以隨文下載放置在文檔中打開(kāi))。(如下圖1所示) Proteus仿真STM32F407ZGT6單線控制lcd2004液晶屏 105144l3ab9kdbdcdsd923.png 圖1二,調(diào)整原理圖大小,適合可視,另存工程文件。(如下圖2,3,4所示) Proteus仿真STM32F407ZGT6單線控制lcd2004液晶屏 105145qz5mw8zzom5fewzz.png 圖2 Proteus仿真STM32F407ZGT6單線控制lcd2004液晶屏 105145pq0qosy57u0cyuuy.png 圖3 Proteus仿真STM32F407ZGT6單線控制lcd2004液晶屏 105145z1nlrbmblmzb7mr4.png 圖4三,點(diǎn)擊Source Code標(biāo)簽。(如下圖5所示) Proteus仿真STM32F407ZGT6單線控制lcd2004液晶屏 105146gz3y35v3szqq3lcp.png 圖5四,編輯main.c 代碼如Proteus8.9 VSM Studio GCC編譯器仿真STM32F407ZGT6系列015_lcd2004一線屏(如下圖6所示) Proteus仿真STM32F407ZGT6單線控制lcd2004液晶屏 105147nqi1akxcuv5vwszz.png 圖6五,Main.c 代碼:
  1. /* Main.c file generated by New Project wizard
  2. * Author:   Ziegler Yin
  3. * Created:   周四 一月 16 2020
  4. * Processor: STM32F407ZGT6ZGT6
  5. * Compiler:  GCC for ARM
  6. */

  7. #include "mfuncs.h"
  8. #include "delay.h"
  9. #include "usart.h"
  10. #include "comds.h"

  11. u8 l;

  12. int main(void)
  13. {
  14.         delay_init(84);  //初始化延時(shí)函數(shù)
  15.         NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);//設(shè)置系統(tǒng)中斷優(yōu)先級(jí)分組2
  16.         uart_init(9600);//初始化串口波特率為115200
  17.       
  18.                
  19.    while(1) //實(shí)現(xiàn)比較值從0-300遞增,到300后從300-0遞減,循環(huán)
  20.         {
  21.                
  22.                 init();
  23.                 wrt_lin('0');
  24.                 uprint("Kaillen WorkWork
  25. ");
  26.                 wrt_lin('1');
  27.                 uprint("   Wellcom YOU!
  28. ");
  29.                  for(l=0; l<255; l++) delay_ms(15);
  30.                 wrt_lin('2');
  31.                 uprint(" Code Made
  32. ");
  33.                 wrt_lin('3');
  34.                 uprint("  ---Ziegler Yin
  35. ");
  36.                  for(l=0; l<100; l++) delay_ms(15);
  37.         }
  38. }

  39. stm32f4xx_conf.h:

  40. /**
  41.   ******************************************************************************
  42.   * @file    Project/STM32F4xx_StdPeriph_Templates/stm32f4xx_conf.h  
  43.   * @author  MCD Application Team
  44.   * @version V1.8.0
  45.   * @date    04-November-2016
  46.   * @brief   Library configuration file.
  47.   ******************************************************************************
  48.   * @attention
  49.   *
  50.   * <h2><center>&#169; COPYRIGHT 2016 STMicroelectronics</center></h2>
  51.   *
  52.   * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
  53.   * You may not use this file except in compliance with the License.
  54.   * You may obtain a copy of the License at:
  55.   *
  56.   *        http://www.st.com/software_license_agreement_liberty_v2
  57.   *
  58.   * Unless required by applicable law or agreed to in writing, software
  59.   * distributed under the License is distributed on an "AS IS" BASIS,
  60.   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  61.   * See the License for the specific language governing permissions and
  62.   * limitations under the License.
  63.   *
  64.   ******************************************************************************
  65.   */

  66. /* Define to prevent recursive inclusion -------------------------------------*/
  67. #ifndef __STM32F4xx_CONF_H
  68. #define __STM32F4xx_CONF_H

  69. /* Includes ------------------------------------------------------------------*/
  70. /* Uncomment the line below to enable peripheral header file inclusion */

  71. //#include "stm32f4xx_adc.h"
  72. //#include "stm32f4xx_crc.h"
  73. #include "stm32f4xx_dbgmcu.h"
  74. //#include "stm32f4xx_dma.h"
  75. #include "stm32f4xx_exti.h"
  76. //#include "stm32f4xx_flash.h"
  77. #include "stm32f4xx_gpio.h"
  78. //#include "stm32f4xx_i2c.h"
  79. //#include "stm32f4xx_iwdg.h"
  80. #include "stm32f4xx_pwr.h"
  81. #include "stm32f4xx_rcc.h"
  82. //#include "stm32f4xx_rtc.h"
  83. //#include "stm32f4xx_sdio.h"
  84. //#include "stm32f4xx_spi.h"
  85. #include "stm32f4xx_syscfg.h"
  86. #include "stm32f4xx_tim.h"
  87. #include "stm32f4xx_usart.h"
  88. //#include "stm32f4xx_wwdg.h"
  89. #include "misc.h"
  90. /* High level functions for NVIC and SysTick (add-on to CMSIS functions) */



  91. #if defined(STM32F40_41xxx)
  92. //#include "stm32f4xx_cryp.h"
  93. //#include "stm32f4xx_hash.h"
  94. //#include "stm32f4xx_rng.h"
  95. //#include "stm32f4xx_can.h"
  96. #include "stm32f4xx_dac.h"
  97. //#include "stm32f4xx_dcmi.h"
  98. //#include "stm32f4xx_fsmc.h"
  99. #endif /* STM32F40_41xxx */




  100. /* Exported types ------------------------------------------------------------*/
  101. /* Exported constants --------------------------------------------------------*/

  102. /* If an external clock source is used, then the value of the following define
  103.    should be set to the value of the external clock source, else, if no external
  104.    clock is used, keep this define commented */
  105. /*#define I2S_EXTERNAL_CLOCK_VAL   12288000 */ /* Value of the external clock in Hz */


  106. /* Uncomment the line below to expanse the "assert_param" macro in the
  107.    Standard Peripheral Library drivers code */
  108. /* #define USE_FULL_ASSERT    1 */

  109. /* Exported macro ------------------------------------------------------------*/
  110. #ifdef  USE_FULL_ASSERT

  111. /**
  112.   * @brief  The assert_param macro is used for function's parameters check.
  113.   * @param  expr: If expr is false, it calls assert_failed function
  114.   *   which reports the name of the source file and the source
  115.   *   line number of the call that failed.
  116.   *   If expr is true, it returns no value.
  117.   * @retval None
  118.   */
  119.   #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
  120. /* Exported functions ------------------------------------------------------- */
  121.   void assert_failed(uint8_t* file, uint32_t line);
  122. #else
  123.   #define assert_param(expr) ((void)0)
  124. #endif /* USE_FULL_ASSERT */

  125. #endif /* __STM32F4xx_CONF_H */

  126. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
復(fù)制代碼

六,點(diǎn)擊構(gòu)建工程按鈕,編譯工程。(如下圖7所示) Proteus仿真STM32F407ZGT6單線控制lcd2004液晶屏 105147f75it5522iytrq4t.png 圖7七,點(diǎn)擊窗口左下方仿真按鈕,可見(jiàn)lcd2004一線屏和虛擬串口的信息顯示在屏。 (如下圖8,9,10所示) Proteus仿真STM32F407ZGT6單線控制lcd2004液晶屏 105147zymtiism1rkt681i.png 圖8 Proteus仿真STM32F407ZGT6單線控制lcd2004液晶屏 105147yn8zz2nizuw2drsr.png 圖9 Proteus仿真STM32F407ZGT6單線控制lcd2004液晶屏 105148zrbho4mol9b1llb9.png 圖10八,選擇release,點(diǎn)擊構(gòu)建工程按鈕,編譯工程生成Hex文件。(如下圖11所示) Proteus仿真STM32F407ZGT6單線控制lcd2004液晶屏 105148lfd2o27b3l2hz37n.png 圖11
附件在已安裝Proteus8.9的計(jì)算機(jī)文件夾中打開(kāi)即可
stm32_LCD2004單線仿真文件.rar (346.53 KB, 售價(jià): 1 E幣)
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則

手機(jī)版|小黑屋|ELEOK |網(wǎng)站地圖

GMT+8, 2026-5-26 05:11

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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