最新文章
-
芯片设计:写tb常用函数和语法
1. $display("abc",signal); 该命令会自动换行。 2. $random,产生随机数,产生的随机数有正负之分。 {$random}只产生正数,{$random}0常用于取0~99范围…… -
芯片设计:modelsim do脚本
作者:白栎?D 以下其实是一个tcl语法的脚本,使用了modelsim的命令。 提供4个命令:sim, re, q, clear.功能如下: sim: 刚开始仿真时,建立库、映射库…… -
-
-
-
-
-
STC烧写软件与flash magic使用
STC烧写软件下载地址:http://www.51hei.com/f/STC-ISP%E4%B8%8B%E8%BD%BD%E7%BC%96%E7%A8%8B%E8%BD%AF%E4%BB%B6.rar 一、选择单片机型号(如STC89C52RC) …… -
-
-
proteus使用小技巧
一、点击system------>set sheet size便可修改。二、proteus中电解电容区别正负极的方法:空心的是正极,画斜线的是负极。三、调整仿真步长时间 system—…… -
-
C语言中针的用法
说起他的都是废话;直接上例子讲解。 void max_min(array1) int array1[10]; {int *max,*min; //-----------(1) 定义了两个指针变量 max,minint k,l; int…… -
-
单片机开源项目之Stopwatch数码管
此程序是在51hei单片机开发板上面做的,如需要移植到自己的电路上,修改相应的端口即可,开发板完整的电路图下载: 点这里 (注意:只需要看相关部分即可,其…… -
-
-
LPC2103流水灯
#include "inc\lpc2103.h" #include "inc\config.h" #define uchar unsigned char #define uint unsigned int void Sys_Init(void) { PINSEL0=0x00000000;…… -
定时器时钟+按键调整+1602显示
#include<reg51.h> #define uchar unsigned char #define uint unsigned int uchar code table[]="00:00:00 XINQI"; uchar code table1[]="2000-01…… -
单片机蜂鸣器_滴滴音的产生
#include <reg51.h> unsigned int t02s; bit flag; sbit P1_5=P1^5; void main(void) { TMOD=0x01; TH0=(65536-500)/256; TL0=(65536-500)%6; TR0=1…… -
DS18B20读写程序
#include<reg51.h> //包含单片机寄存器的头文件 #include<intrins.h> //包含_nop_()函数定义的头文件 #define uchar unsigned char #define …… -
DS1302读写程序(IIC总线)
#include<reg51.h> //包含单片机寄存器的头文件 #include<intrins.h> //包含_nop_()函数定义的头文件 #define uchar unsigned char #define …… -
51单片机一个输出口显示多位输出
电路图 #include"reg51.h" sbit LE0=P3^0; sbit LE1=P3^1; sbit LE2=P3^2; sbit LE3=P3^3; int i,j,k; int xx[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,…… -
24小时单片机时钟终于搞定了
此程序的电路图下载:http://www.51hei.com/f/ks51.pdf 只需要看数码管部分即可,其他部分可忽略掉. #include <reg52.h>//stc89c51单片机头文件 t…… -
使用定时器中断让数码管动态显示
此程序的电路图下载:http://www.51hei.com/f/ks51.pdf 只需要看数码管部分即可,其他部分可忽略掉. #include <reg52.h> typedef unsigned char uch……