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

Bit-Band

  • 基于(英蓓特)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-11

    上传用户:gundamwzc

  • ch451数码管驱动实例程序

    CH451 使用一个系统时钟信号来同步芯片内部的各个功能部件,例如,当系统时钟信号的频率变高时,显示驱动刷新将变快、按键响应时间将变短、上电复位信号的宽度将变窄、看门狗周期也将变短。一般情况下,CH451 的系统时钟信号是由内置的阻容振荡提供的,这样就不再需要任何外围电路,但内置RC 振荡的频率受电源电压的影响较大,当电源电压降低时,系统时钟信号的频率也随之降低。在某些实际应用中,可能希望CH451 提供更长或者更短的显示刷新周期、按键响应时间等,这时就需要调节系统时钟信号的频率。CH451 提供了CLK 引脚,用于外接阻容振荡。当在CLK 引脚与地GND 之间跨接电容后,系统时钟信号的频率将变低;当在CLK 引脚与正电源VCC 之间跨接电阻后,系统时钟信号的频率将变高。因为CH451 的系统时钟信号被用于芯片内部的所有功能部件,所以其频率不宜进行大幅度的调节,一般情况下,跨接电容的容量在5pF 至100pF 之间,跨接电阻的阻值在20KΩ至500KΩ之间。跨接一个47pF 的电容则频率降低为一半,跨接一个47KΩ的电阻则频率升高为两倍。另外,CH451 的CLK 引脚可以直接输入外部的系统时钟信号,但外部电路的驱动能力不能小于±2mA。CH451 在CLKO 引脚提供了系统时钟信号的二分频输出,对于一些不要求精确定时的实际应用,可以由CLKO 引脚向单片机提供时钟信号,简化外围电路。 单片机接口程序下面提供了U1(MCS-51 单片机)与U2(CH451)的接口程序,供参考。;**********************;需要主程序定义的参数CH451_DCLK BIT P1.7 ;串行数据时钟,上升沿激活CH451_DIN BIT P1.6 ;串行数据输出,接CH451 的数据输入CH451_LOAD BIT P1.5 ;串行命令加载,上升沿激活CH451_DOUT BIT P3.2 ;INT0,键盘中断和键值数据输入,接CH451 的数据输出CH451_KEY DATA 7FH ;存放键盘中断中读取的键值

    标签: 451 ch 数码管 实例程序

    上传时间: 2013-11-22

    上传用户:671145514

  • cs5460a程序(C程序源代码)

    #include <reg51.h>#include <main.h>#include <interrupt.h> cs5460a应用电路(含源程序)bit code table_odd_even_bit[16]={0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0}; extern uchar rs485_timeout,pointer_buf485;extern uchar rs485_buf[MAX_485_LEN];extern uchar idata spi_buf[MAX_SPI_LEN];extern uchar pointer_send,send_len; extern uchar count_1s;//extern uint count_2min;extern uint count_10s;extern uchar oper_len,send_offset,chk_sum,send_i;extern bit flag_send_data,flag_level,flag_drdy,flag_data_ok;

    标签: 5460a 5460 cs C程序

    上传时间: 2014-01-24

    上传用户:heart_2007

  • 单片机12864液晶时钟显示程序

    12864液晶时钟显示程序 LCD 地址变量 ;**************变量的定义***************** RS             BIT      P2.0            ;LCD数据/命令选择端(H/L) RW             BIT      P2.1          ;LCD读/写选择端(H/L) EP             BIT      P2.2            ;LCD使能控制 PSB        EQU P2.3 RST        EQU P2.5 PRE            BIT      P1.4            ;调整键(K1) ADJ            BIT      P1.5            ;调整键(K2) COMDAT         EQU P0 LED        EQU P0.3 YEAR           DATA      18H            ;年,月,日变量 MONTH          DATA      19H DATE           DATA      1AH WEEK           DATA      1BH HOUR           DATA      1CH            ;时,分,秒,百分之一秒变量 MIN            DATA      1DH SEC            DATA      1EH SEC100         DATA      1FH STATE          DATA      23H LEAP           BIT      STATE.1            ;是否闰年标志1--闰年,0--平年 KEY_S          DATA      24H            ;当前扫描键值 KEY_V          DATA      25H            ;上次扫描键值 DIS_BUF_U0      DATA      26H            ;LCD第一排显示缓冲区 DIS_BUF_U1      DATA      27H DIS_BUF_U2      DATA      28H DIS_BUF_U3      DATA      29H DIS_BUF_U4      DATA      2AH DIS_BUF_U5      DATA      2BH DIS_BUF_U6      DATA      2CH DIS_BUF_U7      DATA      2DH DIS_BUF_U8      DATA      2EH DIS_BUF_U9      DATA      2FH DIS_BUF_U10     DATA      30H DIS_BUF_U11     DATA      31H DIS_BUF_U12     DATA      32H DIS_BUF_U13     DATA      33H DIS_BUF_U14     DATA      34H DIS_BUF_U15     DATA      35H DIS_BUF_L0      DATA      36H            ;LCD第三排显示缓冲区 DIS_BUF_L1      DATA      37H DIS_BUF_L2      DATA      38H DIS_BUF_L3      DATA      39H DIS_BUF_L4      DATA      3AH DIS_BUF_L5      DATA      3BH DIS_BUF_L6      DATA      3CH DIS_BUF_L7      DATA      3DH DIS_BUF_L8      DATA      3EH DIS_BUF_L9      DATA      3FH DIS_BUF_L10     DATA      40H DIS_BUF_L11     DATA      41H DIS_BUF_L12     DATA      42H DIS_BUF_L13     DATA      43H DIS_BUF_L14     DATA      44H DIS_BUF_L15     DATA      45H FLAG            DATA      46H ;1-年,2-月,3-日,4-时,5-分,6-秒,7-退出调整。 DIS_H           DATA      47H DIS_M           DATA      48H DIS_S           DATA      49H

    标签: 12864 单片机 液晶时钟 显示程序

    上传时间: 2013-11-09

    上传用户:xingisme

  • 温湿度传感器 sht11 仿真程序下载

    温湿度传感器 sht11 仿真程序 sbit out =P3^0; //加热口  //sbit input =P1^1;//检测口  //sbit speek =P2^0;//报警  sbit clo =P3^7;//时钟  sbit ST =P3^5;//开始  sbit EOC =P3^6;//成功信号  sbit gwei =P3^4;//个位  sbit swei =P3^3;//十位 sbit bwei =P3^2;//百位 sbit qwei =P3^1;//千位 sbit speak =P0^0;//报警音 sbit bjled =P0^1;//报警灯 sbit zcled =P0^2;//正常LED  int count;  uchar xianzhi;//取转换结果 uchar seth;//高时间 uchar setl;//低时间 uchar seth_mi;//高时间 uchar setl_mi;//低时间  bit  hlbz;//高低标志  bit  clbz;  bit  spbz;       ///定时中断程序/// void t0 (void) interrupt 1 using 0 {     TH0=(65536-200)/256;//5ms*200=1000ms=1s   TL0=(65536-200)%256;  clo=!clo;//产生时钟      if(count>5000)   {     if(hlbz)            {       if(seth_mi==0){seth_mi=seth;hlbz=0;out=0;}    else seth_mi--;       }     if(!hlbz)            {       if(setl_mi==0){setl_mi=setl;hlbz=1;out=1;}    else setl_mi--;       }   count=0;   }      else count++;         } ///////////// ///////延时/////// delay(int i) {    while(--i);          }     ///////显示处理/////// xianshi() {      int   abcd=0;     int i;     for (i=0;i<5;i++) {   abcd=xianzhi;  gwei=1;  swei=1;  bwei=1;  qwei=1;  P1=dispcode[abcd/1000];   qwei=0;  delay(70);   qwei=1;  abcd=abcd%1000;  P1=dispcode[abcd/100];  bwei=0;  delay(70);  bwei=1;   abcd=abcd%100;  P1=dispcode[abcd/10];  swei=0;  delay(70);  swei=1;  abcd=abcd%10;  P1=dispcode[abcd];  gwei=0;  delay(70);  gwei=1;  } }   doing()   {     if(xianzhi>100)     {bjled=0;speak=1;zcled=1;}  else {bjled=1;speak=0;zcled=0;}   }   void main(void)  {  seth=60;//h60秒  setl=90;//l90秒  seth_mi=60;//h60秒  setl_mi=90;//l90秒  TMOD=0X01;//定时0 16位工作模式   TH0=(65536-200)/256;   TL0=(65536-200)%256;    TR0=1; //开始计时  ET0=1;   //开定时0中断  EA=1;    //开全中断  while(1)  {      ST=0;    _nop_();     ST=1;    _nop_();     ST=0;  //   EOC=0;          xianshi();       while(!EOC)   {         xianshi();    }        xianzhi=P2;             xianshi();     doing();  }  }

    标签: sht 11 温湿度传感器 仿真程序

    上传时间: 2013-11-07

    上传用户:我们的船长

  • ISE13.1下载配置过程

    介绍ISE13.1 iMPACT 下载bit文件 和mcs文件的详细步骤

    标签: 13.1 ISE 配置过程

    上传时间: 2013-11-17

    上传用户:helmos

  • 自学ZedBoard:使用IP通过ARM PS访问FPGA(源代码)

      这一节的目的是使用XPS为ARM PS 处理系统 添加额外的IP。从IP Catalog 标签添加GPIO,并与ZedBoard板子上的8个LED灯相连。当系统建立完后,产生bitstream,并对外设进行测试。本资料为源代码,原文设计过程详见:【 玩转赛灵思Zedboard开发板(4):如何使用自带外设IP让ARM PS访问FPGA?】   硬件平台:Digilent ZedBoard   开发环境:Windows XP 32 bit   软件: XPS 14.2 +SDK 14.2

    标签: ZedBoard FPGA ARM 访问

    上传时间: 2013-11-06

    上传用户:yuchunhai1990

  • XAPP122 - Spartan-XL FPGA的Express配置

    Express Mode uses an 8-bit wide bus path for fast configuration of Xilinx FPGAs. Thisapplication note provides information on how to perform Express configuration specifically forthe Spartan™-XL family. The Express mode signals and their associated timing are defined.The steps of Express configuration are described in detail, followed by detailed instructions thatshow how to implement the configuration circui

    标签: Spartan-XL Express XAPP FPGA

    上传时间: 2015-01-02

    上传用户:nanxia

  • WP200-将Spartan-3 FPGA用作远程数码相机的低成本控制器

      The introduction of Spartan-3™ devices has createdmultiple changes in the evolution of embedded controldesigns and pushed processing capabilities to the “almostfreestage.” With these new FPGAs falling under $20, involume, with over 1 million system gates, and under $5for 100K gate-level units, any design with programmablelogic has a readily available 8- or 16-bit processor costingless than 75 cents and 32-bit processor for less than $1.50.

    标签: Spartan FPGA 200 WP

    上传时间: 2013-10-21

    上传用户:ligi201200

  • XAPP719 -利用USR_ACCESS寄存器实现PowerPC高速缓存配置

    The Virtex™-4 user access register (USR_ACCESS_VIRTEX4) is a 32-bit register thatprovides direct access to bitstream data by the FPGA fabric. It is useful for loadingPowerPC™ 405 (PPC405) processor caches and/or other data into the FPGA after the FPGAhas been configured, thus achieving partial reconfiguration. The USR_ACCESS_VIRTEX4register is programmed through the bitstream with a command that writes a series of 32-bitwords.

    标签: USR_ACCESS PowerPC XAPP 719

    上传时间: 2013-12-23

    上传用户:yuanwenjiao