Well, no code atm., but: Sort through list, on first item, put the item id in a temp register. Next item, subtract from temp, if carry, it was bigger, so put the item id in the same temp register. Same for last item. The temp register now contains highest. Do the same for all three, but with a different temp register, and this time replace register is NOT carried. This will find the smallest. Check both the first and second register - the item id not in either is the middle. This could be done by making the temp registers the memory address of the item. After you have found the highest and lowest items, use the indirect register to clear them. Then check which item, out of the 3 is not 0 (clear). There is probably a better/quicker/simpler way, but that's how I'd do it. On 7/15/05, Mark Rages wrote: > On 7/15/05, Mark Rages wrote: > > Here's a design challenge for you guys: > > I should add, I'm using the 14-bit 16F688. > > Regards, > Mark > markrages@gmail > -- > You think that it is a secret, but it never has been one. > - fortune cookie > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- Dave All us base are belong to you. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist