久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 4974|回復: 2
打印 上一主題 下一主題
收起左側

基于合泰單片機模擬單總線收發數據程序

[復制鏈接]
跳轉到指定樓層
樓主
分享個合泰單片機做的模擬單總線收發數據程序


單片機源程序如下:
  1. /******************************************************************************
  2. ;   This file is a basic template for assembly code for a HT66FXXX. Copy      *
  3. ;   this file into your project directory and modify or add to it as needed.  *
  4. ;                                                                             *
  5. ;   The HT66FXXX architecture allows two interrupt configurations. This       *
  6. ;   template code is written for priority interrupt levels and the IPEN bit   *
  7. ;   in the RCON register must be set to enable priority levels. If IPEN is    *
  8. ;   left in its default zero state, only the interrupt vector at 0x008 will   *
  9. ;   be used and the WREG_TEMP, BSR_TEMP and STATUS_TEMP variables will not    *
  10. ;   be needed.                                                                *
  11. ;                                                                             *
  12. ;   Refer to the HI-IDE3000 User's Guide for additional information on the    *
  13. ;   features of the assembler.                                                *
  14. ;                                                                             *
  15. ;   Refer to the HT66F002 Data Sheet for additional                           *
  16. ;   information on the architecture and instruction set.                      *
  17. ;                                                                             *
  18. ;******************************************************************************
  19. ;    Filename:*******                                                         *
  20. ;    creation time:2018.01.10                                                 *
  21. ;    modification time:                                                       *                        
  22. ;    Author: *********                                                        *
  23. ;                                                                             *
  24. ;******************************************************************************                                   
  25. ;    Files required: HT66F002.INC                                             *  
  26. ;******************************************************************************
  27. ;   notes:
  28. ;*******************************************************************************
  29. ;
  30. ;   Revision History:
  31. ;
  32. ;******************************************************************************
  33. ;        list p=HT66F002;directive to define processor
  34. ;******************************************************************************
  35. ;Configuration bits
  36. ;HOLTEK has changed the format for defining the configuration bits, please
  37. ;see the .inc file for futher details on notation.  Below are a few examples.
  38. ;******************************************************************************/
  39. #define  _HT_66F003_

  40. #ifdef   _HT_66F003_

  41. //#include <HT50F51.h>
  42. #include <HT66F003.h>
  43. #endif

  44. #include "initial.h"
  45. #include "Define.h"
  46. #include "function.h"
  47. #include "switch.h"
  48. #define  _MAIN_
  49. #include "variable.h"
  50. #undef   _MAIN_
  51. //list p=HT50F51;
  52. #pragma rambank0

  53. extern         uchar8    rError_Temp;

  54. #pragma  norambank

  55. void main()
  56. {
  57.     pInit_Port_IO() ;
  58.     ENABLE_ALL_INT_EA() ;
  59.     Usb_Lianjie_OK_F = 0 ;
  60.     while(!F_4S)      // 上電所有燈亮4s,進入主程序
  61.     {
  62.        _clrwdt() ;
  63.        if(F_1MS)
  64.        {
  65.                  F_1MS = 0 ;
  66.                  pTimerAccoutDeal();
  67.                  PTest_Usb_Signal();
  68.        }
  69.        if(F_10MS)
  70.        {
  71.                  F_10MS = 0 ;
  72.                  LED_ALL_ON();
  73.                  Key_Process();
  74.        }               
  75.     }
  76. //    F_Send_Data_Enable = 1 ;
  77.     LED_ALL_OFF();
  78.     PTM1_START() ;
  79. //    Usb_Lianjie_OK_F = 1 ;  
  80.     if(!Usb_Lianjie_OK_F)
  81.     {
  82.        USB_IO_Output_Mode() ;
  83.     }
  84. //***********************main program***********************************************************   
  85.    while(1)       
  86.    {
  87.       _clrwdt() ;
  88.       if(F_1MS)
  89.       {
  90.                 F_1MS = 0 ;
  91.                 pTimerAccoutDeal();
  92.       }
  93.       if(F_10MS)
  94.       {
  95.           F_10MS = 0 ;
  96.           if(!Usb_Lianjie_OK_F)
  97.           {
  98.               pLed_Indicator_Deal();
  99.           }
  100.           Key_Process ();
  101.       }         
  102.    }   
  103. }
復制代碼

所有資料51hei提供下載:
模擬單總線收發源代碼.rar (577.66 KB, 下載次數: 71)



評分

參與人數 1黑幣 +50 收起 理由
admin + 50 共享資料的黑幣獎勵!

查看全部評分

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

使用道具 舉報

沙發
ID:437028 發表于 2018-12-1 11:53 | 只看該作者
不錯的建議程序,希望可以能多多說以
回復

使用道具 舉報

板凳
ID:867090 發表于 2020-12-24 14:47 | 只看該作者
感謝樓主分享,剛好用得上
回復

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規則

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

Powered by 單片機教程網

快速回復 返回頂部 返回列表
主站蜘蛛池模板: 日日夜夜草 | 天天爽一爽 | 成人在线观看黄 | 久久久久国产精品一区二区 | 一区二区中文 | 在线不卡av | 亚洲精品欧洲 | 久久久久久久久中文字幕 | 精品亚洲一区二区三区 | 精品无码久久久久久国产 | 久热精品在线 | 黄色国产大片 | 91精品国产色综合久久 | 国产精品久久在线 | 亚洲精品国产偷自在线观看 | 久久精品国产久精国产 | 欧美精品三区 | 欧美激情在线精品一区二区三区 | 国产一级毛片视频 | 成人av一区二区三区 | 91av亚洲 | 国产精品毛片一区二区三区 | 二区在线观看 | 欧美又大粗又爽又黄大片视频 | 一级国产精品一级国产精品片 | 欧美黄页 | 久久视频精品在线 | 亚洲成人自拍 | 国产在线aa | 久草资源在线 | 免费一看一级毛片 | 欧美视频一区 | 免费观看一区二区三区毛片 | 日韩在线播放中文字幕 | av一区二区三区四区 | 国产91丝袜在线熟 | 亚洲精品综合一区二区 | 欧美日韩国产一区二区三区 | 久久一区二区三区四区 | 在线三级网址 | 少妇午夜一级艳片欧美精品 |