求懂单片机的高手解释下单C程序

这个是DAC0832产生锯齿波的程序
#include <reg51.h>
#include <absacc.h>
#define DAC0832 XBYTE[0x7ffe]
#define uchar unsigned char

void func1(uchar height, uchar time)
{
uchar i,j;
for(i=0;i<=height;i++)
{
for(j=0;j<time;j++)
DAC0832=i;
}
}

void func2(uchar height,uchar time)
{
uchar i,j;
for(i=0;i<height;i++)
{
for(j=0;j<time/2;j++)
DAC0832=i;
}
for(i=height;i>0;i--)
{
for(j=0;j<time/2;j++)
DAC0832=i;
}
}

void func3(uchar height,uchar time1,uchar time2)
{
uchar i;
for(i=0;i<time1;i++)
DAC0832=height;
for(i=0;i<time2;i++)
DAC0832=0;
}

void func4(uchar height,uchar time1,uchar time2)
{
uchar i,j;
for(i=0;i<height;i++)
{
for(j=0;j<time1;j++)
DAC0832=i;
}

for(i=0;i<time2;i++)
{ for(j=0;j<100;j++)
DAC0832=height;
}

for(i=height;i>0;i--)
{
for(j=0;j<time1;j++)
DAC0832=i;
}

for(i=0;i<time2;i++)
{ for(j=0;j<100;j++)
DAC0832=0;
}
}

void main()
{
while(1)
{
func1(255,255);
func2(255,255);
func3(255,255,255);
func4(180,255,255);
}
}

这个是ADC0809数字电压表
#include<reg52.h>
unsigned char code dispbitcode[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};
unsigned char dispbuf[4];
unsigned int i;
unsigned int j;
unsigned char getdata;
unsigned int temp;
unsigned int temp1;
unsigned char count;
unsigned char d;
sbit ST=P3^0;
sbit OE=P3^1;
sbit EOC=P3^2;
sbit CLK=P3^3;
sbit P34=P3^4;
sbit P35=P3^5;
sbit P36=P3^6;
sbit P20=P2^0;
sbit P21=P2^1;
sbit P22=P2^2;
sbit P23=P2^3;
sbit P17=P1^7;
void TimeInitial();
void Delay(unsigned int i);

void TimeInitial()
{ TMOD=0x10;
TH1=(65536-200)/256;
TL1=(65536-200)%256;
EA=1;
ET1=1;
TR1=1;
}
void Delay(unsigned int i)
{
unsigned int j;
for(;i>0;i--)
{
for(j=0;j<125;j++)
{;}
}
}

void Display()

{
P1=dispbitcode[dispbuf[3]];
P20=0;
P21=1;
P22=1;
P23=1;
Delay(10);
P1=0x00;
P1=dispbitcode[dispbuf[2]];
P17=1;
P20=1;
P21=0;
P22=1;
P23=1;
Delay(10);
P1=0x00;
P1=dispbitcode[dispbuf[1]];
P20=1;
P21=1;
P22=0;
P23=1;
Delay(10);
P1=0x00;
P1=dispbitcode[dispbuf[0]];
P20=1;
P21=1;
P22=1;
P23=0;
Delay(10);
P1=0x00;
}
void main()
{
TimeInitial();
while(1)
{
ST=0;
OE=0;
ST=1;
ST=0;
P34=0;
P35=0;
P36=0;
while(EOC==0);//查询转换结束
OE=1;
getdata=P0;
OE=0;
temp=getdata*1.0/255*500;
dispbuf[0]=temp%10;
dispbuf[1]=temp/10%10;
dispbuf[2]=temp/100%10;
dispbuf[3]=temp/1000;
Display();

}
}

void t1(void) interrupt 3 using 0
{
TH1=(65536-200)/256;
TL1=(65536-200)%256;
CLK=~CLK;
}
求大神翻译下 目前只有20分 提问还要花5分 只有15分
前面,其实知道DAC0832 的原理,很容易理解这段程序