Lawrence Lile wrote: > I always clearly identify all I/O points near the top of the file, > and keep this list up to date > > // PORTB > #byte PORTB = 0x06 > #define Relay 0 // Relay on RB0 etc. etc. ... and then, later in your code, you mistakenly write: BSF PORTA,Relay ;Turn on the relay or PORTA.Relay = 1; // Turn on the relay. You can eliminate this common source of errors by including the port name in your #define: #define Relay PORTB,0 or #define Relay PORTB.0 then: BSF Relay ;Turn on the relay in assembly. or Relay = 1; // Turn on the relay in C. -Andy === Andrew Warren -- aiw@cypress.com === Principal Design Engineer === Cypress Semiconductor Corporation === === Opinions expressed above do not === necessarily represent those of === Cypress Semiconductor Corporation -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.