OK, I got it to work. I dont know what it was but all I did was try compiling on of the MCS samples, it compiled, tried non sample code and it does try to compile now.

Although I am getting

Error C:\PBP\PBPPIC14.LIB 235 : [225] Undefined Symbol 'PORTE'
Error C:\PBP\PBPPIC14.LIB 2780 : [225] Undefined Symbol 'PORTE'
Error C:\PBP\PBPPIC14.LIB 2781 : [225] Undefined Symbol 'PORTE'
Error C:\PBP\PBPPIC14.LIB 2785 : [225] Undefined Symbol 'PORTE'
Error C:\PBP\PBPPIC14.LIB 2786 : [225] Undefined Symbol 'PORTE'
Error C:\PBP\PBPPIC14.LIB 2796 : [225] Undefined Symbol 'PORTD'
Error C:\PBP\PBPPIC14.LIB 2796 : [212] Extra Tokens on End of Line
Error C:\PBP\PBPPIC14.LIB 2867 : [225] Undefined Symbol 'PORTE'
Error C:\PBP\PBPPIC14.LIB 2885 : [225] Undefined Symbol 'PORTE'
Error C:\PBP\PBPPIC14.LIB 2909 : [225] Undefined Symbol 'PORTE'
Error C:\PBP\PBPPIC14.LIB 2916 : [225] Undefined Symbol 'PORTD'
Error C:\PBP\PBPPIC14.LIB 2916 : [212] Extra Tokens on End of Line
Error C:\PBP\PBPPIC14.LIB 2924 : [225] Undefined Symbol 'PORTD'
Error C:\PBP\PBPPIC14.LIB 2924 : [212] Extra Tokens on End of Line
Error C:\PBP\PBPPIC14.LIB 2930 : [225] Undefined Symbol 'PORTE'
Fatal C:\PBP\PBPPIC14.LIB 2930 : [300] Too Many Errors


I am tring to Compile the code below for the 16F84. Can anyone see any problems with the code? Why would I get an "Undefined PORTD and PORTE" error when compiling for the 16F84 which does not have these ports.


MyCode:


Include "Modedefs.bas"

DEFINE OSC 4

' ** Declare LCDOUT Defines **

DEFINE LCD_DREG PortB ' Set Data to PortB
DEFINE LCD_DBIT 0 ' Set starting Data to Bit0
DEFINE LCD_RSREG PortA ' Set Register Select to PortA
DEFINE LCD_RSBIT 2 ' Set RS line to PORTA.2
DEFINE LCD_EREG PortA ' Set Enable to PortA
DEFINE LCD_EBIT 3 ' Set Enable line to PortA.3
DEFINE LCD_BITS 8 ' Set for 8 bit Bus
DEFINE LCD_LINES 2 ' Set number of lines to 2

' ** Define LCD Control Constants **

I Con 254 ' Control Byte
Clr Con 1 ' Clear the display
Line1 Con 128 ' Point to beginning of line 1
Line2 Con 192 ' Point to beginning of line 2
Line3 Con 148 ' Point to beginning of line 3
Line4 Con 212 ' Point to beginning of line 4
Cgram Con 64 ' Point to Cgram within LCD
Shift_L Con 24 ' Shift display left
Shift_R Con 28 ' Shift display right

' ** Declare Variables **

SO Var PortA.0 ' Serial In Inverted
VDD Var PortA.1 ' LCD VDD pin
SO2 Var PortA.4 ' Serial In True
Rcvbyte Var Byte ' The byte received

Main:
Low VDD ' Turn Off LCD
Pause 500 ' Wait for Pic to Initialise
High VDD ' Turn On LCD
Pause 50 ' Wait for LCD to Initialize
TrisB = 255 ' Set PortB to Input
Goto Start_Disp

Goto Main ' Just In case it Missed


Start_Disp:
Gosub Clr_It ' Initialize the LCD

Start_N9600:
Serin SO,N9600,Rcvbyte ' Get Serial Data in
Lcdout Rcvbyte ' Send straight out to LCD
Goto Start_N9600 ' Loop back forever

' Initialize LCD
Clr_It:
High VDD ' Switch On LCD VDD
TrisB = 0 ' Set Port to Output
Pause 100 ' Wait for LCD to Initialise
Lcdout I,Clr
Pause 30 ' Clear the LCD
Lcdout I,Line1," LCD Serializer"
Return