摘要:
文章目录 题目一题目二作业 题目一 写三行数据hello1、hello2、hello3 分别读出每行数据 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> #include <sys/s 阅读全文
摘要:
文章目录 1.open和closeopen的注意事项 2. write3.read问题产生:无法读到数据当时程序当时结果原因分析 4.Iseek附 man1、2、3的解释 1.open和close 原型: int open (const char *pathname, int flags) path 阅读全文
摘要:
文章目录 一、题目要求二、代码操作2.1 main.c2.2 ds1302.c 三、一些心得 一、题目要求 二、代码操作 2.1 main.c #include <STC15F2K60S2.h> #include <intrins.h> #include "ds1302.h" sbit DQ=P1^ 阅读全文
摘要:
文章目录 try_mode.ctry_mode.h try_mode.c #include "try_mode.h" uchar code SMG_duanma[18] = {0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90, 0x88,0x80,0 阅读全文
摘要:
文章目录 一些整理IIC1. PCF85911.1 通道一:光敏电阻1.2 通道三:A/D转换(Rb2) 2. AT24C02EEPROM(寄存器) DS1302(时钟) onewire杂记 一些整理 IIC 1. PCF8591 1.1 通道一:光敏电阻 //Light_read(0X01) uc 阅读全文
摘要:
文章目录 一、题目要求二、代码展示 一、题目要求 二、代码展示 #include <STC15F2K60S2.h> #include "iic.h" #include "ds1302.h" #define uchar unsigned char #define uint unsigned int / 阅读全文
摘要:
文章目录 一、题目要求二、代码展示三、注意事项 一、题目要求 二、代码展示 #include <STC15F2K60S2.h> #include "iic.h" #define uchar unsigned char #define uint unsigned int uchar code SMG_ 阅读全文
摘要:
文章目录 一、IO1.1 fseek1.2 sprintf1.3 snprintf1.4 fprintf 二、缓冲区2.1 缓冲区fflush 2.2 行缓冲:2.3 无缓冲 三、进程3.1 进程的概念3.2 进程的调度机制:3.3 进程的状态3.4 进程的标志3.5 进程相关的命令:1.pstre 阅读全文
摘要:
文章目录 前置模板代码展示 前置 模板代码展示 #include <STC15F2K60S2.h> #define uchar unsigned char #define uint unsigned int uchar code SMG_duanma[18] = {0xc0,0xf9,0xa4,0x 阅读全文
摘要:
文章目录 一、EEPROM、AD/DA电路二、IIC协议介绍三、PCF8591、AT24C02编程3.1 PCF85913.2 AT24C02 四、练习五、代码展示一些事项 一、EEPROM、AD/DA电路 AD/DA电路:光敏电阻、电压分压 EEOROM:保存数据——数据写进和读出 二、IIC协议 阅读全文