> Where and how do we define those variables? > My understanding is that they should be declared in main.h so The magic is in the separation of defining and declaring (iirc the correct words): in the .h: external int foo; in one of the .c: int foo; It is the same trick you use (probably without knowning) for functions: .h: foo(); .c: foo(){...} Wouter van Ooijen -- ------------------------------------------- Van Ooijen Technische Informatica: www.voti.nl consultancy, development, PICmicro products docent Hogeschool van Utrecht: www.voti.nl/hvu -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist