//通过18B20检测的数字温度可在电脑上显示当前温度值 #include <reg52.h> #define uchar unsigned char #define uint unsigned int sbit DS=P2^2 //define interface uint temp // variable of temperature ucha...
/* -文件名称:SmartMComDll.h 说 明:声明串口DLL函数 作 者:温子祺 创建时间:2010-08-06 联系方式:wenziqi@hotmail.com 博 客:http://www.cnblogs.com/wenziqi/ 小 组:http://group.ednchina.com/2748/ 官 网:www.smartmcu...
LED 程序 P4OUT=BitCode; //输出位码 LED 流水灯实验 P2OUT=Code[Bit[i]]; //输出段码 #include "msp430x14x.h" BitCode>>=1;//位码右移一位 #define uint unsigned int if(BitCode==0) BitCode=0x80; #define u...
对应程序: #include<reg52.h> #define uint unsigned int #define uchar unsigned char uchar code tab[]={ 0x81, 0x42, 0x24, 0x18, }; void delay(uint z) { uint i,j; for(i=z;i>0;i--) for...
#include<iom16v.h> #include<macros.h> #define uint unsigned int #define uchar unsigned char uint a,b,c,d=0; void delay(c) { for for(a=0;a<c;a++) for(b=0;b<12;b++); }; uchar ta...
//1602液晶显示字屏为:TX-1C MCU GOTOYUNLONGDZ #include<reg52.h> #define uchar unsigned char #define uint unsigned int
#include <stc12c2052AD.H>// 标准库的头文件 #include <intrins.h> #include <absacc.h> #define uchar unsigned char #define uint unsigned int
S6B0724液晶显示驱动程序 void LCD_BUSY(void) void write_LCD_data(uchar lcd_data) void write_LCD_command(uchar command) void clear_lcd(void) void LCDClearLine(uchar line) void prints(uc...
名称:read2543 功能:TLC2543驱动模块 输入参数:port通道号 输出参数:ad转换值 *************************************/ uint read2543(uchar port) { uint ad=0,i CLOCK=0 _CS=0 port<<=4 for(i=0 i<12 i++) { if...