单片机音乐代码答:include "reg51.h"define uint unsigned int define uchar unsigned char uchar * TABLE ;code uint TABLE1 [15]={64260,64400,64524,64580,64684,64777,64820,64898,64968,65030,65058,65110,65157,65178,65217};code uchar SONG [ ]={ //1. 迟来的爱 };code uchar S...
各位大佬,我需要一个单片机的程序代码答:// 单片机的程序代码,可以增加花样。include<reg52.h> //包含 reg52.h 这个头文件 include<intrins.h> define led P2// char i;char a[]={0xff,0x00,0xff,0x00,0xff,0x00,0xff,0xff }; // LED灯花样1 char b[]={0xaa,0x55,0xaa,0x55,0xaa,0x55,0xff,0xff }; // LED灯...
单片机定时器实验的代码怎么写?求详细注释。答:如果是100ms中断一次,那么晶振需要用6MHz include<reg51.h>#define uchar unsigned charuchar t1,sec1,dscan=0,dis[3]={0,0,0};uchar table={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};void t0isr() interrupt 1{TH0=(65536-50000)/256;TL0=(65536-50000)%256;t1++...