Is it called timer sub-routine in C language? It is a sub-routine in the C-lauguage. I don't know how to write in C language. ----- Original Message ----- From: To: Sent: Sunday, March 07, 2004 4:02 AM Subject: Re: [PIC]:How to write timer function for PIC18F452? > 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 > -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads