標(biāo)題: 使用中穎MCU SH79F6441設(shè)計(jì)的按鍵計(jì)數(shù)器程序與原理圖 [打印本頁(yè)]

作者: zsw3721    時(shí)間: 2021-9-23 16:33
標(biāo)題: 使用中穎MCU SH79F6441設(shè)計(jì)的按鍵計(jì)數(shù)器程序與原理圖
* MCU型號(hào):中穎SH79F6441
* 計(jì)數(shù)范圍0~999
* 按鍵1計(jì)數(shù)值加1,按鍵2復(fù)位
* 1位共陽(yáng)數(shù)碼管顯示計(jì)數(shù)值,當(dāng)計(jì)數(shù)值有兩位及以上數(shù)字時(shí),數(shù)碼管分時(shí)循環(huán)顯示各位數(shù)字

實(shí)物圖:



原理圖:


main.c 單片機(jī)程序:(項(xiàng)目文件見(jiàn)附件)

  1. /**********************************************************/
  2. /* 項(xiàng)目名稱(chēng):計(jì)數(shù)器 SH79F6441 + 數(shù)碼管                    */
  3. /* 功    能:實(shí)現(xiàn)0~999按鍵計(jì)數(shù),一位數(shù)碼管循環(huán)顯示計(jì)數(shù)值  */
  4. /*           計(jì)數(shù)鍵按一次加1,復(fù)位鍵清0                   */
  5. /* 作    者:Steven Zhang                                 */
  6. /* 版    本:V1.0  2021.9.17                              */
  7. /**********************************************************/

  8. #include "SH79F6441.h"
  9. #include "main.h"
  10. #include "Init.h"
  11. #include "Key.h"
  12. #include "Display.h"
  13. #include <intrins.h>

  14. unsigned int countvalue,Scan_position;
  15. unsigned char ucTimer0Cnt;
  16. bit bQuartersecondFlg;

  17. //bit bTimerFlg=1;
  18. //bit bHalfHzFlg;
  19. //bit b2HzFlg;


  20. void main(void)
  21. {
  22.         Init();
  23.         while(1)
  24.         {
  25.                 Key_process();
  26.                 Display();
  27.         }
  28. }
復(fù)制代碼

51hei.png (12.24 KB, 下載次數(shù): 171)

51hei.png

計(jì)數(shù)器 V1.0.rar

57.46 KB, 下載次數(shù): 21, 下載積分: 黑幣 -5


作者: SURUBU1976    時(shí)間: 2022-9-21 11:12
中穎要用專(zhuān)用的下載器?
作者: ddh112    時(shí)間: 2023-4-17 13:50
SURUBU1976 發(fā)表于 2022-9-21 11:12
中穎要用專(zhuān)用的下載器?

是的,中穎有自己的下載器




歡迎光臨 (http://www.torrancerestoration.com/bbs/) Powered by Discuz! X3.1