5.3 Example Program
DEMO_01.C
/* ============== Using
=================*/
#include <stdio.h> #include “A822.h”
main(void)
{int data1,data2; float vol1,vol2;
/*
for(;;)
{
/*===============reading
=============*/
A822_AD_SetChGainMode(0,0,1);
| /* Setup |
| */ |
A822_DO(0x0010); | |
| /* Send D/O data to |
delay(10); | /* delay about 43u sec . Ref. Page 3 Settling time */ |
data1=A822_AD_PollingVar();
/* Reading
/*===========reading
===============*/
A822_AD_SetChGainMode(0,0,1);
/* Setup
| 21 |