Hi Ken, Thanks for replying, I'm really in need of some suggestions. Heres my component I'm using: Microcontroller - Microchip PIC18F452 Digital to Angloue convertor - Max 517 > 1) What is the value you are using for the pull-up resistors on the I2C bus? The specification for the MAX DAC suggested that for 400KHz used pullup resistor value of 2Kohm. So that the value i'm using. > 2) What is the voltage of the voltage reference? I need an output voltage of 0.22V to supply to the audio amplifier. Therefore I tied the pin 5 (ref0) of DAC to a voltage divider(10Kohm to source and 470ohnm to ground). Therefore the voltage reference to the DAC is 0.22V > 3) Or if you are not using one, does the MAX ADC chip have a built-in reference? I don't have the data sheet handy http://pdfserv.maxim-ic.com/en/ds/MAX517-MAX519.pdf > 4) What PICmicro are you using? I'm using Microcontroller - Microchip PIC18F452 http://www.microchip.com/download/lit/pline/picmicro/families/18fxx2/39564b.pdf > 5) What does the digital multimeters say the voltage is WRTG (with respect to ground)? There is no value at DAC output (0V) But when I measure the DAC source and wrt ground, there is a supply of 5V. > In other words, what voltage are you expecting and what are you actually measuring? I am testing the DAC at the present moment to see where my DAC is it working with my PIC18F452. Therefore I tried to send a high (0xff) to the DAC using PIC-C language. I should expect some voltage at the output instead of 0V right? > 6) Could you show us the source code of all the C functions you are using but are not showing the source code to? http://www.microchip.com/download/tools/picmicro/code/mplab18/51297b.pdf 2.4 I2CT FUNCTIONS 2.4.1 Function Descriptions Function Description AckI2C - Generate I2C bus Acknowledge condition. CloseI2C - Disable the SSP module. DataRdyI2C - Is the data available in the I2C buffer? getcI2C - Read a single byte from the I2C bus. getsI2C - Read a string from the I2C bus operating in master I2C mode. IdleI2C - Loop until I2C bus is idle. NotAckI2C - Generate I2C bus Not Acknowledge condition. OpenI2C - Configure the SSP module. putcI2C - Write a single byte to the I2C bus. putsI2C - Write a string to the I2C bus operating in either Master or Slave mode. ReadI2C - Read a single byte from the I2C bus. RestartI2C - Generate an I2C bus Restart condition. StartI2C - Generate an I2C bus START condition. StopI2C - Generate an I2C bus STOP condition. WriteI2C - Write a single byte to the I2C bus. Here is my source code: #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 Nicholas ----- Original Message ----- From: "Ken Pergola" To: Sent: Wednesday, March 17, 2004 10:05 PM Subject: Re: [PIC]:I2C DAC test > Nicholas wrote: > > > > 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. > > > Hi Nicholas, > > I see you are using the 'divide and conquer' approach -- this is good. > > I still think you should provide some more details: > > Nicholas, could you answer the following questions for starters?: > > 1) What is the value you are using for the pull-up resistors on the I2C bus? > > 2) What is the voltage of the voltage reference? > > 3) Or if you are not using one, does the MAX ADC chip have a built-in > reference? > I don't have the data sheet handy > > 4) What PICmicro are you using? > > 5) What does the digital multimeters say the voltage is WRTG (with respect > to ground)? > In other words, what voltage are you expecting and what are you actually > measuring? > > 6) Could you show us the source code of all the C functions you are using > but are not showing the source code to? > > > > Best regards, > > Ken Pergola > > -- > http://www.piclist.com hint: PICList Posts must start with ONE topic: > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads