采用C代码编写的8位LED流水灯程序,附件是用PROTEUS设计的仿真电路工程,直接可以使用。请用Proteus 8以上版本。下面是验证好的源代码,供大家参考学习:------------------------------------------#include <reg51.h>void main(){LED;t0,t1,t2,t3,t4,t5,t6,t7;LED=P1;P1=0xFF;while(10){P1=0xFE;for(t0=10;t0<25000;t0++){;}P1=0xFD;for(t1=0;t1<25000;t1--) {;}P1=0xFB;for(t2=0;t2<25000;t2++) {;}P1=0xF7;for(t3=0;t3<25000;t3--) {;}P1=0xEF;for(t4=0;t4<25000;t4++) {;}P1=0xDF;for(t5=0;t5<25000;t5--){;}P1=0xBF;for(t6=0;t6<25000;t6++){;}P1=0x7F;for(t7=0;t7<25000;t7++){;}P1=0xBF;for(t6=0;t6<25000;t6++){;}P1=0xDF;for(t5=0;t5<25000;t5++){;}P1=0xEF;for(t4=0;t4<25000;t4++) {;}P1=0xF7;for(t3=0;t3<25000;t3++) {;}P1=0xFB;for(t2=0;t2<25000;t2++) {;}P1=0xFD;for(t1=0;t1<25000;t1++){;}P1=0xFE;}} ----------------------------------------------------
上传时间: 2022-06-09
上传用户:zhanglei193
应广单片机 MINI-C编程指南.Mini-c总结文档一、缺点:(一)函数不能带参数.解决方法:通过A或全局变量进行参数传递;(二)不能使用for循环解决方法:用while循环代替for循环.(三)数组和指针功能弱化解决方法:① 使用rom查表② 使用ram查表(四)不支持全局变量定义同时进行初始化解决方法: 在初始化的时候记得对全局变量进行初始化. (五)Bit变量只支持写入0,或1,不支持直接bit变量取反解决方法 :if(uBitFlag){ uBitFlag=0;}Else{ uBitFlag=1; } 二、优点:(一)函数不带参数,可以节省堆栈空间(二)支持ROM查表(三).delay时间非常准确,无需手工计算(四)支持bit变量,节省ram空间,支持字,字节拆分.(五)烧录支持滚动码写入.(六)端口配置可以使用脚本(七) 代码自动生成
标签: 单片机
上传时间: 2022-06-17
上传用户:
le flows through MOS channel while Ih flows across PNP transistor Ih= a/(1-a) le, IE-le+lh=1/(1-a)' le Since IGBT has a long base PNP, a is mainly determined by ar si0 2ar= 1/cosh(1/La), La: ambipolar diff length a-0.5 (typical value)p MOSFET channel current (saturation), le=U"Cox"W(2"Lch)"(Vc-Vth)le Thus, saturated collector current Ic, sat=1/(1-a)"le=-1/(1-a)"UCox"W/(2Lch)"(Vo-Vth)2Also, transconductance gm, gm= 1/(1-a)"u' Cox W/Lch*(Vo-Vth)Turn-On1. Inversion layer is formed when Vge>Vth2. Apply positive collector bias, +Vce3. Electrons flow from N+ emitter to N-drift layer providing the base current for the PNP transistor4. Since J1 is forward blased, hole carriers are injected from the collector (acts as an emitter).5. Injected hole carriers exceed the doping level of N-drift region (conductivity modulation). Turn-Off1. Remove gate bias (discharge gate)2. Cut off electron current (base current, le, of pnp transistor)
标签: igbt
上传时间: 2022-06-20
上传用户:wangshoupeng199
摘要:本文在分析1GBT的动态开关特性和过流状态下的电气特性的基础上,通过对常规的IGBT推挽驱动电路进行改进,得到了具有良好过流保护特性的IGBT驱动电路。该电路简单,可靠,易用,配合DSP等控制芯片能达到很好的驱动效果Abstract:Based on the studies on the dynamic switching and over-current characteristics of IGBT,this paper makes some improvments to the original push-pull driving circuit,obtains a new IGBT driving circuit which has a good over-current protection function.The circuit is simple,reliable and easy to use.Combined with controlling chips such as DSP it will do a great job in driving applications.关键词:IBGT:开关特性;驱动;过流保护;Key Words:IGBT;switching characteristics;driving:over-current protection
上传时间: 2022-06-21
上传用户:
Legal Disclaimer Lenze Semiconductor reserves the right to make changes without further notice to any products herein to improve reliability, function or design. Lenze Semiconductor disclaims any and all liability for any errors, inaccuracies or incompleteness contained herein or in any other disclosure relating to any product.Lenze Semiconductor does not assume any liability arising out of the application or use of any product or circuit described herein; neither does it convey any license under its patent rights, nor the rights of others The products shown herein are not designed for use in medical, life-saving, or life-sustaining applications. Customers using or selling Lenze Semiconductor products not expressly indicated for use in such applications do so entirely at their own risk and agree to fully indemnify Lenze Semiconductor for any damages arising or resulting from such use or sale.
上传时间: 2022-06-25
上传用户:
程序:LCD12664液晶显示原理unsigned int/W/图形编码,也可以把图形代码存为头文件。该程序经过调试。PROTEUS原理图见截图unsigned char code table1[][64]={/*-调入了一幅图像:D:\Desktop\新建文件夹(2)l.bmp--*//*-宽度x高度=128×64一*材0x00,0×00,0×00,0×00,0×00,0×00,0x80,0x80,0xD0,0XE0,0XE0,0xC0,0xF0,0xF8,OXF C,0xF8,0xF8,0xB8,0x3C,0x78,0XFO,0XFA,0XFC,0XFC,0xCC,Ox1E,0X3C,OxF8,0xF0,0XE0,0x DO,0×00,0x80,0×00,0×00,0×00,0×00,0×00,0×00,0×00,0×00,0×00,0×00,0×00,0×00,0×00,0×00,0x00,0x00,0×00,0×00,0×00,0×00,0×00,0×00,0×00,0×00,0×00,0x00,0×00,0×00,0×00,0×00,0×00,0x00,0×00,0×00,0×00,0x00,0×00,0×00,0×00,0×00,0×00,0×00,0×00,0×00,0×00,0x00,0x00,0x00,0×00,0x00,0×00,0×00,0×00,0×00,0×00,0×00,0×00,0x00,0×00,0×00,0x00,0×00,0×00,
上传时间: 2022-07-04
上传用户:slq1234567890
3.DDR布线细节i.MX6DDR的布线,可以将所有信号分成3组:数据线组、地址线组和控制线组,每组各自设置自己的布线规则,但同时也要考虑组与组之间的规则。3.1数据线的交换在DDR3的布线中,可以根据实际情况交换数据线的线序,但必须保证是以字节为单位(数据0~7间是允许交换线序,跨字节是不允许的),这样可以简化设计。■布线尽量简短,减少过孔数量。■布线时避免改变走线参考层面。■数据线线序,推荐DO、D8、D16、D24、D32、D40、D48、D56不要改变,其它的数据线可以在字节内自由调换(see the“Write Leveling"sectioninJESD79-3E■DQS和DQM不能调换,必须在相应通道。3.2DDR3(64bits)T型拓扑介绍当设计采用T型拓扑结构,请确认以下信息。■布线规则见上文表2。■终端电阻可以省略。■布线长度的控制。DDR数量限制在4片以下。
标签: ddr3
上传时间: 2022-07-05
上传用户:
基于单片机的密码锁设计,内含工程文件和源码文件以及电路图#include "config.h" void main(){ LCD_Initial(); //lcd初始化 init_sys(); //硬件系统初始化 setpsw(); //密码设置 while(1) { time=3; //限定尝试3次 while(1) { inputpsw(); //输入密码 checkpsw(); //密码验证 checksuper(); //验证是否是超级密码 if(error_flag==0) {right();break;} else if(time>1) error(); //允许2次尝试错误 else {lock();break;} //3次错误,系统锁定 } }}
上传时间: 2022-07-17
上传用户:默默
一、LCD模块备注:LCD模块针对GD32F170和GD32F190的芯片。LCD模块的固件库文件为gd32f1x0_lcd.c和gd32f1x0_lcd.h。6.1LCD模块寄存器LCD模块寄存器的定义如代码清单6.1.1所示。RTC的配置需满足一定的条件,具体配置步骤如下:1、等待RTC_CTL寄存器中LWOFF控制位变为1,即上次对RTC的操作完成,具体寄存器操作语句如下:while(RTC->CTLR2&&RTC_FLAG_LWOFF==0)}2、将RTCCTL寄存器中CMF控制位配置为1,即RTC进入配置模式,具体寄存器操作语句如下:RTC->CTLR2|=0×0010;3、对RTC寄存器进行配置;4、将RTC_CTL寄存器中CMF控制位清零,退出配置模式。5、等待RTC_CTL寄存器中LWOFF控制位变为1.7.3应用实例【例7.3.1】编写代码实现数字时钟,并通过串口将当前时间进行输出。主函数如代码清单7.3.1所示。
上传时间: 2022-07-23
上传用户:zhanglei193
介绍针对dsPIC33FJ32MC204或同系列单片机使用入门。1、开发环境选择开发环境:MPLAB IDEV8.80编译软件:MPLABC30,其中v3.25版本C语言编译器 pic30-gcc.exe,见下图。尝试过使用最新开发环境MPLABXIDEV1.95配合数种编译器均无法对程序编译通过。2、程序代码PROJECT工程建立通过菜单中Project->Project Wizard 按步骤建立。建立完成后添加源文件c、头文件h、链接文件gld,见下图。其中源文件FIRST.c文件如下:#include"p33FJ32MC204.h"int main(){while(1);
标签: dspic33fj32mc204 入门
上传时间: 2022-07-24
上传用户: