Analog Devices 16Bit ADC AD7606 테스트

[MODULE]/AD/DA | 2018.02.25 07:07
Posted by nexp

Analog Devices 16Bit ADC AD7606 테스트



RESET 핀

Reset Input. When set to logic high, the rising edge of RESET resets the AD7606/AD7606-6/AD7606-4. The device should receive a RESET pulse directly after power-up. The RESET high pulse should typically be 50 ns wide. If a RESET pulse is applied during a conversion, the conversion is aborted. If a RESET pulse is applied during a read, the contents of the output registers reset to all zeros.






클럭 나오는것 까지 확인 

AD쪽에 +-15V가 필요하다



AD7606 핀맵 정의


//------------------------------------------------------------------------------

//ADC AD7606 Driver

#define AD7606_CS_HI()       (LATD |= BIT0)

#define AD7606_CS_LO()       (LATD &= ~BIT0)


#define AD7606_RST_HI()       (LATD |= BIT1)

#define AD7606_RST_LO()       (LATD &= ~BIT1)


#define AD7606_START_HI()       (LATD |= BIT2)

#define AD7606_START_LO()       (LATD &= ~BIT2)


#define AD7606_CS_INIT()     (TRISD &= ~BIT0)

#define AD7606_RST_INIT()    (TRISD &= ~BIT1)

#define AD7606_START_INIT()    (TRISD &= ~BIT2)

#define AD7606_SPI_INIT         SPI1_Init

//------------------------------------------------------------------------------





AD7606 Data Read 코드


void AD7606_ReadBuf(short *pBuff)

{

    AD7606_START_LO();

     Delay_Us(10);

     AD7606_START_HI();


     AD7606_CS_LO();

     pBuff[0] = SPI1_WriteReadByte(0);

     pBuff[0] |= SPI1_WriteReadByte(0)<<8;


     pBuff[1] = SPI1_WriteReadByte(0);

     pBuff[1] |= SPI1_WriteReadByte(0)<<8;


     pBuff[2] = SPI1_WriteReadByte(0);

     pBuff[2] |= SPI1_WriteReadByte(0)<<8;


     pBuff[3] = SPI1_WriteReadByte(0);

     pBuff[3] |= SPI1_WriteReadByte(0)<<8;

     

     //-----------------------------------------

     pBuff[4] = SPI1_WriteReadByte(0);

     pBuff[4] |= SPI1_WriteReadByte(0)<<8;


     pBuff[5] = SPI1_WriteReadByte(0);

     pBuff[5] |= SPI1_WriteReadByte(0)<<8;


     pBuff[6] = SPI1_WriteReadByte(0);

     pBuff[6] |= SPI1_WriteReadByte(0)<<8;


     pBuff[7] = SPI1_WriteReadByte(0);

     pBuff[7] |= SPI1_WriteReadByte(0)<<8;      

     AD7606_CS_HI();

}


TAG ,

블로그 이미지

nexp

카테고리

분류 전체보기 (1560)
[MyProject] (48)
[TI] (75)
[NXP] (51)
[ST_MICRO] (129)
[FreeScale] (31)
[MSP430] (140)
[Microchip] (131)
Cortex-M (36)
[ATMEL] (29)
[AnalogDevice] (22)
[Embedded] (2)
ARM9 (24)
[AVR] (80)
[DSP] (111)
[8051] (21)
[MCU] (50)
[INTERFACE] (213)
[AppBoard] (23)
[ROBOT] (25)
[MODULE] (129)
[SENSOR] (41)
[DATA] (21)
[FPGA] (32)
[EVB] (1)
[Proramming] (38)
[MyLog] (6)
[IDEA] (0)
[Utility] (19)
[Book] (24)
취미생활 (4)
[Link] (2)