02 2012 档案
摘要:#include #include "..\lib\delay.h"typedef unsigned char uchar;typedef unsigned int uint;#define S1 0x7e#define S2 0x7d#define S3 0x7b#define S4 0x77#define S5 0xbe#define S6 0xbduchar PLAY;sbit IN1 =...
阅读全文
摘要:#include <reg52.h>sbit LED = P1^1;unsigned char count;void main(){ TMOD = 0x01; //工作方式1 ,T/C 0 是一个16位定时器 / 计数器 TH0 = 0x3c; TL0 = 0xb0; EA = 1; ET0 = 1; TR0 = 1; LED = 0; while(1) { }}void T1_timer() interrupt 1{ TH0 = 0x3c; TL0 = 0xb0; count++; if(count ==...
阅读全文
摘要:class Program { static void Main(string[] args) { //int i = 11; //int b = (i & 0xf0); //byte temp = 0x86; //var h = temp & 0xf0; //Console.WriteLine("{0}", i); //Console.ReadKey(); ushort buf = 0xf1f0; ...
阅读全文