본문 바로가기

[MODULE]/ADC

LTC2704 - Quad 12-, 14- and 16-Bit DAC 테스트

LTC2704 - Quad 12-, 14- and 16-Bit Voltage Output SoftSpan DACs 테스트




우선 SPI 2 정상 출력되는것만 확인.
/LDAC 핀을 흔들어 줘야 정상 출력이 나올것 같은데... 설명이 조금 에매하다...
테스트 해봐야 정확하게 알수 있을듯.

When the asynchronous load pin, LDAC, is taken low, all DACs are updated with code and span data (data in B1 buffers is copied into B2 buffers). CS/LD must be high during this operation. The use of LDAC is functionally identical to the “Update B1→B2” commands.













LTC2704 초기화 코드

void LTC2704_Init(void)

{

    LTC2704_CS_INIT();

    LTC2704_CS0_HI();

    LTC2704_CS1_HI();

    LTC2704_SPI_INIT();    

    

    LTC2704_CS0_LO(); 

    LTC2704_SPI_Send(0x2F);   //range

    LTC2704_SPI_Send(0x00);

    LTC2704_SPI_Send(0x01);   //+10V

    LTC2704_CS0_HI();  

}       






LTC2704 Data 출력 코드



void LTC2704_DataSet0(unsigned char Ch, unsigned short Data)

{

    unsigned char chanel[4] = {0, 2, 4, 6};    

    

    LTC2704_CS0_LO(); 

    LTC2704_SPI_Send(0x30+chanel[Ch]);

    LTC2704_SPI_Send(Data>>8);

    LTC2704_SPI_Send(Data);

    LTC2704_CS0_HI();

}


void LTC2704_DataOut0(unsigned char Ch)

{

    unsigned char chanel[4] = {0, 2, 4, 6};    

    

    LTC2704_CS0_LO(); 

    LTC2704_SPI_Send(0x40+chanel[Ch]);

    

    LTC2704_SPI_Send(0x00);

    LTC2704_SPI_Send(0x00);

    LTC2704_CS0_HI(); 

}


반응형