上一页 1 ··· 122 123 124 125 126 127 128 129 130 ··· 180 下一页
摘要: STC单片机采取EEPROM的模式而不采用FLASH.裸机程序指令就在Flash(Flash memory)中存放,而数据就放在了RAM中(flash的写入次数有限制,同时它的速度和RAM还是差很多)。更广泛说,在单片机上RAM存放data段、bss段、堆栈段;ROM(EPROM、EEPROM、Fl 阅读全文
posted @ 2021-08-12 21:03 myrj 阅读(386) 评论(0) 推荐(0) 编辑
摘要: 首先显示”时.分“,K1时增加,K2分增加(如果不修改时分默认5分钟:300秒倒计时) K3开始倒计时,显示秒倒计时,到时报警BEEP K4停止报警,并返回到”时分“状态,又可以设置倒计时时间,来回循环 #include<reg51.h> #define uchar unsigned char; # 阅读全文
posted @ 2021-08-11 10:26 myrj 阅读(439) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <math.h> /* C 语言不允许返回一个完整的数组作为函数的参数。但是,可以通过指定不带索引的数组名来返回一个指向数组的指针。如果您想要从函数返回一个一维数组,必须声明一个返回指针的函数,如下: int * myFunction() { 阅读全文
posted @ 2021-08-11 06:07 myrj 阅读(1225) 评论(0) 推荐(0) 编辑
摘要: 一、c 语言中字符数组和数字的相互转换函数; 相关函数:atof atoi,atol, strtod,strtol,strtoul 在头文件stdlib中 #include<stdlib.h> (1)atof (将字串转换成浮点型数) ascii to floating 的缩写 char *str 阅读全文
posted @ 2021-08-11 06:01 myrj 阅读(1492) 评论(0) 推荐(0) 编辑
摘要: #include<reg51.h> #define uchar unsigned char; #define uint unsigned int; uchar position; uchar tt,bz1=0,bz2=0,bz3=0; char buffer [3]; uint second,n; 阅读全文
posted @ 2021-08-10 22:06 myrj 阅读(434) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> int main() { int arr[] = {1,2,3,4,5}; int length = sizeof(arr)/sizeof(int); printf("%d\n",length); getchar(); } 阅读全文
posted @ 2021-08-10 16:18 myrj 阅读(445) 评论(0) 推荐(0) 编辑
摘要: 1.字符数组赋值:char c1[20] = "women"; 2。将数转为字符赋值给数组 #include <stdio.h> #include <cstdlib> #include <stdlib.h> int main() { char c1[20] = "women"; int num=10 阅读全文
posted @ 2021-08-10 15:32 myrj 阅读(311) 评论(0) 推荐(0) 编辑
摘要: uchar code table1[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};//0--9uchar code table[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x 阅读全文
posted @ 2021-08-10 13:34 myrj 阅读(513) 评论(0) 推荐(0) 编辑
摘要: #include<reg51.h> #define uchar unsigned char; #define uint unsigned int; uchar position; uchar tt,bz1=0,bz2=0,bz3=0; uint second; uchar minute; uchar 阅读全文
posted @ 2021-08-10 13:29 myrj 阅读(337) 评论(0) 推荐(0) 编辑
摘要: #include<reg51.h> #define uchar unsigned char; #define uint unsigned int; uchar position; uchar tt,bz1=0,bz2=0,bz3=0; uchar second; uchar minute; ucha 阅读全文
posted @ 2021-08-10 13:06 myrj 阅读(200) 评论(0) 推荐(0) 编辑
上一页 1 ··· 122 123 124 125 126 127 128 129 130 ··· 180 下一页