#include "OB6710.h"
#include "ADC.h"

#define PGA_GAIN_10X  0x02
#define PGA_GAIN_20X  0x00
#define PGA_ENABLE 0x01 
#define PGA_OUT           0x08
#define PGA_OUT_FILTER    0x0C

#define PGA_CURRENT_0UA   0x00
#define PGA_CURRENT_16UA  0x20
#define PGA_CURRENT_30UA0 0x30
#define PGA_BY_PASS 0x40

unsigned char xdata *pData;
unsigned int ResultData[4];

void main(void)
{
	DACVAL0 = 5;
	DACVAL1 = 5;	
	DACCON = 0x03;
  P2BUFFEN = 0x38;
	P2M0 = 0x00;
	P2M1 = 0xB8;	
	OPACON = PGA_GAIN_20X | PGA_ENABLE | PGA_OUT_FILTER ;
	while(1);
}
