#include<reg51.h> //包含单片机寄存器的头文件 /******************************************************* 函数功能:主函数 (C 语言规定必须有也只能有1 个主函数) ********************************************************/ void Main(void) { while(1) //无限循环 { P1=0xff; // P1=1111 1111B,熄灭LED P0=P1; // 将 P1 口状态送入P0 口 P2=P1; // 将 P1 口状态送入P2 口 P3=P1; // 将 P1 口状态送入P3 口
上传时间: 2013-10-26
上传用户:离殇
一、 Main.c(35): warning: #128-D: loop is not reachable from preceding code 原因,前面有一个while(1){ …….} 二、 Main.c(54): warning: #1-D: last line of file ends without a newline 少了一个回车在}之后
上传时间: 2014-12-26
上传用户:sjb555
实时时钟是微机保护装置的重要部件,在讨论PCF8583结构与功能的基础上,提出采用dsPIC33F系列微处理器与串行I2C时钟PCF8583的接口设计方案,给出了相应的接口电路与软件流程。该设计方案结构简单,可靠性高,开发周期短,具有一定的实用与参考价值。所设计的微机保护装置已投入现场运行,效果良好。 Abstract: Real-time clock chip is an important part in microcomputer protection device.Based on discussing the structure and function of PCF8583,a new interface scheme which uses dsPIC33F microprocessor and serial clock chip(I2C)PCF8583is proposed.The method of the circuit design and the Main software flow are introduced in this paper.The scheme has simple structure,higher reliability and shorter exploitation cycle,so has definite practicality or reference value.The microcomputer protection device has been put into operation with better effects.
上传时间: 2013-11-18
上传用户:Thuan
详细介绍了PCI9052接口器件的功能、结构和使用方法,并结合实际给出了基于PCI9052器件开发PCI总线接口卡的应用实例。 Abstract: The Main functions,structures and usage of PCI9052inferface chip are introduced in detail in this paper.And an application example of designing PCI bus interface card based on PCI9052is proposed in this paper.
上传时间: 2013-10-16
上传用户:togetsomething
介绍基于ISA总线与KH-9300的数据采集板卡的设置,详细说明8254定时计数器及8259中断控制器的结构特点、工作方式、控制字等,探讨中断类型、中断处理程序、中断矢量表及其填写。重点讲述使用TorboC编写中断服务程序的方法,应注意的主要问题及程序测试的结果。 Abstract: The settings of KH-9300 data acquisition board based on the ISA bus is introduced,the structural characteristics,working methods,control characters of the timing counter 8254 and interruptioncontroller 8259 are explained in detail.The interruption type,interrupt handling programs,interruption vector table and its filling also are discussed.Further,great emphasis is put on the method of interrupt service program compiled by Torbo C,the Main issues that should be noted,and the results of program testing.
上传时间: 2013-11-14
上传用户:qq527891923
介绍一种采用单片机技术和基站器件EM4095的手持式低频RFID读卡器方案。首先对整个系统框架进行说明,然后介绍主要功能模块的设计,给出了各模块的原理图。重点描述了基站器件EM4095的性能参数和功能原理,最后描述了该系统的主程序流程图。 Abstract: In this paper,a handheld RFID reader based on MCU and EM4095 is introduced.At first,the configuration of this system is explained.Then the design of Main modules and schematic documents are particularly presented.The parameters and principle of the chip EM4095 are introduced in detail. At last,the Main software flow is given
上传时间: 2013-10-18
上传用户:windypsm
阐述了一个由上位PC机和AT89C52下位单片机组成的主从分布式温度巡回检测系统。主从机采用RS-485 串行通讯标准进行通信,可在下位单片机实现基本的温度数据巡回检测基础上,由上位PC机实现综合处理功能或扩展为远程操作。整个系统具有巡检速度快,扩展性好的特点。 Abstract: In this paper,a top PC and AT89C52 under-bit microcontrollers from the Main component of the tour distributed temperature detection system is presented. Master and slave can use RS-485 serial communication standards for communications.Based on next-bit machine for basic goods temperature detected data Tour, the top can achieve the integrated treatment of PC functions or for the expansion of long-distance operation. The entire inspection system is fast, expansion.
上传时间: 2013-10-13
上传用户:zhoujunzhen
在开放式数控系统结构模型的基础上,研究了基于ISA总线的DSP通信控制原理。采用中断方式完成了PC机和DSP之间的通信。介绍了以DriverWorks为工具开发ISA设备WDM驱动程序的方法,探讨了中断处理、驱动程序与应用程序之间的通信,简要说明了驱动程序的安装与调试。通过调试,系统设计运行稳定。 Abstract: The ISA bus and DSP correspondence control principle is investigated in the basis of the existing open architecture numerical control system.The interrupt method is used to realize the communication between PC and DSP based on the ISA bus.The methods of WDM driver exploitation for ISA device using Driver Works are introduced.The Main process of driver program and the keys such as handle interrupt and the communication between the drivers and application are presented.And how to debug and install the drive is explained.
上传时间: 2013-11-04
上传用户:kang1923
介绍了一种基于AT89S52微处理器、键控显示模式、多汉字显示的显示模块设计方法。对AT89S52的内部功能及使用高128字节RAM时的寻址方式进行说明。给出了四汉字显示模块的硬件电路原理图、主程序流程图以及中断显示流程图。 Abstract: The design method of display module base on the AT89S52 microcontroller,display mode controlled by keyboard and? showing several Chinese characterses are introduced in the paper.The internal function and the addressing mode for the high 128B RAM of the AT89S52 are explained.The basic circuit diagram,the Main program flow chart and the display interrupt flow chart of four Chinese characterses display module are also given.
上传时间: 2014-01-23
上传用户:咔乐坞
为了解决磁放大器性能测试过程中,需要对其供给不同数值恒定电流的问题,设计了一种基于DAC7512和单片机的数控恒流源系统。该系统采用AT89C51作为主控器件,将计算机发送的电流控制字命令转换为D/A转换器控制字,通过模拟SPI通信接口,写D/A控制字到DAC7512,从而控制其输出相应数字电压值,经差动缩放电路、电压/电路变换电路和功率驱动电路,最后输出恒定电流。实验结果表明,恒流源输出电流调节范围为-45~+45 mA、精度为±0.1 mA,分辨率达0.024 4 mA,具有应用灵活,外围电路简单,可靠性高的特点。该数控直流恒流源也可为相关产品的测试系统研发提供参考。 Abstract: In order to solve the need to supply different values constant current for the magnetic amplifier in testing process, numerical control constant current source system was designed based on DAC7512 chip and microcontroller technology. The system used the AT89C51 as the Main chip, which can convert the current control word from computer into to D/A control words. And the system wrote D/A control word into the DAC7512 chip to control the output voltage value by the SPI communication interface, which can output corresponding constant current figures by scaling circuit, the V/I converter and power drive circuit. Experimental results show that the current source output current adjustment range is -45~+45mA, accuracy is ± 0.1mA, and resolution ratio is 0.024 4mA
上传时间: 2014-12-27
上传用户:invtnewer