Put the bits in the address lines of an eeprom Program it with the right pattern to create the count at the outputs Peter van Hoof -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist