I am trying to test my I2C DAC using the following PIC C language. But there is no output at all when i used the digital multimeter to test it. The microcntroller board has went though the functional test. Is the following sorce code logic flow right? To output a high at the DAC output pin. Thank you, Nicholas #include #include //function prototype void MAX517(unsigned int channel); void main(void){ char data_DAC; //init condition TRISC = 0X1A; //Set SDA & SCL as 1. Activate I2C port OpenI2C(MASTER, SLEW_ON); //Initialize I2C module SSPADD = 9; //400KHz Baud clock (9) @16MHz while(1){ //Start condition data_DAC = 0xFF; MAX517(data_DAC); //Write data to I2C DAC }//end of while }//end of main void MAX517(unsigned int channel){ StartI2C(); //Start condition WriteI2C(0x58); //Address byte of DAC AckI2C(); //Ack WriteI2C(0x00); //Command byte AckI2C(); //Ack WriteI2C(channel); //Output Data AckI2C(); //Ack StopI2C(); //Stop condition }//end of MAX517 funtion -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads