dac0832.c

来自「DAC0832产生各种波形的源程序。初学者可以参考。老鸟就不用看了。」· C语言 代码 · 共 28 行

C
28
字号
#include "REGX52.H"
#include "absacc.h"
#include "intrins.h"

#define  DA_Port XBYTE[0x7FFF]

void Delay(unsigned char i)
{
   while(i--)
   ;
}

 void main(void)
 {
	unsigned char DA_Value;
	unsigned int i, j;


	while(1)
	{
	   for(DA_Value=0; DA_Value<255; DA_Value++)
	       DA_Port = DA_Value;
	   for(DA_Value=255; DA_Value>0; DA_Value--)
	       DA_Port = DA_Value;
	   
	}
 	
 }

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?