Hi and welcome to the forum.
You do not have to use the pins in the schematic in the manual for your LCD. You can assign other PIC pins for LCD usage by using the various DEFINE LCD statements. So, in that case, you can reassign the LCD to use other Ports/Pins leaving your Analog pins free.
Here is an example where all the Data and Register connections for an LCD have been assigned to PortC... (PIC16F876)...
Code:Define LCD_DREG PORTC ' Port for LCD Data Define LCD_DBIT 4 ' Use upper 4 bits of Port Define LCD_RSREG PORTC ' Port for RegisterSelect (RS) bit Define LCD_RSBIT 3 ' Port Pin for RS bit Define LCD_EREG PORTC ' Port for Enable (E) bit Define LCD_EBIT 0 ' Port Pin for E bit Define LCB_BITS 4 ' Using 4-bit bus Define LCD_LINES 2 ' Using 2 line Display Define LCD_COMMANDUS 2000 ' Command Delay (uS) Define LCD_DATAUS 50 ' Data Delay (uS)




Bookmarks