摘要: 1 #include <msp430g2553.h> 2 #include "stdio.h" 3 4 #define uint unsigned int 5 #define uchar unsigned char 6 7 #define DS18B20 BIT3 8 #define DS18B20_H P2OUT |= BIT3 9 #define DS18B20_L P2OUT &= ~BIT3 10 11 //以下是DS18B20所需的函数定义 12 13 void B20_init(void); 14 uchar B20_r... 阅读全文
posted @ 2012-08-25 23:25 sky1991 阅读(1700) 评论(0) 推荐(0) 编辑
摘要: 1 #include "io430g2553.h" 2 3 unsigned char Disp_Tab[] = {0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x40}; //段码控制 4 unsigned char dispbit[8]={0xfe,0xfd,0xfb,0xf7,0xef,0xdF,0xbF,0x7F}; //位选控制 5 6 unsigned char LedOut[4]; 7 8 unsigned int num =1234; 9 unsigned int time... 阅读全文
posted @ 2012-08-25 15:04 sky1991 阅读(447) 评论(0) 推荐(0) 编辑