第五章 Keil C51库函数参考 C51强大功能及其高效率的重要体现之一在于其丰富的可直接调用的库函数,多使用库函数使程序代码简单,结构清晰,易于调试和维护,下面介绍C51的库函数系统。 1. 第一节 本征库函数(intrinsic routines)和非本征证库函数 C51提供的本征函数是指编译时直接将固定的代码插入当前行,而不是用ACALL和LCALL语句来实现,这样就大大提供了函数访问的效率,而非本征函数则必须由ACALL及LCALL调用。 C51的本征库函数只有9个,数目虽少,但都非常有用,列如下: _crol_,_cror_:将char型变量循环向左(右)移动指定位数后返回 _iror_,_irol_:将int型变量循环向左(右)移动指定位数后返回 _lrol_,_lror_:将long型变量循环向左(右)移动指定位数后返回 _nop_: 相当于插入NOP _testbit_: 相当于JBC bitvar测试该位变量并跳转同时清除。 _chkfloat_: 测试并返回源点数状态。 使用时,必须包含#inclucle 一行。 如不说明,下面谈到的库函数均指非本征库函数
上传时间: 2013-10-19
上传用户:1184599859
现有基于MAX7219芯片的数码管驱动电路只适用于小尺寸LED,为扩展其使用范围,在介绍动态显示芯片MAX7219功能的基础上,提出了一个基于该芯片的8位高亮度8英寸数码管驱动电路。电路保留了MAX7219芯片的功能强大、编程简单等优点,通过74LS273锁存器和ULN2803达林顿驱动器,实现了对任意大尺寸数码管提供较高电压和电流驱动的静态显示,并亮度可调。 Abstract: The existing display-driving circuit based on MAX7219 was only applicable to small-size LED. To expand its use, based on the function introduction of dynamic display chip MAX7219, a display-driving circuit for high-brightness 8-bit LED with the size of 8-inch was proposed. The advantages of MAX7219 were retained, such as powerful function and simple programming. Static display with adjustable brightness for large-size LED with higher voltage and current was achieved with the help of 74LS273 and ULN2803.
上传时间: 2013-10-23
上传用户:31633073
#ifndef __485_C__ #define __485_C__ #include #include #define unsigned char uchar #define unsigned int uint /* 通信命令 */ #define __ACTIVE_ 0x01 // 主机询问从机是否存在 #define __GETDATA_ 0x02 // 主机发送读设备请求 #define __OK_ 0x03 // 从机应答 #define __STATUS_ 0x04 // 从机发送设备状态信息 #define __MAXSIZE 0x08 // 缓冲区长度 #define __ERRLEN 12 // 任何通信帧长度超过12则表示出错 uchar dbuf[__MAXSIZE]; // 该缓冲区用于保存设备状态信息 uchar dev; // 该字节用于保存本机设备号 sbit M_DE = P1^0; // 驱动器使能,1有效 sbit M_RE = P1^1; // 接收器使能,0有效
上传时间: 2014-12-26
上传用户:604759954
设计一种基于P89V51RD2的功率因数测量仪,采用光电隔离器和专用数码管驱动器。该测量仪是以增强型单片机P89V51RD2为核心,大大简化系统硬件设计。而软件部分采用模块化设计思想,采用中值滤波和小数补偿算法,实现功率因数的高精度测量。实验测试表明,该功率因数测量仪测量精度高,运行稳定可靠。 Abstract: A power-factor measurement instrument based on P89V51RD2is designed,which uses optical coupler and specific LED drive chip.The power factor measurement instrument uses P89V51RD2as a core of which greatly simplifies the system design.Furthermore,modularization software is developed in detail.The high precision power-factor measuring system is realized by the center value filter and fractional compensation algorithm.Experiments manifests that the power- factor measurement instrument is high precision,steady and reliable.
上传时间: 2014-12-27
上传用户:CHINA526
概述 P89LPC915/916/917是一款低成本的14脚和16脚单片微控制器。它们采用高性能的处理器结构,指令执行时间只需2到4个时钟周期。6倍于标准80C51器件。P89LPC915/916/917集成了许多系统级的功能,这样可大大减少元件的数目和电路板面积并降低系统的成本。
上传时间: 2013-10-27
上传用户:喵米米米
The PCF8578 is a low power CMOS1 LCD row and column driver, designed to drive dotmatrix graphic displays at multiplex rates of 1:8, 1:16, 1:24 or 1:32. The device has40 outputs, of which 24 are programmable and configurable for the following ratios ofrows/columns: 32¤8, 24¤16, 16¤24 or 8¤32. The PCF8578 can function as a stand-alone LCDcontroller and driver for use in small systems. For larger systems it can be used inconjunction with up to 32 PCF8579s for which it has been optimized. Together these twodevices form a general purpose LCD dot matrix driver chip set, capable of driving displaysof up to 40960 dots. The PCF8578 is compatible with most microcontrollers andcommunicates via a two-line bidirectional bus (I2C-bus). Communication overhead isminimized by a display RAM with auto-incremented addressing and display bankswitching.
上传时间: 2013-10-23
上传用户:顶得柱
PCF8562是一种能与几乎所有低复用速率的LCD接口的外围设备。它为所有静态和复合的LCD(包含最多4个背极和32段)产生驱动信号。PCF8562与大多数微处理器/微控制器兼容并可以通过两线双向的I2C总线通信。通过带自动增量寻址的显示RAM、硬件子地址寻址和显示存储器切换(静态和复合驱动模式)可以将通信的开销降至最低。
上传时间: 2014-12-27
上传用户:ajaxmoon
1 FEATURES· Single chip LCD controller/driver· 1 or 2-line display of up to 24 characters per line, or2 or 4 lines of up to 12 characters per line· 5 ′ 7 character format plus cursor; 5 ′ 8 for kana(Japanese syllabary) and user defined symbols· On-chip:– generation of LCD supply voltage (external supplyalso possible)– generation of intermediate LCD bias voltages– oscillator requires no external components (externalclock also possible)· Display data RAM: 80 characters· Character generator ROM: 240 characters· Character generator RAM: 16 characters· 4 or 8-bit parallel bus or 2-wire I2C-bus interface· CMOS/TTL compatible· 32 row, 60 column outputs· MUX rates 1 : 32 and 1 : 16· Uses common 11 code instruction set· Logic supply voltage range, VDD - VSS: 2.5 to 6 V· Display supply voltage range, VDD - VLCD: 3.5 to 9 V· Low power consumption· I2C-bus address: 011101 SA0.
上传时间: 2013-11-08
上传用户:laozhanshi111
概述 P89LPC932A1是一款单片封装的微控制器,适合于许多要求高集成度、低成本的场合。可以满足多方面的性能要求。P89LPC932A1采用了高性能的处理器结构,指令执行时间只需2到4个时钟周期。6倍于标准80C51器件。P89LPC932A1集成了许多系统级的功能,这样可大大减少元件的数目、电路板面积以及系统的成本。
上传时间: 2014-12-27
上传用户:caoyuanyuan1818
力源可提供ON、TI、ST、Freescale和Chipswinner公司的优质功率器件,包括MOSFET驱动器、外设起动器/驱动器、功率逻辑、电机控制器、功率因子控制器、达林顿晶体管整列、钳位电路和虚地发生器等。
标签: 功率器件
上传时间: 2014-12-27
上传用户:zfyiaaa