PDA

View Full Version : pf compiler problem



dave_c
- 14th September 2004, 07:28
G'day All
I've trying to use the 4functn.bas and FP20.Bas in a program for 16f876, I've placed all the files needed in the project folder as per the Melab's readme FP.zip documentation, setup mpasm as my assembler in PBP picbasic options and PBP as the compiler
The only thing i changed was to add the below first 2 defines and chage the lcd to port b from the original ports for a 877 and the assembler error i get is..
error[113]c:\pbp\pbppic14.lib 2668:Symbol not previously defined [portb]
can some one help with what this means and how i might fix it??

Thanks Dave


Define LOADER_USED 1
Define OSC 20
include "fp20.bas"

' Define LCD registers and bits
DEFINE LCD_DREG Portb
DEFINE LCD_DBIT 0
DEFINE LCD_EREG Portb
DEFINE LCD_EBIT 4
DEFINE LCD_RSREG Portb
DEFINE LCD_RSBIT 5
DEFINE LCD_BITS 4
DEFINE LCD_LINES 2

Melanie
- 15th September 2004, 00:44
1. Have you tried it with Portb all in UPPERCASE in the LCD define statements?

2. Are you trying to compile your program for a PIC that hasn't got PORTB?... eg you intend to compile for 16F675 but you've got a typo specifying 12F675?

dave_c
- 15th September 2004, 01:19
Thanks Melanie,
quirky thing isn't it ....! yep the change to uppercase solved that problem now to put it into action. It's this type of problem that drives me crazy.
typo's have been a problem as can be seen from the thread title
:(