#include
#define DAC0832 XBYTE[0x7FFF]
void delay() /*延时函数*/
{
unsigned int n,i;
for (n=0; n<100; n++) ;
for (i=0; i<300; i++) ;
}
void main()
{
unsigned char i,n=20;
while(1)
for(i=0;i<10;i++)
{
DAC0832=i*n;
delay(); //延时1ms
}
}
程序仿真都有,望采纳!