The way I do things that need to happen at specific intervals is to have a timer interrupt set a flag. The main program runs in a loop checking the flag, then does the conversion and resets the flag. As long as the time taken to go through the loop is less than the interval, all is well. At 07:48 AM 3/2/2004 -0500, you wrote: >I wanted to ask your advice regarding the use of a MAX127 IC in my >program. >I'm currently using a PIC16C76 and a MAX127 using I2C interface. > >All i'm really doing with this program is reading in 8 pieces of analog >data, comparing it with threshold information, and then displaying the >data on an LCD and sending control bits based on the data. > >I'm using a 4x20 LCD and have about five screens which display the >information differently. The user cycles through screens using a >pushbutton. > >My question is, what is the best way to add a MAX127 read into my >program. > >I was thinking maybe have the whole routine triggered of an internal >timer interrupt. So every X seconds, the program would be interrupted >and gather all >8 samples of analog data. > >Is this what is typically done? > >Any help appreciated. >Thanks > >Dan > > > >-- >http://www.piclist.com hint: PICList Posts must start with ONE topic: >[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads Larry Bradley Orleans (Ottawa), Ontario, CANADA -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads