Order of operations, I dunno maybe the compiler sorts this out, but . . . logic dictates, cmcon goes before anything portA, then tris registers dictate input or output, then port dictates hi or low status. Unless you are writing this for a basic stamp, why INCLUDE "bs2defs.bas" I would and always do use INCLUDE "MODEDEFS.BAS", as I haven't the foggiest as to what makes a stamp tick. Now having said this , someone will explain to me why I am all wrong