上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 33 下一页
2017年1月2日
摘要: 所使用的开发板 普中科技HC6800-ES V2.0 PC:win7 64位 编译软件: keil uversion2 烧写工具: 普中科技开发的PZ-ISP V1.82 烧写方式:热烧写 阅读全文
posted @ 2017-01-02 19:38 ChaseForFuture 阅读(623) 评论(0) 推荐(0)
摘要: /* 蜂鸣器分为有源和无源 其中有源是指有振荡源 ULN2003 达林顿管 输入输出反向放大 */ #include "reg52.h" typedef unsigned int u16; //蜂鸣器通过ULN2003与80C51的P1^5引脚连接 sbit beep=P1^5; void delay(u16 i) { while(i--); } void main() { wh... 阅读全文
posted @ 2017-01-02 15:03 ChaseForFuture 阅读(276) 评论(0) 推荐(0)
摘要: /* c语言常用预处理命令 1.#define使用 #define A PO 后面不用加分号、 #define PI 3.14 2.循环左移右移函数 _crol_(a,b)循环左移函数,a是左移的值,b是移动的位数。 _cror_(a,b)循环右移函数,a是右移的值,b是移动的位数。 包含在intrins.h库函数里面 */ #include "reg52.h" #includ... 阅读全文
posted @ 2017-01-02 14:21 ChaseForFuture 阅读(274) 评论(0) 推荐(0)
摘要: //引入头文件 #include typedef unsigned char u8; typedef unsigned int u16; //位定义 sbit LED=P2^0; /* 延时函数 可以传参来调节延时时间 由于函数调用与参数传递需要耗费时钟周期,所以这种延时是不准确的 最终的耗时与时钟频率和参数有关 */ void delay(u16 i){ //什么都不做 只耗时间 来达... 阅读全文
posted @ 2017-01-02 13:07 ChaseForFuture 阅读(171) 评论(0) 推荐(0)
摘要: 注意,如果HKEY_CLASSES_ROOT\TypeLib\{F5078F18-C551-11D3-89B9-0000F81FE221}下面没有6.0,那么就自己新建一个。 阅读全文
posted @ 2017-01-02 11:57 ChaseForFuture 阅读(401) 评论(0) 推荐(0)
2016年12月31日
摘要: #include "stdio.h" #include "unistd.h" #include "sys/types.h" int gvar=2; int main() { pid_t pid; int var = 5; printf("process id:%ld\n",(long)getpid()); printf("gvar=%d var=%d\n",gvar,var); pid=... 阅读全文
posted @ 2016-12-31 14:32 ChaseForFuture 阅读(310) 评论(0) 推荐(0)
摘要: 打印结果: 由此看出 fork()没有共享内存资源,仅仅是复制了父进程的所有资源 阅读全文
posted @ 2016-12-31 14:01 ChaseForFuture 阅读(702) 评论(0) 推荐(0)
2016年12月30日
摘要: #include "malloc.h" #include "stdio.h" #define LEN sizeof(struct student) typedef struct student { int num; int age; float score; struct student *next; }stu; int n; // 创建动态链表函数 stu *... 阅读全文
posted @ 2016-12-30 23:40 ChaseForFuture 阅读(161) 评论(0) 推荐(0)
2016年12月29日
摘要: 动态内存是由程序员手动分配,不再使用时,一定记得释放内存。 静态内存是程序开始运行时由编译器分配的内存,它的分配是程序开始编译时完成的,不占用cpu资源。程序中的各种变量在编译源程序时就已经分配了内存空间,当该变量在作用域内使用完毕时,系统自动释放所占用的内存空间。问题是内存不足或溢出的问题。 编译 阅读全文
posted @ 2016-12-29 22:15 ChaseForFuture 阅读(138) 评论(0) 推荐(0)
2016年12月22日
摘要: Java程序员有许多应遵循的守则或最佳实践方式。本文概述了每个开发者最应该遵循的10条守则或戒律,如果不遵循它们,将会导致灾难性后果。 1. 为代码添加注释(Add comments to your code). – 每个人都知道这一点,但不是每个人都会这么做。你有多少次“忘记”添加注释了?确实,注 阅读全文
posted @ 2016-12-22 18:01 ChaseForFuture 阅读(214) 评论(0) 推荐(0)
上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 33 下一页