Just got hit with the next 'gotcha'!
I was trying to get an LED to light up when the button on my low pin count was pressed - just spent ages trying to figure out why the LED wouldn't light. A check with my voltmeter revealed no matter code I tried, RA3 was always held low, a bit of Googling revealed this...
http://www.microchip.com/forums/tm.aspx?m=270347
F: Pushbutton doesn't work with Low Pin Count (LPC) or 28-Pin Demo Boards
The pushbutton cannot be used on these demo boards when debugging or programming and powering them from the MPLAB IDE. The pushbutton switch is connected to the input pin that is shared with the nMCLR/VPP pin. When Debugging, this pin must be used as nMCLR and cannot be used as an input pin. When programming and leaving the PICkit 2 connected to the Demo Board to power it, the MPLAB IDE always maintains a valid output state on a programmer's nMCLR/VPP pin which prevents the switch from changing the signal value. Use the PICkit 2 Programmer software to allow the switch to be used.
It seems I now have to assemble, & then fire up PICKit 2 to wrtie the hex to the PIC (button works as it should then).
Mindboggling for a beginner like me, ie that there should be so many 'enviromental' hurdles to get over, when all I want is to learn the most simple of code!




Bookmarks