- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
函数声明,变量定义-(Function declaration, variable definition -)
函数声明,变量定义-(Function declaration, variable definition -)
The bird flutters its wings, and the man asks to read first. - flavor
/ / -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- function declarations, variable definitions -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
# include reg51. H
Sbit RE_DE P1 = ^ 0;
# define COUNT 10 / / define the receive buffer size
# define Slaver_NUM 10
Unsigned char bdata flag; / / a flag variable is defined at addressable address
Sbit time_over_flag = flag ^ 0; / / receive timeout flags
Unsigned char buffer (COUNT); / / define the buffer
Unsigned char point; / / define buffer location directives
Unsigned char Slave_AD [Slaver_NUM]; / / define valid address storage area
Unsigned char ADD_num; / / the number of valid addresses
Unsigned char idata count_10ms; / / for how many times 10ms interrupts
Unsigned char idata send_data [7] = {
X32 0 x31, 0, 0 x33, 0 x34, 0 x35, 0 x36, 0 x37}; / / the number of sending data is 7
Void UART_init (); / / the initialization function of the serial port
Void COM_send (void); / / serial port reception function
Unsigned char CLU_checkdata (void); / / calculate the parity function
/ / -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
/ / function name: UART_init () serial port initialization function
/ / function: when the system clock is 11.059 MHZ, the serial port rate is 9600bit/s
/ / serial port receiving interrupt allows, send interrupt ban, set timer interrupt allow
/ / -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Void UART_init ()
{
/ / initialize serial Settings
SCON = 0 x58; / / select the serial port to work in 1, open the receiving permit, TB8 = 1
TMOD = 0 x21; / / timer 1 work in
您可能关注的文档
- 中国石油北京《修井工程》第二阶段在线作业(The second phase of China's oil project in Beijing is online).doc
- 中国石油北京《市场营销学(含实践)》第二次在线作业(China petroleum Beijing marketing (including practice) the second online homework).doc
- 中国石油北京《计算机测控技术》第一阶段在线作业(China petroleum Beijing computer measurement and control technology first stage online homework).doc
- 中国石油北京《机械电气安全技术(含课程设计)》第二阶段在线作业(China petroleum Beijing mechanical electrical safety technology (including course design) second stage online homework).doc
- 中国石油单位 英文名称(The name of the Chinese petroleum company).doc
- 中国美术屎(Chinese art excrement).doc
- 中国航空发动机现状_航空发动机吧_贴吧(The present status of China's aviation engine).doc
- 中国移动以创新打造世界一流企业(China mobile is innovating to build a world-class enterprise).doc
- 中国药科大学2008年《药学综合一》有机化学考试大纲(Chinese pharmaceutical university in 2008 the comprehensive one organic chemistry exam outline).doc
- 中国行政区划记忆口诀(The legend of Chinese administrative division).doc
- 函数索引的使用细节——常数表达式_1(Function index use detail - constant expression _1).doc
- 函数索引的使用细节——常数表达式(Function index use detail - constant expression).doc
- 函数问题总结_1(Function problem summary _1).doc
- 函数问题总结(Function problem summary).doc
- 函数声明,变量定义-_1(Function declaration, variable definition - _1).doc
- 刀具材料的性能与选择__1(Performance of tool materials and selection of __1).doc
- 刀具材料的性能与选择_(Performance and selection of tool materials).doc
- 分光度法_1(spectrophotometry).doc
- 分光度法(Points photometric method).doc
- 分子光谱基础_1(Molecular spectrum base _1).doc
最近下载
- 邮储银行柜员培训课件.pptx VIP
- 2025年浙能集团甘肃有限公司、新能源项目(第二批)招聘17人笔试备考题库及答案解析.docx VIP
- 通威新员工入职培训第一次考试.docx VIP
- 2025广西专业技术人员公需科目培训考试答案(87分);广西“一区两地一园一通道”建设;人工智能时代(1).pdf VIP
- 入学证明怎么写(模板).docx VIP
- GBT 11345-2023 焊缝无损检测 超声检测 技术、检测等级和评定.pdf VIP
- 2025年浙能集团甘肃有限公司、新能源项目(第二批)招聘17人笔试参考题库附答案解析.docx VIP
- 解读《GB_T 44770-2024智能火电厂技术要求》全面解读.docx VIP
- 西安研学旅行策划书3篇.pdf VIP
- 建筑工程识图课件-建筑识图与构造课件.ppt VIP
文档评论(0)