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

BYTE

  • 51单片机驱动步进电机(含电路图和C语言源程序代码)

    51单片机驱动步进电机(含电路图和源程序代码) 源程序:stepper.c stepper.hex /* * STEPPER.C * sweeping stepper's rotor cw and cww 400 steps * Copyright (c) 1999 by W.Sirichote */ #i nclude c:\mc5151io.h /* include i/o header file */ #i nclude c:\mc5151reg.h register unsigned char j,flag1,temp; register unsigned int cw_n,ccw_n; unsigned char step[8]={0x80,0xc0,0x40,0x60,0x20,0x30,0x10,0x90} #define n 400 /* flag1 mask BYTE 0x01 run cw() 0x02 run ccw() */

    标签: 51单片机 驱动 步进电机 C语言

    上传时间: 2013-11-09

    上传用户:钓鳌牧马

  • 51单片机读写u盘(含源程序和原理图)

    附件有51单片机加上sl811读写U盘的源程序和原理图 /*--------------------------------------------------------------------------AT89X52.H Header file for the low voltage Flash Atmel AT89C52 and AT89LV52.Copyright (c) 1995-1996 Keil Software, Inc.  All rights reserved.--------------------------------------------------------------------------*/ #ifndef AT89X52_HEADER_FILE#define AT89X52_HEADER_FILE 1 /*------------------------------------------------BYTE Registers------------------------------------------------*/sfr P0      = 0x80;sfr SP      = 0x81;sfr DPL     = 0x82;sfr DPH     = 0x83;sfr PCON    = 0x87;sfr TCON    = 0x88;sfr TMOD    = 0x89;sfr TL0     = 0x8A;sfr TL1     = 0x8B;sfr TH0     = 0x8C;sfr TH1     = 0x8D;sfr P1      = 0x90;sfr SCON    = 0x98;sfr SBUF    = 0x99;sfr P2      = 0xA0;sfr IE      = 0xA8;sfr P3      = 0xB0;sfr IP      = 0xB8;sfr T2CON   = 0xC8;sfr T2MOD   = 0xC9;sfr RCAP2L  = 0xCA;sfr RCAP2H  = 0xCB;sfr TL2     = 0xCC;sfr TH2     = 0xCD;sfr PSW     = 0xD0;sfr ACC     = 0xE0;sfr B       = 0xF0;

    标签: 51单片机 读写 源程序 原理图

    上传时间: 2014-01-05

    上传用户:lnnn30

  • 用单片机配置FPGA—PLD设计技巧

    用单片机配置FPGA—PLD设计技巧 Configuration/Program Method for Altera Device Configure the FLEX Device You can use any Micro-Controller to configure the FLEX device–the main idea is clocking in ONE BITof configuration data per CLOCK–start from the BIT 0􀂄The total Configuration time–e.g. 10K10 need 15K BYTE configuration file•calculation equation–10K10* 1.5= 15KBYTE–configuration time for the file itself•15*1024*8*clock = 122,880Clock•assume the CLOCK is 4MHz•122,880*1/4Mhz=30.72msec

    标签: FPGA PLD 用单片机 设计技巧

    上传时间: 2013-10-09

    上传用户:a67818601

  • I2C总线驱动程序

    1 /**————————————————————2 〖说明〗I2C总线驱动程序(用两个普通IO模拟I2C总线)3 包括100Khz(T=10us)的标准模式(慢速模式)选择,4 和400Khz(T=2.5us)的快速模式选择,5 默认11.0592Mhz的晶振。6 〖文件〗PCF8563T.C ﹫2001/11/2 77 〖作者〗龙啸九天 c51@yeah.net http://www.c51bbs.co /8 〖修改〗修改建议请到论坛公布 http://www.c51bbs.co m9 〖版本〗V1.00A Build 080310 —————————————————————*/1112 #ifndef SDA13 #define SDA P0_014 #define SCL P0_115 #endif1617 extern uchar SystemError;1819 #define uchar unsigned char20 #define uint unsigned int21 #define BYTE unsigned char22 #define Word unsigned int23 #define bool bit24 #define true 125 #define false 02627 #define SomeNOP(); _nop_();_nop_();_nop_();_nop_();2829 /**--------------------------------------------------------------------------------30 调用方式:void I2CStart(void) ﹫2001/07/0 431 函数说明:私有函数,I2C专用32 ---------------------------------------------------------------------------------*/33 void I2CStart(void)34 {35 EA=0;36 SDA=1; SCL=1; SomeNOP();//INI37 SDA=0; SomeNOP(); //START38 SCL=0;39 }4041 /**--------------------------------------------------------------------------------42 调用方式:void I2CStop(void) ﹫2001/07/0 443 函数说明:私有函数,I2C专用44 ---------------------------------------------------------------------------------*/45 void I2CStop(void)46 {47 SCL=0; SDA=0; SomeNOP(); //INI48 SCL=1; SomeNOP(); SDA=1; //STOP49 EA=1;50 }5152 /**--------------------------------------------------------------------------------53 调用方式:bit I2CAck(void) ﹫2001/07/0 454 函数说明:私有函数,I2C专用,等待从器件接收方的应答55 ---------------------------------------------------------------------------------*/56 bool WaitAck(void)57 {58 uchar errtime=255;//因故障接收方无ACK,超时值为255。59 SDA=1;SomeNOP();60 SCL=1;SomeNOP();61 while(SDA) {errtime--; if (!errtime) {I2CStop();SystemError=0x11;return false;}}62 SCL=0;63 return true;

    标签: I2C 总线 驱动程序

    上传时间: 2014-04-11

    上传用户:xg262122

  • 基于(英蓓特)STM32V100的串口程序

    This example provides a description of how  to use the USART with hardware flowcontrol and communicate with the Hyperterminal.First, the USART2 sends the TxBuffer to the hyperterminal and still waiting fora string from the hyperterminal that you must enter which must end by '\r'character (keypad ENTER button). Each BYTE received is retransmitted to theHyperterminal. The string that you have entered is stored in the RxBuffer array. The receivebuffer have a RxBufferSize BYTEs as maximum. The USART2 is configured as follow:    - BaudRate = 115200 baud      - Word Length = 8 Bits    - One Stop Bit    - No parity    - Hardware flow control enabled (RTS and CTS signals)    - Receive and transmit enabled    - USART Clock disabled    - USART CPOL: Clock is active low    - USART CPHA: Data is captured on the second edge     - USART LastBit: The clock pulse of the last data bit is not output to                      the SCLK pin

    标签: V100 STM 100 32V

    上传时间: 2013-10-31

    上传用户:yy_cn

  • STM8 软件STVD使用教程

    STM8 软件STVD使用教程 ST Visual Programmer简称STVP:程序烧录工具,可以加载单片机的程序,也可以下载程序到单片机,常用于改写STM8的选项字节(option BYTE),一些IO口的复用功能可以在这个软件上修改,兹于本文用于入门,那么不介绍该工具,有兴趣有用到再资讯本协会或网上查找资料

    标签: STM8 STVD 软件 使用教程

    上传时间: 2013-11-14

    上传用户:qw12

  • SL811开发资料_包含源程序_电路图_芯片资料

    SL811开发资料_包含源程序_电路图_芯片资料:SL811HS Embedded USB Host/Slave Controller.The SL811HS is an Embedded USB Host/Slave Controller capable of communicate with either full-speed or low-speed USB peripherals. The SL811HS can interface to devices such as microprocessors, microcontrollers, DSPs, or directly to a variety of buses such as ISA, PCMCIA, and others. The SL811HS USB Host Controller conforms to USB Specification 1.1.The SL811HS USB Host/Slave Controller incorporates USB Serial Interface functionality along with internal full-/low-speed transceivers.The SL811HS supports and operates in USB full-speed mode at 12 Mbps, or at low-speed 1.5-Mbps mode.The SL811HS data port and microprocessor interface provide an 8-bit data path I/O or DMA bidirectional, with interrupt support to allow easy interface to standard microprocessors or microcontrollers such as Motorola or Intel CPUs and many others. Internally,the SL811HS contains a 256-BYTE RAM data buffer which is used for control registers and data buffer.The available package types offered are a 28-pin PLCC (SL811HS) and a 48-pin TQFP package (SL811HST-AC). Both packages operate at 3.3 VDC. The I/O interface logic is 5V-tolerant.

    标签: 811 SL 开发资料 源程序

    上传时间: 2013-12-22

    上传用户:a82531317

  • A windows BMP file is a common image format that Java does not handle. While BMP images are used onl

    A windows BMP file is a common image format that Java does not handle. While BMP images are used only on windows machines, they are reasonably common. Reading these shows how to read complex structures in Java and how to alter they BYTE order from the big endian order used by Java to the little endian order used by the windows and the intel processor.

    标签: BMP windows common format

    上传时间: 2013-12-27

    上传用户:gaojiao1999

  • 介绍几种cpuThe 8xC251SA/SB/SP/SQ improves on the MCS-51 architecture and peripheral features, introducin

    介绍几种cpuThe 8xC251SA/SB/SP/SQ improves on the MCS-51 architecture and peripheral features, introducing the advanced register based CPU architecture i.e., the MCS 251 microcontroller architecture. The register based CPU supports a 40-BYTE register file. In addition, the 8xC251SA/SB/SP/SQ microcontroller has 256-KBYTE expanded external code/data memory space and 64-KBYTE stack space. The new controller is also specially designed to execute C code efficiently. More importantly, the 8xC251SA/SB/SP/SQ maintains binary code compatibility with MCS 51 microcontrollers but at the same time allows the use of the powerful MCS 251 microcontroller instruction set, with many new 8, 16 and 32 bit instructions available. The 8xC251SA/SB/SP/SQ has 512 BYTEs or 1 KBYTE of on-chip data RAM options and is available in 16 KBYTEs and 8 KBYTEs of on-chip ROM/OTPROM or ROMless options.

    标签: architecture introducin peripheral improves

    上传时间: 2015-03-15

    上传用户:ccclll

  • RSA加密算法

    RSA加密算法,界面操作,可以很方便的对文件的内容进行加密,而且为了能加密更长的内容,算法中采用了分段加密的手段。其算法步骤如下:1. 读取公钥e和n,作加密之用。 2. 从DecText中读取一大段明文,转化成明文字节数组BYTE[]。 3. 再把BYTE[]分成若干小段明文字节数组sectBYTE[]。 4. 使用e和n对所有的sectBYTE[]进行加密,并合成一大段密文,添加到EncText。 5. 读取下一大段明文,若明文为空,完成加密;否则转2

    标签: RSA 加密算法

    上传时间: 2013-12-26

    上传用户:bruce