FYI, this DEFINE is the default one, if you don't write it yourself, PBP will do it for you in background.
Let's see what happen in the .LST file, i compile those lines...
Code:
Define LCD_DREG PORTD ' Define LCD connections
Define LCD_DBIT 4
Define LCD_RSREG PORTE
Define LCD_RSBIT 0
Define LCD_EREG PORTE
Define LCD_EBIT 1
LCDOUT "Hello"
Now, i open the .LST file, scroll to the end... and
Code:
LCD_BITS 00000004
LCD_COMMANDUS 000007D0
LCD_DATAUS 00000032
LCD_DBIT 4
LCD_DREG PORTD
LCD_EBIT 1
LCD_EREG PORTE
LCD_LINES 00000002
LCD_RSBIT 0
LCD_RSREG PORTE
LCD_RWBIT 00000000
LCD_RWREG 00000009
everything is there. Now what happen, if i don't use any DEFINE
.LST
Code:
LCD_BITS 00000004
LCD_COMMANDUS 000007D0
LCD_DATAUS 00000032
LCD_DBIT 00000000
LCD_DREG 00000005
LCD_EBIT 00000003
LCD_EREG 00000006
LCD_LINES 00000002
LCD_RSBIT 00000004
LCD_RSREG 00000005
LCD_RWBIT 00000004
LCD_RWREG 00000005
Interesting eh! But i agree, it's always nice to have ALL DEFINE in your code, so if one day you decide to change them, it's just easy. PICMultiCalc also generate those.. kinda lazy stuff... and some day i am 
---------------------------------------
Finally: Please tell me why this should work. In trying to read all the fun stuff down in the chip technical papers I must be missing something and I definitely want to be more astute as to why as well as how.
Well, why ADCON1 would have to work? Where did you get this value ? 
Let's see a datasheet snip...
<IMG SRC="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1634&stc=1&d=117924073 8">
ADCON1=7 set PCFG3:PCFG0 to 0111.. right? If so, what happen to AN0,1,2,3,4,5,6,7 ?
ADCON1=$0F set PCFG3:PCFG0 to 1111.. right? If so, what happen to AN0,1,2,3,4,5,6,7,8,9,10,11,12 ?
I think it's the explanation :-)
EDIT: Sorry PicUser.. we write at the same time !
Bookmarks