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

D-D

  • This file contains example code to print over the serial port of the P87C591 MCU and Evaultion Board

    This file contains example code to print over the serial port of the P87C591 MCU and Evaultion Board (EVAL-P87C591QS). This example will test the I2C function of the P87C591. This will be done by writing and reading from a serial A/D & D/A (P8591).

    标签: Evaultion the contains P87C591

    上传时间: 2017-06-20

    上传用户:hebmuljb

  • RSA ( Rivest Shamir Adleman )is crypthograph system that used to give a secret information and digit

    RSA ( Rivest Shamir Adleman )is crypthograph system that used to give a secret information and digital signature . Its security based on Integer Factorization Problem (IFP). RSA uses an asymetric key. RSA was created by Rivest, Shamir, and Adleman in 1977. Every user have a pair of key, public key and private key. Public key (e) . You may choose any number for e with these requirements, 1< e <Æ (n), where Æ (n)= (p-1) (q-1) ( p and q are first-rate), gcd (e,Æ (n))=1 (gcd= greatest common divisor). Private key (d). d=(1/e) mod(Æ (n)) Encyption (C) . C=Mª mod(n), a = e (public key), n=pq Descryption (D) . D=C° mod(n), o = d (private key

    标签: crypthograph information Adleman Rivest

    上传时间: 2017-09-01

    上传用户:chfanjiang

  • 数组子系统

    #include <stdio.h> #include <stdlib.h> #define SMAX 100 typedef struct SPNode { int i,j,v; }SPNode; struct sparmatrix { int rows,cols,terms; SPNode data [SMAX]; }; sparmatrix CreateSparmatrix() { sparmatrix A; printf("\n\t\t请输入稀疏矩阵的行数,列数和非零元素个数(用逗号隔开):"); scanf("%d,%d,%d",&A.cols,&A.terms); for(int n=0;n<=A.terms-1;n++) { printf("\n\t\t输入非零元素值(格式:行号,列号,值):"); scanf("%d,%d,%d",&A.data[n].i,&A.data[n].j,&A.data[n].v); } return A; } void ShowSparmatrix(sparmatrix A) { int k; printf("\n\t\t"); for(int x=0;x<=A.rows-1;x++) { for(int y=0;y<=A.cols-1;y++) { k=0; for(int n=0;n<=A.terms-1;n++) { if((A.data[n].i-1==x)&&(A.data[n].j-1==y)) { printf("%8d",A.data[n].v); k=1; } } if(k==0) printf("%8d",k); } printf("\n\t\t"); } } void sumsparmatrix(sparmatrix A) { SPNode *p; p=(SPNode*)malloc(sizeof(SPNode)); p->v=0; int k; k=0; printf("\n\t\t"); for(int x=0;x<=A.rows-1;x++) { for(int y=0;y<=A.cols-1;y++) { for(int n=0;n<=A.terms;n++) { if((A.data[n].i==x)&&(A.data[n].j==y)&&(x==y)) { p->v=p->v+A.data[n].v; k=1; } } } printf("\n\t\t"); } if(k==1) printf("\n\t\t对角线元素的和::%d\n",p->v); else printf("\n\t\t对角线元素的和为::0"); } int main() { int ch=1,choice; struct sparmatrix A; A.terms=0; while(ch) { printf("\n"); printf("\n\t\t      稀疏矩阵的三元组系统       "); printf("\n\t\t*********************************"); printf("\n\t\t      1------------创建          "); printf("\n\t\t      2------------显示          "); printf("\n\t\t      3------------求对角线元素和"); printf("\n\t\t      4------------返回          "); printf("\n\t\t*********************************"); printf("\n\t\t请选择菜单号(0-3):"); scanf("%d",&choice); switch(choice) { case 1: A=CreateSparmatrix(); break; case 2: ShowSparmatrix(A); break; case 3: SumSparmatrix(A); break; default: system("cls"); printf("\n\t\t输入错误!请重新输入!\n"); break; } if (choice==1||choice==2||choice==3) { printf("\n\t\t"); system("pause"); system("cls"); } else system("cls"); } }

    标签: 数组 子系统

    上传时间: 2020-06-11

    上传用户:ccccy

  • DELPHI 正则式

    正则表达式用于字符串处理、表单验证等场合,实用高效。现将一些常用的表达式收集于此,以备不时之需。 匹配中文字符的正则表达式: [\u4e00-\u9fa5] 评注:匹配中文还真是个头疼的事,有了这个表达式就好办了 匹配双字节字符(包括汉字在内):[^\x00-\xff] 评注:可以用来计算字符串的长度(一个双字节字符长度计2,ASCII字符计1) 匹配空白行的正则表达式:\n\s*\r 评注:可以用来删除空白行 匹配HTML标记的正则表达式:<(\S*?)[^>]*>.*?</\1>|<.*? /> 评注:网上流传的版本太糟糕,上面这个也仅仅能匹配部分,对于复杂的嵌套标记依旧无能为力 匹配首尾空白字符的正则表达式:^\s*|\s*$ 评注:可以用来删除行首行尾的空白字符(包括空格、制表符、换页符等等),非常有用的表达式 匹配Email地址的正则表达式:\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)* 评注:表单验证时很实用 匹配网址URL的正则表达式:[a-zA-z]+://[^\s]* 评注:网上流传的版本功能很有限,上面这个基本可以满足需求 匹配帐号是否合法(字母开头,允许5-16字节,允许字母数字下划线):^[a-zA-Z][a-zA-Z0-9_]{4,15}$ 评注:表单验证时很实用 匹配国内电话号码:\d{3}-\d{8}|\d{4}-\d{7} 评注:匹配形式如 0511-4405222 或 021-87888822 匹配腾讯QQ号:[1-9][0-9]{4,} 评注:腾讯QQ号从10000开始 匹配中国邮政编码:[1-9]\d{5}(?!\d) 评注:中国邮政编码为6位数字 匹配身份证:\d{15}|\d{18} 评注:中国的身份证为15位或18位 匹配ip地址:\d+\.\d+\.\d+\.\d+ 评注:提取ip地址时有用。 匹配特定数字:

    标签: DELPHI

    上传时间: 2020-12-16

    上传用户:

  • STM32F103开发板 DHT11温湿度DS18B20 气体MQ-2光敏声控雨滴传感器实验程序

    STM32F103开发板 DHT11温湿度DS18B20 气体MQ-2光敏声控雨滴传感器实验程序**--------------------------------------------------------------------------------------------------------** Created by: FiYu** Created date: 2015-12-12** Version:     1.0** Descriptions: DHT11温湿度传感器实验 **--------------------------------------------------------------------------------------------------------** Modified by: FiYu** Modified date: ** Version: ** Descriptions: ** Rechecked by: **********************************************************************************************************/#include "stm32f10x.h"#include "delay.h"#include "dht11.h"#include "usart.h"DHT11_Data_TypeDef DHT11_Data;/************************************************************************************** * 描  述 : GPIO/USART1初始化配置 * 入  参 : 无 * 返回值 : 无 **************************************************************************************/void GPIO_Configuration(void){ GPIO_InitTypeDef GPIO_InitStructure; /* Enable the GPIO_LED Clock */ RCC_APB2PeriphClockCmd( RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB | RCC_APB2Periph_AFIO , ENABLE);     GPIO_DeInit(GPIOB); //将外设GPIOA寄存器重设为缺省值 GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;    //推挽输出 GPIO_Init(GPIOB, &GPIO_InitStructure); GPIO_DeInit(GPIOA); //将外设GPIOA寄存器重设为缺省值 GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;    //推挽输出 GPIO_Init(GPIOA, &GPIO_InitStructure); GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;    //浮空输入 GPIO_Init(GPIOA, &GPIO_InitStructure); GPIO_SetBits(GPIOB , GPIO_Pin_9);   //初始状态,熄灭指示灯LED1}/************************************************************************************** * 描  述 : 串口显示实时温湿度 * 入  参 : 无 * 返回值 : 无 **************************************************************************************/void DHT11_SCAN(void){ if( Read_DHT11(&DHT11_Data)==SUCCESS) { printf("\r\n读取DHT11成功!\r\n\r\n湿度为%d.%d %RH ,温度为 %d.%d℃ \r\n",\ DHT11_Data.humi_int,DHT11_Data.humi_deci,DHT11_Data.temp_int,DHT11_Data.temp_deci); //printf("\r\n 湿度:%d,温度:%d \r\n" ,DHT11_Data.humi_int,DHT11_Data.temp_int); } else { printf("Read DHT11 ERROR!\r\n"); }}/************************************************************************************** * 描  述 : MAIN函数 * 入  参 : 无 * 返回值 : 无 **************************************************************************************/int main(void){ SystemInit(); //设置系统时钟72MHZ GPIO_Configuration(); USART1_Init();    //初始化配置TIM DHT11_GPIO_Config();   // 初始化温湿度传感器PB1引脚初始时为推挽输出 GPIO_ResetBits(GPIOB , GPIO_Pin_9); delay_ms(500);   while(1)  { GPIO_SetBits(GPIOB , GPIO_Pin_9);    DHT11_SCAN();  //实时显示温湿度 delay_ms(1500); } }

    标签: stm32f103 传感器

    上传时间: 2022-05-03

    上传用户:得之我幸78

  • CAN、I2S、I2C、SPI、SSP总线的介绍和比较

    计算机基本知识、SPI总线说明串行外围设备接口SPI(serial peripheral interface)总线技术是Motorola公司推出的一种同步串行接口,Motorola公司生产的绝大多数MCU(微控制器)都配有SPI硬件接口,如68系列MCU,SPI用于CPU与各种外围器件进行全双工、同步串行通讯。SPI可以同时发出和接收串行数据。它只需四条线就可以完成MCU与各种外围器件的通讯,这四条线是:串行时钟线(CSK)、主机输入/从机输出数据线(MISO)主机输出/从机输入数据线(MOSD)、低电平有效从机选择线es。这些外围器件可以是简单的TTL移位寄存器,复杂的LCD显示驱动器,A/D.D/A转换子系统或其他的MCU,当SPI工作时,在移位寄存器中的数据逐位从输出引脚(MOSI)输出(高位在前),同时从输入引脚(MISO)接收的数据逐位移到移位寄存器(高位在前),发送一个字节后,从另一个外围器件接收的字节数据进入移位寄存器中。主SPI的时钟信号(SCK)使传输同步,其典型系统框图如下图所示。

    标签: can i2s i2c spi ssp

    上传时间: 2022-06-19

    上传用户:

  • D-sub-jy

    D-sub-jy

    标签: D-sub-jy

    上传时间: 2013-04-15

    上传用户:eeworm

  • D类音频功率放大器设计

    D类音频功率放大器设计

    标签: 音频功率 放大器设计

    上传时间: 2013-04-15

    上传用户:eeworm

  • 积分式A/D转换器其它专用集成电路分册 清晰书签版

    积分式A/D转换器其它专用集成电路分册 清晰书签版

    标签: 积分 D转换 专用集成电路

    上传时间: 2013-05-29

    上传用户:eeworm

  • OTP 4-位带SAR8-位A-D转换器单片机

    OTP 4-位带SAR8-位A-D转换器单片机

    标签: OTP A-D SAR 转换器

    上传时间: 2013-05-17

    上传用户:eeworm