> It seems we are going some where. > I have set the pins 3 & 4 of PortA as inputs. > What do you mean by supplying Stimulus? Read the manual. Stimulus is a method of forcing the inputs to certain values so that you can simulate external influences. TTYL -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.