-
-
DS1302时钟+1602液晶#include <REGX52.H>
#include "LCD1602.h"
#include "DS1302.h"
void Delay1ms(unsigned int count)
{
unsigned int i,j;
for(i=0;i<count;i++)
for(j=0;j<120;j++);
}
main()
{
SYSTEMTIME CurrentTime;
LCD_Initial();
Initial_DS1302();
GotoXY(0,0);
...
-
-
Max7221动态显示#include <REGX52.H>
#include "Max7221.h"
unsigned char DisplayBuffer[8]={0,1,2,3,4,5,6,7};//ÏÔʾ»º³åÇø
main()
{
InitialMax7221();
Max7221Display(&DisplayBuffer[0]);
while(1);
}
-
-
超级终端#include <REGX51.H>
#include "HyperTerminal.h"
void main(void)
{
InitHyperTerminal();
while(1)
{
RunHyperTerminal();
}
}
-
-
模拟串口#include <reg51.h>
//初始化串行口
void csh()
{
SM0=0;
SM1=1;
REN=1;
TI=0;
RI=0;
PCON=0;
TH1=0xFD;
TL1=0XFD;
TMOD=0X20;
EA=1;
ET1=0;
ES=1;
TR1=1;
}
void main()
{
csh();
while(1)
{;}
}
void intrr() interrupt 4
{...
-
-
用法: csv2json.py data.csv > data.json#!/usr/bin/env python
import sys
import csv
import json
if len(sys.argv) < 2: raise SystemExit
reader = csv.DictReader(open(sys.argv[1]))
print json.dumps([row for row in reader], indent=2)
-
-
LED闪烁, protus实现 #include<reg51.h>
sbit LED = P0^0; //LED接P0.0
void delay(unsigned int x) //延时函数
{
while(x--);
}
void main() //主函数
{
while(1)
{
LED=0; //P0.0输出低电平,LED灭
delay(5000); //调用延...
-
-
...功率输出时<2.5%总谐波失真(THD):额定功率输出的> 25%时<5%为简单起见,输入直流环节电容器和输出LC滤波器为
-
-
...,负载两端的电压由下式给出:Vo = Vin + Ldi / dt因此,V0>V。
-
-
编译库的需求:libibverbs
编译参数:GCC <文件名> -o service -libverbs
运行方式:有IB网络支持:
服务端:./service
客户端:./service 服务端IP走ROCE:
服务端:./service -g 0
客户端:./service -g 0 服务端IP
-
-
双极性电路输出的pwm波只有±Ud。Ur>Uc时,给V1和V4导通信号,负载电流为正的时候,则V1和V4导通,为负的时候,VD1和VD4导通,两者输出都是Ud