虫虫首页|资源下载|资源专辑|精品软件
登录|注册

PUSH

  • 基于单片机的红外门进控制系统设计与制作(含源程序和原理图)

    基于单片机的红外门进控制系统设计与制作:我们所做的创新实验项目“基于单片机的红外门控系统”已基本完成,现将其工作原理简要说明。该系统主要分为两大部分:一是红外传感器部分。二是单片机计数显示控制部分。基本电路图如下:其中红外传感器部分我们采用红外对管实现,红外对管平行放置,平常处于接收状态,经比较器输出低电平,当有人经过时,红外线被挡住,接收管接收不到红外线,经比较器输出高电平。这样,当有人经过时便会产生一个电平的跳变。单片机控制部分主要是通过外部两个中断判断是否有人经过,如果有人经过,由于电平跳变的产生,进入中断服务程序,这里我们采用了两对红外传感器接到两个外部中断口,中断0作为入口,实现加1操作,中断1作为出口,实现减1操作。另外,我们通过P0口控制室内灯的亮暗,当寄存器计数值为0时,熄灯,不为0时,灯亮。显示部分,采用两位数码管动态显示,如有必要,可以很方便的扩展为四位计数。精益求精!在实验过程中,我们走了非常多的弯路,做出来的东西根本不是自己想要的,我们本想做成室内只有一个门的进出计数,原理已清楚,即在门的两边放置两对红外对管,进出时,挡住两对对管的顺序不同,因此,可判断是进入还是出去,从而实现加减计数,编程时,可分别在两个中断服务程序的入口置标志位,根据标志位判断进出,详细内容在程序部分。理论如此,但在实际过程中,还是发现实现不了上述功能,我们初步判定认为是程序掌握得不够好,相信随着自己对单片机了解的深入,应该会做出更好的 (因为我们是临时学的单片机),程序的具体内容如下: $MOD52    ORG   0000H         LJMP  MAIN         ORG   0003H         LJMP  0100H         ORG   0013H         LJMP  0150H         ORG   0050HMAIN:    CLR   A         MOV   30H , A           ;初始化缓存区         MOV   31H , A         MOV   32H , A         MOV   33H , A         MOV   R6  , A         MOV   R7  , A  SETB  EA  SETB  EX0  SETB  EX1  SETB  IT0  SETB  IT1  SETB  PX1NEXT1:   ACALL HEXTOBCDD        ;调用数制转换子程序         ACALL DISPLAY          ;调用显示子程序         LJMP  NEXT1          ORG   0100H  ;中断0服务程序 LCALL  DELY mov 70h,#2 djnz 70h,next JBC  F0,NEXT         SETB F0        CLR P0.0 LCALL  DELY0 SETB   P0.0                  MOV   A , R7   ADD   A , #1   MOV   R7, A   MOV   A , R6         ADDC  A , #0  MOV   R6 , A  CJNE  R6 , #07H , NEXT  CLR   A  MOV   R6 , A  MOV   R7 , ANEXT:  RETI  ORG   0150H    ;中断1服务程序 LCALL  DELY mov 70h,#2 djnz 70h,next2 JBC  F0,NEXT2 SETB  F0 CLR P0.0 LCALL  DELY0 SETB   P0.0    CLR C                     MOV   A , R7   SUBB   A , #1  MOV   R7, A  MOV   A , R6   SUBB  A , #0  MOV   R6 , A  CJNE  R6 , #07H , NEXT2  CLR   A  MOV   R6 , A  MOV   R7 , ANEXT2:  RETI   ORG   0200HHEXTOBCDD:MOV  A , R6               ;由十六进制转化为十进制         PUSH  ACC         MOV   A , R7         PUSH  ACC  MOV   A , R2         PUSH  ACC  CLR   A         MOV   R3 , A  MOV   R4 , A  MOV   R5 , A  MOV   R2 , #10HHB3:     MOV   A  , R7              ;将十六进制中最高位移入进位位中         RLC   A  MOV   R7 , A  MOV   A  , R6  RLC   A  MOV   R6 , A  MOV   A  , R5              ;每位数加上本身相当于将这个数乘以2  ADDC  A  , R5  DA    A  MOV   R5 , A  MOV   A  , R4  ADDC  A  , R4  DA    A                   ;十进制调整  MOV   R4 , A  MOV   A  , R3  ADDC  A  , R3  DJNZ  R2 , HB3  POP   ACC   MOV   R2 , A  POP   ACC   MOV   R7 , A  POP   ACC  MOV   R6 , A  RET  ORG   0250HDISPLAY:  MOV   R0 , #30H         MOV   A  , R5  ANL   A  , #0FH  MOV   @R0 , A  MOV   A  , R5  SWAP  A  ANL   A  , #0FH  INC   R0  MOV   @R0 , A  MOV   A  , R4  ANL   A , #0FH  INC   R0  MOV   @R0 , A  MOV   A   , R4  SWAP  A  ANL   A  , #0FH  INC   R0  MOV   @R0 , A  MOV   R0 , #30H  MOV   R2 , #11111110BAGAIN:   MOV   A  , R2         MOV   P2 , A         MOV   A  , @R0  MOV   DPTR , #TAB  MOVC  A  , @A+DPTR  MOV   P1 , A  ACALL DELAY  INC   R0  MOV   A  , R2  RL    A  MOV   R2 , A  JB    ACC.4  , AGAIN   RETTAB:     DB    03FH , 06H , 5BH , 4FH , 66H , 6DH , 7DH , 07H , 7FH , 6FH   ;七段码表DELY:    MOV   R1,#80D1:        MOV    R2,#100             DJNZ   R2,$ DJNZ    R1,D1 RET DELAY:   MOV   TMOD , #01H           ;延时子程序         MOV   TL0  , #0FEH         MOV   TH0  , #0FEH  SETB  TR0WAIT:    JNB   TF0  , WAIT         CLR   TF0  CLR   TR0  RETDELY0:   MOV  R1,  #200D3:  MOV  R2,#250          DJNZ  R2,$  DJNZ  R1,D3    RET          END       该系统实际应用广泛。可用在生产线上产品数量统计、公交车智能计数问候(需添加语音芯片)、超市内人数统计等公共场合。另外,添加串口通信部分便可实现与PC数据交换的功能。   由于,实验简化了,剩下不少零件和资金,所以我们又做了两项其他的实验。

    标签: 单片机 红外 控制系统设计 原理图

    上传时间: 2013-12-22

    上传用户:tangsiyun

  • 模拟串口通讯程序(51汇编代码编写)

    T2作为波特率控制UART_RXD 是硬中断0或1口,如果能进入中断,说明该线有一个起始位产生,进入中断后调用下面的接收程序。退出硬中断之前还需要将硬中断标志重新复位。UART_TXD 是任何其它IO即可。UART_SEND:    PUSH IE    PUSH DPH    PUSH DPL    PUSH PSW    PUSH 00H    PUSH ACC    CLR EA    SETB UART_TXD        ;START BIT        MOV R0,A    CLR TR2    ;TR2置1,计数器2启动,时间计数启动。    MOV A,RCAP2L;计数器2重新装载值    MOV TL2,A    ;置计数器2初值  ;T2需要重新装载    MOV A,DPH    MOV A,RCAP2H    MOV TH2,A    MOV A,R0        SETB TR2    ;TR2置1,计数器    JNB TF2,$    CLR TF2    JNB TF2,$    CLR TF2

    标签: 模拟串口 通讯程序 汇编代码 编写

    上传时间: 2014-01-12

    上传用户:二十八号

  • tcp ip协议详解 中文版PDF

    很多不同的厂家生产各种型号的计算机,它们运行完全不同的操作系统,但TCP.IP协议族允许它们互相进行通信。这一点很让人感到吃惊,因为它的作用已远远超出了起初的设想。T C P / I P起源于6 0年代末美国政府资助的一个分组交换网络研究项目,到9 0年代已发展成为计算机之间最常应用的组网形式。它是一个真正的开放系统,因为协议族的定义及其多种实现可以不用花钱或花很少的钱就可以公开地得到。它成为被称作“全球互联网”或“因特网(Internet)”的基础,该广域网(WA N)已包含超过1 0 0万台遍布世界各地的计算机。本章主要对T C P / I P协议族进行概述,其目的是为本书其余章节提供充分的背景知识。 TCP.IP协议 缩略语 ACK (ACKnowledgment) TCP首部中的确认标志 API (Application Programming Interface) 应用编程接口 ARP (Address Resolution Protocol) 地址解析协议 ARPANET(Defense Advanced Research Project Agency NETwork) (美国)国防部远景研究规划局 AS (Autonomous System) 自治系统 ASCII (American Standard Code for Information Interchange) 美国信息交换标准码 ASN.1 (Abstract Syntax Notation One) 抽象语法记法1 BER (Basic Encoding Rule) 基本编码规则 BGP (Border Gateway Protocol) 边界网关协议 BIND (Berkeley Internet Name Domain) 伯克利I n t e r n e t域名 BOOTP (BOOTstrap Protocol) 引导程序协议 BPF (BSD Packet Filter) BSD 分组过滤器 CIDR (Classless InterDomain Routing) 无类型域间选路 CIX (Commercial Internet Exchange) 商业互联网交换 CLNP (ConnectionLess Network Protocol) 无连接网络协议 CRC (Cyclic Redundancy Check) 循环冗余检验 CSLIP (Compressed SLIP) 压缩的S L I P CSMA (Carrier Sense Multiple Access) 载波侦听多路存取 DCE (Data Circuit-terminating Equipment) 数据电路端接设备 DDN (Defense Data Network) 国防数据网 DF (Don’t Fragment) IP首部中的不分片标志 DHCP (Dynamic Host Configuration Protocol) 动态主机配置协议 DLPI (Data Link Provider Interface) 数据链路提供者接口 DNS (Domain Name System) 域名系统 DSAP (Destination Service Access Point) 目的服务访问点 DSLAM (DSL Access Multiplexer) 数字用户线接入复用器 DSSS (Direct Sequence Spread Spectrum) 直接序列扩频 DTS (Distributed Time Service) 分布式时间服务 DVMRP (Distance Vector Multicast Routing Protocol) 距离向量多播选路协议 EBONE (European IP BackbONE) 欧洲I P主干网 EOL (End of Option List) 选项清单结束 EGP (External Gateway Protocol) 外部网关协议 EIA (Electronic Industries Association) 美国电子工业协会 FCS (Frame Check Sequence) 帧检验序列 FDDI (Fiber Distributed Data Interface) 光纤分布式数据接口 FIFO (First In, First Out) 先进先出 FIN (FINish) TCP首部中的结束标志 FQDN (Full Qualified Domain Name) 完全合格的域名 FTP (File Transfer Protocol) 文件传送协议 HDLC (High-level Data Link Control) 高级数据链路控制 HELLO 选路协议 IAB (Internet Architecture Board) Internet体系结构委员会 IANA (Internet Assigned Numbers Authority) Internet号分配机构 ICMP (Internet Control Message Protocol) Internet控制报文协议 IDRP (InterDomain Routing Protocol) 域间选路协议 IEEE (Institute of Electrical and Electronics Engineering) (美国)电气与电子工程师协会 IEN (Internet Experiment Notes) 互联网试验注释 IESG (Internet Engineering Steering Group) Internet工程指导小组 IETF (Internet Engineering Task Force) Internet工程专门小组 IGMP (Internet Group Management Protocol) Internet组管理协议 IGP (Interior Gateway Protocol) 内部网关协议 IMAP (Internet Message Access Protocol) Internet报文存取协议 IP (Internet Protocol) 网际协议 I RTF (Internet Research Task Force) Internet研究专门小组 IS-IS (Intermediate System to Intermediate System Protocol) 中间系统到中间系统协议 ISN (Initial Sequence Number) 初始序号 ISO (International Organization for Standardization) 国际标准化组织 ISOC (Internet SOCiety) Internet协会 LAN (Local Area Network) 局域网 LBX (Low Bandwidth X) 低带宽X LCP (Link Control Protocol) 链路控制协议 LFN (Long Fat Net) 长肥网络 LIFO (Last In, First Out) 后进先出 LLC (Logical Link Control) 逻辑链路控制 LSRR (Loose Source and Record Route) 宽松的源站及记录路由 MBONE (Multicast Backbone On the InterNEt) Internet上的多播主干网 MIB (Management Information Base) 管理信息库 MILNET (MILitary NETwork) 军用网 MIME (Multipurpose Internet Mail Extensions) 通用I n t e r n e t邮件扩充 MSL (Maximum Segment Lifetime) 报文段最大生存时间 MSS (Maximum Segment Size) 最大报文段长度 M TA (Message Transfer Agent) 报文传送代理 MTU (Maximum Transmission Unit) 最大传输单元 NCP (Network Control Protocol) 网络控制协议 NFS (Network File System) 网络文件系统 NIC (Network Information Center) 网络信息中心 NIT (Network Interface Tap) 网络接口栓(S u n公司的一个程序) NNTP (Network News Transfer Protocol) 网络新闻传送协议 NOAO (National Optical Astronomy Observatories) 国家光学天文台 NOP (No Operation) 无操作 NSFNET (National Science Foundation NETwork) 国家科学基金网络 NSI (NASA Science Internet) (美国)国家宇航局I n t e r n e t NTP (Network Time Protocol) 网络时间协议 NVT (Network Virtual Terminal) 网络虚拟终端 OSF (Open Software Foudation) 开放软件基金 OSI (Open Systems Interconnection) 开放系统互连 OSPF (Open Shortest Path First) 开放最短通路优先 PAWS (Protection Against Wrapped Sequence number) 防止回绕的序号 PDU (Protocol Data Unit) 协议数据单元 POSIX (Portable Operating System Interface) 可移植操作系统接口 PPP (Point-to-Point Protocol) 点对点协议 PSH (PUSH) TCP首部中的急迫标志 RARP (Reverse Address Resolution Protocol) 逆地址解析协议 RFC (Request For Comments) Internet的文档,其中的少部分成为标准文档 RIP (Routing Information Protocol) 路由信息协议 RPC (Remote Procedure Call) 远程过程调用 RR (Resource Record) 资源记录 RST (ReSeT) TCP首部中的复位标志 RTO (Retransmission Time Out) 重传超时 RTT (Round-Trip Time) 往返时间 SACK (Selective ACKnowledgment) 有选择的确认 SLIP (Serial Line Internet Protocol) 串行线路I n t e r n e t协议 SMI (Structure of Management Information) 管理信息结构 SMTP (Simple Mail Transfer Protocol) 简单邮件传送协议 SNMP (Simple Network Management Protocol) 简单网络管理协议 SSAP (Source Service Access Point) 源服务访问点 SSRR (Strict Source and Record Route) 严格的源站及记录路由 SWS (Silly Window Syndrome) 糊涂窗口综合症 SYN (SYNchronous) TCP首部中的同步序号标志 TCP (Transmission Control Protocol) 传输控制协议 TFTP (Trivial File Transfer Protocol) 简单文件传送协议 TLI (Transport Layer Interface) 运输层接口 TTL (Ti m e - To-Live) 生存时间或寿命 TUBA (TCP and UDP with Bigger Addresses) 具有更长地址的T C P和U D P Telnet 远程终端协议 UA (User Agent) 用户代理 UDP (User Datagram Protocol) 用户数据报协议 URG (URGent) TCP首部中的紧急指针标志 UTC (Coordinated Universal Time) 协调的统一时间 UUCP (Unix-to-Unix CoPy) Unix到U n i x的复制 WAN (Wide Area Network) 广域网 WWW (World Wide Web) 万维网 XDR (eXternal Data Representation) 外部数据表示 XID (transaction ID) 事务标识符 XTI (X/Open Transport Layer Interface) X/ O p e n运输层接口

    标签: tcp 协议

    上传时间: 2013-11-13

    上传用户:tdyoung

  • 基于(英蓓特)STM32V100的看门狗程序

    This example shows how to update at regulate period the WWDG counter using theEarly Wakeup interrupt (EWI). The WWDG timeout is set to 262ms, refresh window set to 41h and the EWI isenabled. When the WWDG counter reaches 40h the EWI is generated and in the WWDGISR the counter is refreshed to prevent a WWDG reset and led connected to PC.07is toggled.The EXTI line9 is connected to PB.09 pin and configured to generate an interrupton falling edge.In the NVIC, EXTI line9 to 5 interrupt vector is enabled with priority equal to 0and the WWDG interrupt vector is enabled with priority equal to 1 (EXTI IT > WWDG IT). The EXTI Line9 will be used to simulate a software failure: once the EXTI line9event occurs (by pressing Key PUSH-button on EVAL board) the correspondent interruptis served, in the ISR the led connected to PC.07 is turned off and the EXTI line9pending bit is not cleared. So the CPU will execute indefinitely EXTI line9 ISR andthe WWDG ISR will never be entered(WWDG counter not updated). As result, when theWWDG counter falls to 3Fh the WWDG reset occurs.If the EXTI line9 event don抰 occurs the WWDG counter is indefinitely refreshed inthe WWDG ISR which prevent from WWDG reset. If the WWDG reset is generated, after resuming from reset a led connected to PC.06is turned on. In this example the system is clocked by the HSE(8MHz).

    标签: V100 STM 100 32V

    上传时间: 2013-11-10

    上传用户:gundamwzc

  • LT5514三阶互调的精确测量

      Accurate measurement of the third order intercept pointfor low distortion IC products such as the LT5514 requirescertain precautions to be observed in the test setup andtesting procedure. The LT5514 linearity performance ishigh enough to PUSH the test equipment and test set-up totheir limits. A method for accurate measurement of thirdorder intermodulation products, IM3, with standard testequipment is outlined below.It is also important to correctly interpret the LT5514specification with respect to ROUT, and the impact ofdemo-board transmission-line termination loss whenevaluating the linearity performance, as explained in theLT5514 Datasheet and in Note 1 of this document.

    标签: 5514 LT 三阶互调 精确测量

    上传时间: 2013-11-13

    上传用户:l254587896

  • 无线方式下的数据业务打包规范

    无线方式下的数据业务打包规范,中文翻译版!手边书,非常实用!看懂此文和相关的其它规范,就能在最深层次上理解WAP PUSH、短信承载等技术的原理。

    标签: 无线 方式 数据业务

    上传时间: 2014-01-04

    上传用户:zhuoying119

  • ATmega8 taillight circuitAn assembly language program that generates 5 different static patterns wit

    ATmega8 taillight circuitAn assembly language program that generates 5 different static patterns with switching from pattern-to-pattern controlled by the depression of one PUSH-button switch (S2).

    标签: taillight circuitAn generates different

    上传时间: 2014-01-12

    上传用户:wanghui2438

  • ATmega8 taillight circuitA more complex C program that implements different flashing patterns under

    ATmega8 taillight circuitA more complex C program that implements different flashing patterns under the control of both the PUSH buttons and potentiometer. Use your imagination to come up with some novel ideas here. Remember however that more marks are to be awarded for the quality of the code than for the novelness of the patterns.

    标签: implements taillight different circuitA

    上传时间: 2013-11-27

    上传用户:zhuimenghuadie

  • 手机发送端消息的通信模块

    手机发送端消息的通信模块,包括短信,WAP PUSH等功能

    标签: 手机 发送 通信模块

    上传时间: 2015-04-07

    上传用户:wab1981

  • wapPUSH-c实现 注意

    wapPUSH-c实现 注意,短信应当以二进制格式发送(SMPP和CMPP里,编码为0x04) 短信内容,WAP PUSH是使用1条或者多条短信来发的,如果内容超过了140个字节,就必须分多条发送,规则如下: 0B05040B8423F00003B3 02 01 B30601AE02056A0045C60C03 6865726F2E7478736D732E636F6D 0001 037465737474657374746573747465737474657374746573747465737474657374746573747465737474657374746573747465737474657374746573747465737474657374746573747465737474657374746573747465737474657374746573747465 02是指共有两条短信 01是指这是第一条 这里是URL地址(hero.txsms.com),注意不要有http:// 0001为URL结束标志 描述文字开始,注意:utf编码。 0B05040B8423F00003B3 02 02 737474657374746573747465737474657374746573747465737474657374746573747465737474657374000101 02是指共有两条短信 02是指这是第一条 继续上条未完内容 请参考example.c中的例子

    标签: wapPUSH-c

    上传时间: 2013-12-26

    上传用户:电子世界