Have another look at the datasheet, regarding the ANSEL. ANSEL has its bit high, when the corresponding port-bits are to be used as Analogue inputs. If in need of a Digital input, the correspnding ANSEL bit must be Low. regards, Sergio Sena On 16 March 2012 13:07, alan smith wrote: > I have a board with a PIC18F13K22 that uses PORTA for the ICSP pins, and = because I am pin bound I also need to use these for switch inputs (obviousl= y cant run debugger and switches at the same time) > > So I enabled the pullups in INTCON2, and on WPUA, and made sure that the = ANSEL is set high as well, and yes set TRISA to inputs also. > > I did a simple routine to watch for the switch and loop to a routine wher= e it turns on the LED. > > No joy...been playing with this on and off for about a week....so finally= need to ask the group....what else might be going on that I havent thought= about? > > I actually did add external pullups...still no joy > > Any thoughts?=A0 I know I am overlooking something obvious.... > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist --=20 A. S=E9rgio Sena www.antoniosergiosena.com --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .