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

BYTE

  • DAI0061A_BYTE_addressing BYTE addresssing in ARM

    DAI0061A_BYTE_addressing BYTE addresssing in ARM

    标签: A_BYTE_addressing addresssing 0061 BYTE

    上传时间: 2017-09-27

    上传用户:康郎

  • BYTE-of-python-chinese-edition

    BYTE-of-python-chinese-edition中文版python入门简明教程

    标签: BYTE-of-python-chinese-edition

    上传时间: 2020-06-19

    上传用户:piaolingzuo

  • 8位OTP单片机芯片MC10P23XXY管脚与三星9454完

    主要特点管脚完全与三星9454兼容8位CISC型内核(MC05)4K BYTE OTP ROM208 BYTE RAM3组IO口(最多可支持17个通用IO口和1个输入口)1个PWM输出1个8位基本定时器1个8位带比较输出的定时器1个10位ADC(9路输入)2个外中断、1个定时器中断、1个PWM中断看门狗复位功能3V低压复位可选晶振/RC振荡晶振400K-8MHzRC振荡有3.2MHz(@5V,typ.)、8MHz(@5V,typ.)、外接电阻电容3种可选

    标签: 9454 10P OTP P23

    上传时间: 2013-11-05

    上传用户:Jerry_Chow

  • CAT25128-128Kb的SPI串行CMOS EEPRO

    The CAT25128 is a 128−Kb Serial CMOS EEPROM device internally organized as 16Kx8 bits. This features a 64−BYTE page write buffer and supports the Serial Peripheral Interface (SPI) protocol. The device is enabled through a Chip Select (CS) input. In addition, the required bus signals are clock input (SCK), data input (SI) and data output (SO) lines. The HOLD input may be used to pause any serial communication with the CAT25128 device. The device featuressoftware and hardware write protection, including partial as well as full array protection.

    标签: 25128 EEPRO CMOS CAT

    上传时间: 2013-11-15

    上传用户:fklinran

  • AT89C2051驱动步进电机的电路和源码

    AT89C2051驱动步进电机的电路和源码:AT89C2051驱动步进电机的电路和源码 程序: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.hregister 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() */main(){ flag1=0; serinit(9600); disable(); /* no need timer interrupt */ cw_n = n; /* initial step number for cw */ flag1 |=0x01; /* initial enable cw() */while(1){ { tick_wait(); /* wait for 10ms elapsed */energize(); /* round-robin execution the following tasks every 10ms */ cw(); ccw(); } }}cw(){ if((flag1&0x01)!=0) { cw_n--; /* decrement cw step number */ if (cw_n !=0) j++; /* if not zero increment index j */ else {flag1&=~0x01; /* disable cw() execution */ ccw_n = n; /* reload step number to ccw counter */ flag1 |=0x02; /* enable cww() execution */ } }

    标签: C2051 2051 89C AT

    上传时间: 2013-11-21

    上传用户:boyaboy

  • PCA9544A 4channel I2C multiple

    The PCA9544A provides 4 interrupt inputs, one for each channeland one open drain interrupt output. When an interrupt is generated byany device, it will be detected by the PCA9544A and the interruptoutput will be driven LOW. The channel need not be active fordetection of the interrupt. A bit is also set in the control BYTE.Bits 4 – 7 of the control BYTE correspond to channels 0 – 3 of thePCA9544A, respectively. Therefore, if an interrupt is generated byany device connected to channel 2, the state of the interrupt inputs isloaded into the control register when a read is accomplished.Likewise, an interrupt on any device connected to channel 0 wouldcause bit 4 of the control register to be set on the read. The mastercan then address the PCA9544A and read the contents of thecontrol BYTE to determine which channel contains the devicegenerating the interrupt. The master can then reconfigure thePCA9544A to select this channel, and locate the device generatingthe interrupt and clear it. The interrupt clears when the deviceoriginating the interrupt clears.

    标签: 4channel multiple 9544A 9544

    上传时间: 2014-12-28

    上传用户:潜水的三贡

  • DS1820 C51 子程序 (一线数据传输)

    //芯片资料请到www.elecfans.com查找 //DS1820 C51 子程序//这里以11.0592M晶体为例,不同的晶体速度可能需要调整延时的时间//sbit DQ =P2^1;//根据实际情况定义端口 typedef unsigned char BYTE;typedef unsigned int  word; //延时void delay(word useconds){  for(;useconds>0;useconds--);} //复位BYTE ow_reset(void){  BYTE presence;  DQ = 0; //pull DQ line low  delay(29); // leave it low for 480us  DQ = 1; // allow line to return high  delay(3); // wait for presence  presence = DQ; // get presence signal  delay(25); // wait for end of timeslot  return(presence); // presence signal returned}     // 0=presence, 1 = no part //从 1-wire 总线上读取一个字节BYTE read_BYTE(void){  BYTE i;  BYTE value = 0;  for (i=8;i>0;i--)  {    value>>=1;    DQ = 0; // pull DQ low to start timeslot    DQ = 1; // then return high    delay(1);  //for (i=0; i<3; i++);     if(DQ)value|=0x80;    delay(6); // wait for rest of timeslot  }  return(value);} //向 1-WIRE 总线上写一个字节void write_BYTE(char val){  BYTE i;  for (i=8; i>0; i--) // writes BYTE, one bit at a time  {    DQ = 0; // pull DQ low to start timeslot    DQ = val&0x01;    delay(5); // hold value for remainder of timeslot    DQ = 1;    val=val/2;  }  delay(5);} //读取温度char Read_Temperature(void){  union{    BYTE c[2];    int x;  }temp;   ow_reset();  write_BYTE(0xCC); // Skip ROM  write_BYTE(0xBE); // Read Scratch Pad  temp.c[1]=read_BYTE();  temp.c[0]=read_BYTE();  ow_reset();  write_BYTE(0xCC); //Skip ROM  write_BYTE(0x44); // Start Conversion  return temp.x/2;}

    标签: 1820 C51 DS 程序

    上传时间: 2013-11-03

    上传用户:hongmo

  • 串行编程器源程序(Keil C语言)

    串行编程器源程序(Keil C语言)//FID=01:AT89C2051系列编程器//实现编程的读,写,擦等细节//AT89C2051的特殊处:给XTAL一个脉冲,地址计数加1;P1的引脚排列与AT89C51相反,需要用函数转换#include <e51pro.h> #define C2051_P3_7 P1_0#define C2051_P1 P0//注意引脚排列相反#define C2051_P3_0  P1_1#define C2051_P3_1 P1_2#define C2051_XTAL P1_4#define C2051_P3_2 P1_5#define C2051_P3_3 P1_6#define C2051_P3_4 P1_7#define C2051_P3_5 P3_5 void InitPro01()//编程前的准备工作{ SetVpp0V(); P0=0xff; P1=0xff; C2051_P3_5=1; C2051_XTAL=0; Delay_ms(20); nAddress=0x0000; SetVpp5V();} void ProOver01()//编程结束后的工作,设置合适的引脚电平{ SetVpp5V(); P0=0xff; P1=0xff; C2051_P3_5=1; C2051_XTAL=1;} BYTE GetData()//从P0口获得数据{ B_0=P0_7; B_1=P0_6; B_2=P0_5; B_3=P0_4; B_4=P0_3; B_5=P0_2; B_6=P0_1; B_7=P0_0; return B;} void SetData(BYTE DataBYTE)//转换并设置P0口的数据{ B=DataBYTE; P0_0=B_7; P0_1=B_6; P0_2=B_5; P0_3=B_4; P0_4=B_3; P0_5=B_2; P0_6=B_1; P0_7=B_0;} void ReadSign01()//读特征字{ InitPro01(); Delay_ms(1);//----------------------------------------------------------------------------- //根据器件的DataSheet,设置相应的编程控制信号 C2051_P3_3=0; C2051_P3_4=0; C2051_P3_5=0; C2051_P3_7=0; Delay_ms(20); ComBuf[2]=GetData(); C2051_XTAL=1; C2051_XTAL=0; Delay_us(20); ComBuf[3]=GetData(); ComBuf[4]=0xff;//----------------------------------------------------------------------------- ProOver01();} void Erase01()//擦除器件{ InitPro01();//----------------------------------------------------------------------------- //根据器件的DataSheet,设置相应的编程控制信号 C2051_P3_3=1; C2051_P3_4=0; C2051_P3_5=0; C2051_P3_7=0; Delay_ms(1); SetVpp12V(); Delay_ms(1); C2051_P3_2=0; Delay_ms(10); C2051_P3_2=1; Delay_ms(1);//----------------------------------------------------------------------------- ProOver01();} BOOL Write01(BYTE Data)//写器件{//----------------------------------------------------------------------------- //根据器件的DataSheet,设置相应的编程控制信号 //写一个单元 C2051_P3_3=0; C2051_P3_4=1; C2051_P3_5=1; C2051_P3_7=1; SetData(Data); SetVpp12V(); Delay_us(20); C2051_P3_2=0; Delay_us(20); C2051_P3_2=1; Delay_us(20); SetVpp5V(); Delay_us(20); C2051_P3_4=0; Delay_ms(2); nTimeOut=0; P0=0xff; nTimeOut=0; while(!GetData()==Data)//效验:循环读,直到读出与写入的数相同 {  nTimeOut++;  if(nTimeOut>1000)//超时了  {   return 0;  } } C2051_XTAL=1; C2051_XTAL=0;//一个脉冲指向下一个单元//----------------------------------------------------------------------------- return 1;} BYTE Read01()//读器件{ BYTE Data;//----------------------------------------------------------------------------- //根据器件的DataSheet,设置相应的编程控制信号 //读一个单元 C2051_P3_3=0; C2051_P3_4=0; C2051_P3_5=1; C2051_P3_7=1; Data=GetData(); C2051_XTAL=1; C2051_XTAL=0;//一个脉冲指向下一个单元//----------------------------------------------------------------------------- return Data;} void Lock01()//写锁定位{ InitPro01();//先设置成编程状态//----------------------------------------------------------------------------- //根据器件的DataSheet,设置相应的编程控制信号 if(ComBuf[2]>=1)//ComBuf[2]为锁定位 {  C2051_P3_3=1;  C2051_P3_4=1;  C2051_P3_5=1;  C2051_P3_7=1;  Delay_us(20);  SetVpp12V();  Delay_us(20);  C2051_P3_2=0;  Delay_us(20);  C2051_P3_2=1;  Delay_us(20);  SetVpp5V(); } if(ComBuf[2]>=2) {  C2051_P3_3=1;  C2051_P3_4=1;  C2051_P3_5=0;  C2051_P3_7=0;  Delay_us(20);  SetVpp12V();  Delay_us(20);  C2051_P3_2=0;  Delay_us(20);  C2051_P3_2=1;  Delay_us(20);  SetVpp5V(); }//----------------------------------------------------------------------------- ProOver01();} void PreparePro01()//设置pw中的函数指针,让主程序可以调用上面的函数{ pw.fpInitPro=InitPro01; pw.fpReadSign=ReadSign01; pw.fpErase=Erase01; pw.fpWrite=Write01; pw.fpRead=Read01; pw.fpLock=Lock01; pw.fpProOver=ProOver01;}

    标签: Keil 串行 C语言 编程器

    上传时间: 2013-11-12

    上传用户:gut1234567

  • 用C51写的普通拼音输入法源程序代码

    用C51写的普通拼音输入法源程序代码:原作使用了一个二维数组用以查表,我认为这样比较的浪费空间,而且每个字表的索引地址要手工输入,效率不高。所以我用结构体将其改写了一下。就是大家现在看到的这个。  因为代码比较的大,共有6,000多汉字,这样就得要12,000 BYTE来存放GB内码,所以也是没办法的.编译结果约为3000h,因为大部分是索引表,代码优化几乎无效。    在Keil C里仿真芯片选用的是华邦的W77E58,它有32k ROM, 256B on-chip RAM, 1K on-chip SRAM (用DPTR1指针寻址,相当于有1K的片上xdata)。条件有限,没有上片试验,仿真而已。  打算将其移植到AVR上,但CodeAVRC与IAR EC++在结构体、指针的定义使用上似乎与C51不太一样,现在还未搞定。还希望在这方面有经验的网友能给予指导。 #include<stdio.h> char * py_ime(char *); void main(void){ while(1)    {     char input_string[]="yI";     xdata char chinese_string[255];     sprintf(chinese_string,"%s",py_ime(input_string));    }}

    标签: C51 拼音输入法 代码 源程序

    上传时间: 2013-10-30

    上传用户:cainaifa

  • 16 16点阵显示汉字原理及显示程序

    16 16点阵显示汉字原理及显示程序 #include "config.h" #define                DOTLED_LINE_PORT        PORTB #define                DOTLED_LINE_DDR                DDRB #define                DOTLED_LINE_PIN                PINB #define                DOTLED_LINE_SCKT        PB1 #define                DOTLED_LINE_SCKH        PB5 #define                DOTLED_LINE_SDA                PB3 #define                DOTLED_ROW_PORT                PORTC #define                DOTLED_ROW_DDR                DDRC #define                DOTLED_ROW_PIN                PINC #define                DOTLED_ROW_A0                PC0 #define                DOTLED_ROW_A1                PC1 #define                DOTLED_ROW_A2                PC2 #define                DOTLED_ROW_A3                PC3 #define                DOTLED_ROW_E                PC4 uint8 font[] = { /*--  调入了一幅图像:这是您新建的图像  --*/ /*--  宽度x高度=16x16  --*/ 0x00,0x00,0x00,0x00,0x08,0x38,0x18,0x44,0x08,0x44,0x08,0x04,0x08,0x08,0x08,0x10, 0x08,0x20,0x08,0x40,0x08,0x40,0x08,0x40,0x3E,0x7C,0x00,0x00,0x00,0x00,0x00,0x00 }; static void TransmitBYTE(uint8 BYTE); static void SelectRow(uint8 row); static void FlipLatchLine(void); static void TransmitBYTE(uint8 BYTE) {         uint8 i;                  for(i = 0 ; i < 8 ; i ++)         {                 if(BYTE & (1 << i))                 {                         DOTLED_LINE_PORT |= _BV(DOTLED_LINE_SDA);                 }                 else                 {                         DOTLED_LINE_PORT &= ~_BV(DOTLED_LINE_SDA);                 }                 //__delay_cycles(100);                 DOTLED_LINE_PORT |= _BV(DOTLED_LINE_SCKH);                 //__delay_cycles(100);                 DOTLED_LINE_PORT &= ~_BV(DOTLED_LINE_SCKH);                 //__delay_cycles(100);         } } static void SelectRow(uint8 row) {           //row -= 1;         row |= DOTLED_ROW_PIN & 0xe0;         DOTLED_ROW_PORT = row; } static void FlipLatchLine(void) {         DOTLED_LINE_PORT |= _BV(DOTLED_LINE_SCKT);         DOTLED_LINE_PORT &= ~_BV(DOTLED_LINE_SCKT); } void InitDotLedPort(void) {         DOTLED_LINE_PORT &= ~(_BV(DOTLED_LINE_SCKT) | _BV(DOTLED_LINE_SCKH));         DOTLED_LINE_PORT |= _BV(DOTLED_LINE_SDA);         DOTLED_LINE_DDR |= _BV(DOTLED_LINE_SCKT) | _BV(DOTLED_LINE_SCKH) | _BV(DOTLED_LINE_SDA);                  DOTLED_ROW_PORT |= 0x1f;         DOTLED_ROW_PORT &= 0xf0;         DOTLED_ROW_DDR |= 0x1f; } void EnableRow(boolean IsEnable) {         if(IsEnable)         {                 DOTLED_ROW_PORT &= ~_BV(DOTLED_ROW_E);         }         else         {                 DOTLED_ROW_PORT |= _BV(DOTLED_ROW_E);         } } void PrintDotLed(uint8 * buffer) {         uint8 i , tmp;                  for(i = 0 ; i < 16 ; i ++)         {                 tmp = *buffer ++;                 TransmitBYTE(~tmp);                 tmp = *buffer ++;                 TransmitBYTE(~tmp);                 SelectRow(i);                 FlipLatchLine();         } } void main(void) {         InitDotLedPort();                  EnableRow(TRUE);                  while(1)         {                 PrintDotLed(font);                 __delay_cycles(5000);         }          } //---------------------------------------------------- config.h文件 #ifndef        _CONFIG_H #define        _CONFIG_H //#define                GCCAVR #define                CPU_CYCLES        7372800L #ifndef                GCCAVR #define                _BV(bit)        (1 << (bit)) #endif #define                MSB                0x80 #define                LSB                0x01 #define                FALSE                0 #define                TRUE                1 typedef                unsigned char        uint8; typedef                unsigned int        uint16; typedef                unsigned long        uint32; typedef                unsigned char        boolean; #include <ioavr.h> #include <inavr.h> #include "dotled.h" #endif //-----

    标签: 16 点阵显示 汉字 显示程序

    上传时间: 2013-11-18

    上传用户:mnacyf