ADC0808运用总线

AD 0808采集,运用总线方式传递数据

程序

#include <reg51.h> #include <intrins.h> #include <absacc.h>

#include <stdio.h>

#include <stdlib.h> #include <string.h> #include <math.h>

#define ADC0808 0xf000

unsigned char Adbuf[8]; float Dy[8];

float T[8];

code char LEDTAB[]= {

0x3f,0x06,0x5b,0x4f,0x66, 0x6d,0x7d,0x07,0x7f,0x6f, };

void Delayms(unsigned int ms) {

while(ms)

{

unsigned char i; for (i=0; i<240; i++); ms--;

}

}

void ex0int() interrupt 0 {

}

unsigned char Ad(char loop) {

char c;

XBYTE[ADC0808]=loop; Delayms(1);

c=XBYTE[ADC0808];

XBYTE[ADC0808]=loop;

ADC0808运用总线相关文档

最新文档

返回顶部