📄 callt549.c
字号:
/* 这是调用TLC549的汇编程序(STLC549.ASM)的C51程序, */
/* 文件名CALLT549.C */
/* 功能:本程序主要是读出输入通道ANALOG IN的 */
/* 模数转换值,并将转换值放在变量chai中。 */
#include <reg52.h>
#define uchar unsigned char
#define uint unsigned int
void delay1(uint x);
extern uchar chai; //把全局变量chai声明为外部变量
extern uchar a_func(uchar); //把a_func(uchar)声明为外部函数
void delay1(uint x) //延时程序
{
uchar tw;
while (x-->0){
for (tw=0;tw<125;tw++){;}
}
}
void main()
{
delay1(10);
EA=0;
chai=a_func(0); //带参数调用
while(1);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -