On Sun, 7 Mar 2004, Nicholas wrote: > - I do not know how to write a timer function in C to sample the wave file > from the EEPROM at 8KHz to the DAC. > - The PIC18F452 and both I2c devices have a frquecy of 400KHz. > - As the DAC (MAX517) does not have a clk input to allow me to sample the > data at 8KHz to the amplifier, therefore I need to write a PIC-C timer > function. I'm not sure what you mean by "timer function", but I would suggest configuring TMR2 to generate an 8kHz interrupt, and write to the DAC in your ISR. -- John W. Temples, III -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu