Warren Davis is correct in that the Gray code is a CLASS of binary codes. The IEEE Standard Dictionary of Electical and Electronic Terms defines the Gray Code as ALL binary codes in which sequential numbers are represented by binary expressions, each of which differs from the preceeding expression in one place only. See also :Phister,M ; Logical Design of Digital Computers and F. Gray, U.S. Patent No. 2632058, March 17,1953. In the olden days (way before microcontrollers and even before DTL and TTL IC's) we used such tools as Truth Tables, Veitch Diagrams, Venn Diagrams and pages of Boolean Algebra to design flip-flop based Gray Code counters. Now it requires nothing more than a PIC and a look-up table! Roger Stevens Ortemp, Inc Contract Product Design Tel. (707) 433-4459 FAX (707)433-4459 ----------------------------------------- What is a JOWETT JUPITER ? Are there really Jowett Nuts ? rogerlstevens@juno.com -----------------------------------------