Make friends with Datasheets...
Since you've defined Digital Outputs for your LCD across PortA, try setting ADCON1=$07 at the start of your program... and come back and say if it worked...
See Datasheet 17.2 ADCON1 register, then look down at the table setting the PCGF3-PCGF0 bits) to see why. By default this register powers up as all zero's (see Table 4.2 Register File Summary for the POR [Power On Reset] values).
Later on, when you want to play with Analogue Inputs, revisit the PCFG bits of ADCON1 and configure appropriately... (eg you'll probably want to set RA0 as Analogue and the others Digital).
Tip: It's always a good idea to also define the TRIS Registers (TRISA, TRISB, TRISC etc) at the start of your program, whether you're using a particular pin or not. Pins used for LCD can be defined as Outputs. Get in the habit of doing this, as in these early simple stages you can omit them and things might still work, but later they'll bite you if you forget about them and you'll spend countless hours trying to figure why your programs don't work as expected.
Bookmarks