标题:
基于合泰单片机模拟单总线收发数据程序
[打印本页]
作者:
yyh050186
时间:
2018-8-19 15:12
标题:
基于合泰单片机模拟单总线收发数据程序
分享个合泰单片机做的模拟单总线收发数据程序
0.png
(6.65 KB, 下载次数: 39)
下载附件
2018-8-19 17:19 上传
单片机源程序如下:
/******************************************************************************
; This file is a basic template for assembly code for a HT66FXXX. Copy *
; this file into your project directory and modify or add to it as needed. *
; *
; The HT66FXXX architecture allows two interrupt configurations. This *
; template code is written for priority interrupt levels and the IPEN bit *
; in the RCON register must be set to enable priority levels. If IPEN is *
; left in its default zero state, only the interrupt vector at 0x008 will *
; be used and the WREG_TEMP, BSR_TEMP and STATUS_TEMP variables will not *
; be needed. *
; *
; Refer to the HI-IDE3000 User's Guide for additional information on the *
; features of the assembler. *
; *
; Refer to the HT66F002 Data Sheet for additional *
; information on the architecture and instruction set. *
; *
;******************************************************************************
; Filename:******* *
; creation time:2018.01.10 *
; modification time: *
; Author: ********* *
; *
;******************************************************************************
; Files required: HT66F002.INC *
;******************************************************************************
; notes:
;*******************************************************************************
;
; Revision History:
;
;******************************************************************************
; list p=HT66F002;directive to define processor
;******************************************************************************
;Configuration bits
;HOLTEK has changed the format for defining the configuration bits, please
;see the .inc file for futher details on notation. Below are a few examples.
;******************************************************************************/
#define _HT_66F003_
#ifdef _HT_66F003_
//#include <HT50F51.h>
#include <HT66F003.h>
#endif
#include "initial.h"
#include "Define.h"
#include "function.h"
#include "switch.h"
#define _MAIN_
#include "variable.h"
#undef _MAIN_
//list p=HT50F51;
#pragma rambank0
extern uchar8 rError_Temp;
#pragma norambank
void main()
{
pInit_Port_IO() ;
ENABLE_ALL_INT_EA() ;
Usb_Lianjie_OK_F = 0 ;
while(!F_4S) // 上电所有灯亮4s,进入主程序
{
_clrwdt() ;
if(F_1MS)
{
F_1MS = 0 ;
pTimerAccoutDeal();
PTest_Usb_Signal();
}
if(F_10MS)
{
F_10MS = 0 ;
LED_ALL_ON();
Key_Process();
}
}
// F_Send_Data_Enable = 1 ;
LED_ALL_OFF();
PTM1_START() ;
// Usb_Lianjie_OK_F = 1 ;
if(!Usb_Lianjie_OK_F)
{
USB_IO_Output_Mode() ;
}
//***********************main program***********************************************************
while(1)
{
_clrwdt() ;
if(F_1MS)
{
F_1MS = 0 ;
pTimerAccoutDeal();
}
if(F_10MS)
{
F_10MS = 0 ;
if(!Usb_Lianjie_OK_F)
{
pLed_Indicator_Deal();
}
Key_Process ();
}
}
}
复制代码
所有资料51hei提供下载:
模拟单总线收发源代码.rar
(577.66 KB, 下载次数: 71)
2018-8-19 15:12 上传
点击文件名下载附件
下载积分: 黑币 -5
作者:
正辉照明
时间:
2018-12-1 11:53
不错的建议程序,希望可以能多多说以
作者:
jess_jing
时间:
2020-12-24 14:47
感谢楼主分享,刚好用得上
欢迎光临 (http://www.51hei.com/bbs/)
Powered by Discuz! X3.1