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(); 

}


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)