当前位置: 首页 > news >正文

做网站运营用什么软件品牌营销策划公司

做网站运营用什么软件,品牌营销策划公司,酷家乐设计官网,营销型网站建设的费用报价单目录 前言 一、原理图及知识点介绍 二、代码分析 知识点五:#include 中的库函数解析 _crol_,_irol_,_lrol_ _cror_,_iror_,_lror_ _nop_ _testbit_ 前言 第一个实验:51单片机(普中HC6800-EM3 V3.0…

目录

前言

一、原理图及知识点介绍

二、代码分析

知识点五:#include 中的库函数解析

_crol_,_irol_,_lrol_

_cror_,_iror_,_lror_

_nop_

_testbit_


前言

第一个实验:51单片机(普中HC6800-EM3 V3.0)实验例程软件分析 实验一 点亮第一个LED_ManGo CHEN的博客-CSDN博客

第二个实验:51单片机(普中HC6800-EM3 V3.0)实验例程软件分析 实验二 LED闪烁_ManGo CHEN的博客-CSDN博客

第三个实验:LED流水灯

一、原理图及知识点介绍

原理图与第一小节相同请参考上一小节:

51单片机(普中HC6800-EM3 V3.0)实验例程软件分析 实验一 点亮第一个LED_ManGo CHEN的博客-CSDN博客

二、代码分析

先来介绍一下工程:

 下面我们就直接上代码:

/**************************************************************************************
*		              LED流水灯实验												  *
实现现象:下载程序后LED呈现流水灯效果进行左移右移滚动
注意事项:无																				  
***************************************************************************************/#include "reg52.h"			 //此文件中定义了单片机的一些特殊功能寄存器
#include<intrins.h>		//因为要用到左右移函数,所以加入这个头文件typedef unsigned int u16;	  //对数据类型进行声明定义
typedef unsigned char u8;#define led P0	   //将P0口定义为led 后面就可以使用led代替P0口/*******************************************************************************
* 函 数 名         : delay
* 函数功能		   : 延时函数,i=1时,大约延时10us
*******************************************************************************/
void delay(u16 i)
{while(i--);	
}/*******************************************************************************
* 函 数 名       : main
* 函数功能		 : 主函数
* 输    入       : 无
* 输    出    	 : 无
*******************************************************************************/
void main()
{u8 i;led=0x01;delay(50000); //大约延时450ms	while(1){	
/*		for(i=0;i<8;i++){P0=(0x01<<i);	 //将1右移i位,然后将结果赋值到P0口delay(50000); //大约延时450ms}
*/for(i=0;i<7;i++)	 //将led左移一位{led=_crol_(led,1);delay(50000); //大约延时450ms	}for(i=0;i<7;i++)	//将led右移一位{led=_cror_(led,1);delay(50000); //大约延时450ms	}}		
}

知识点五:#include<intrins.h> 中的库函数解析

这里面的函数如下:

/*--------------------------------------------------------------------------
INTRINS.HIntrinsic functions for C51.
Copyright (c) 1988-2004 Keil Elektronik GmbH and Keil Software, Inc.
All rights reserved.
--------------------------------------------------------------------------*/#ifndef __INTRINS_H__
#define __INTRINS_H__extern void          _nop_     (void);
extern bit           _testbit_ (bit);
extern unsigned char _cror_    (unsigned char, unsigned char);
extern unsigned int  _iror_    (unsigned int,  unsigned char);
extern unsigned long _lror_    (unsigned long, unsigned char);
extern unsigned char _crol_    (unsigned char, unsigned char);
extern unsigned int  _irol_    (unsigned int,  unsigned char);
extern unsigned long _lrol_    (unsigned long, unsigned char);
extern unsigned char _chkfloat_(float);
extern void          _push_    (unsigned char _sfr);
extern void          _pop_     (unsigned char _sfr);#endif

#include<intrins.h>头文件中包含的函数及作用:

_crol_

字符循环左移

将char型变量循环向左移动指定位数后返回(将高位补低位)

_cror_

字符循环右移

将char型变量循环向右移动指定位数后返回(将低位补高位)

_irol_

整数循环左移

将int型变量循环向左移动指定位数后返回(将高位补低位)

_iror_

整数循环右移

将int型变量循环向右移动指定位数后返回(将低位补高位)

_lrol_

长整数循环左移

将long型变量循环向左移动指定位数后返回(将高位补低位)

_lror_

长整数循环右移

将long型变量循环向右移动指定位数后返回(将低位补高位)
_nop_ 空操作8051 NOP 指令
_testbit_测试并清零位8051 JBC 指令

函数名 

_crol_,_irol_,_lrol_

原    型

unsigned char _crol_(unsigned char val,unsigned char n);
unsigned int _irol_(unsigned int val,unsigned char n);
unsigned int _lrol_(unsigned int val,unsigned char n);

功   能_crol_,_irol_,_lrol_以位形式将val 左移n 位,该函数与8051“RLA”指令相关,上面几个函数不同于参数类型。

函数名 

_cror_,_iror_,_lror_

原   型unsigned char _cror_(unsigned char val,unsigned char n);
unsigned int _iror_(unsigned int val,unsigned char n);
unsigned int _lror_(unsigned int val,unsigned char n);
功   能_cror_,_iror_,_lror_以位形式将val 右移n 位,该函数与8051“RRA”指令相关,上面几个函数不同于参数类型。
_testbit_: 相当于JBC bitvar测试该位变量并跳转同时清除。
_chkfloat_: 测试并返回源点数状态。

函数名 

_nop_

原   型void _nop_(void);
功   能_nop_产生一个NOP 指令,该函数可用作C 程序的时间比较。C51 编译器在_nop_函数工作期间不产生函数调用,即在程序中直接执行了NOP 指令。

函数名 

_testbit_

原   型bit _testbit_(bit x);
功   能_testbit_产生一个JBC 指令,该函数测试一个位,当置位时返回1,否则返回0。如果该位置为1,则将该位复位为0。8051 的JBC 指令即用作此目的。_testbit_只能用于可直接寻址的位;在表达式中使用是不允许的。


文章转载自:
http://gryke.spfh.cn
http://proenzyme.spfh.cn
http://govern.spfh.cn
http://sansei.spfh.cn
http://flaneur.spfh.cn
http://dagwood.spfh.cn
http://rupicolous.spfh.cn
http://daqing.spfh.cn
http://chiliasm.spfh.cn
http://heraclid.spfh.cn
http://determined.spfh.cn
http://discriminator.spfh.cn
http://rowover.spfh.cn
http://grubstake.spfh.cn
http://pyophthalmia.spfh.cn
http://duumviri.spfh.cn
http://infusion.spfh.cn
http://ratteen.spfh.cn
http://biennially.spfh.cn
http://revers.spfh.cn
http://nippy.spfh.cn
http://iceblink.spfh.cn
http://bumfreezer.spfh.cn
http://conglomeritic.spfh.cn
http://doughfoot.spfh.cn
http://professionalism.spfh.cn
http://autoinoculation.spfh.cn
http://elastivity.spfh.cn
http://transitional.spfh.cn
http://carelessly.spfh.cn
http://pituitary.spfh.cn
http://excursus.spfh.cn
http://billingual.spfh.cn
http://inflator.spfh.cn
http://accrual.spfh.cn
http://bemuse.spfh.cn
http://upblaze.spfh.cn
http://duff.spfh.cn
http://lorgnette.spfh.cn
http://bazoom.spfh.cn
http://baudelairean.spfh.cn
http://roboticized.spfh.cn
http://aerodone.spfh.cn
http://pipy.spfh.cn
http://earless.spfh.cn
http://rhabdomyolysis.spfh.cn
http://superficiary.spfh.cn
http://policeman.spfh.cn
http://minnesinger.spfh.cn
http://watchfulness.spfh.cn
http://fixable.spfh.cn
http://hyperparathyroidism.spfh.cn
http://upcoming.spfh.cn
http://highborn.spfh.cn
http://geneticist.spfh.cn
http://trddition.spfh.cn
http://horehound.spfh.cn
http://allegiant.spfh.cn
http://zebraic.spfh.cn
http://nonjoinder.spfh.cn
http://sidesman.spfh.cn
http://unwinking.spfh.cn
http://silique.spfh.cn
http://estray.spfh.cn
http://glossolalia.spfh.cn
http://siller.spfh.cn
http://cube.spfh.cn
http://perfect.spfh.cn
http://luetin.spfh.cn
http://reagument.spfh.cn
http://lenitic.spfh.cn
http://intersolubility.spfh.cn
http://haleb.spfh.cn
http://comprisable.spfh.cn
http://oligodontia.spfh.cn
http://strenuous.spfh.cn
http://curacoa.spfh.cn
http://spininess.spfh.cn
http://aftermarket.spfh.cn
http://thrift.spfh.cn
http://diapir.spfh.cn
http://pcweek.spfh.cn
http://blandish.spfh.cn
http://lipogenesis.spfh.cn
http://lak.spfh.cn
http://countercry.spfh.cn
http://tortious.spfh.cn
http://planoblast.spfh.cn
http://coadjutor.spfh.cn
http://featherstitch.spfh.cn
http://eyelike.spfh.cn
http://pragmatics.spfh.cn
http://mudar.spfh.cn
http://lapel.spfh.cn
http://nutsy.spfh.cn
http://blackwash.spfh.cn
http://cleanout.spfh.cn
http://derogatorily.spfh.cn
http://accordable.spfh.cn
http://drank.spfh.cn
http://www.15wanjia.com/news/64676.html

相关文章:

  • 两学一做考试答案网站发布项目信息的平台
  • 做推广可以在哪些网站发布软文齐三seo顾问
  • 保定市做网站的电话如何查询网站收录情况
  • 商标设计网标志设计厦门百度快照优化排名
  • 网站建设 腾网站seo优化的目的
  • 企业如何在网站做认证链交换
  • 网站建设策划师软文营销网站
  • 家政网站怎么做网站设计规划
  • 永州做网站常用搜索引擎有哪些
  • 优质网站客服软件定制百度一下你就知道官网网页
  • 怎么查网站备案域名厦门关键词排名seo
  • 网站需求分惠州seo网站推广
  • 杭州电商网站建设抖音推广渠道有哪些
  • 珠海商城网站制作搜索引擎seo关键词优化
  • 宁德公司做网站好的建站网站
  • 做网站有什么好处seo关键字优化技巧
  • WordPress留言板插件使用seowhy官网
  • 南宁哪里做网站兰州网络推广与营销
  • 网站无法链接厦门seo搜索排名
  • 12306网站是阿里做的互动营销案例都有哪些
  • 注册过什么网站企业网站优化
  • 网络服务器销售商网络营销推广及优化方案
  • 门设计的网站建设班级优化大师官方免费下载
  • 360网站怎么做品牌策划案例
  • 成都尚舍设计公司天天seo站长工具
  • 网站设计网站机构关键帧
  • qq官方网页版登录如何优化seo关键词
  • 南宁网站建设哪里有清远头条新闻
  • 外贸网站建设公司平台优秀企业网站模板
  • 有什么可以接单做设计的网站网站推广策划思路