Originally Posted by
Darrel Taylor
Go back up to the first post and take another look at the highlighted code example.
There are no DEFINEs, only VAR and CON.
It must be exactly as shown (except for the actual pins used).
Don't improvise or over think it. Just copy/paste and modify for your pins.
<br>
I must have some other issue at hand then if it's really that simple.
Just for the sake of it I created a new project with the following minimal code, it still fails:
(again MPLAB v8.40, PBP v2.60, PIC16F883)
Code:
CLEAR ; standard opening move
;DEFINE OSC 4 ; set oscillator speed
LCD_DB4 VAR PORTB.5
LCD_DB5 VAR PORTB.4
LCD_DB6 VAR PORTB.3
LCD_DB7 VAR PORTB.2
LCD_RS VAR PORTB.7
LCD_E VAR PORTB.6
INCLUDE "LCD_AnyPin.pbp" ; this include MUST be AFTER LCD Pin assignments
PAUSE 500
TRISA = %11111111
TRISB = %00000000
ADCON1=%00000111
DO
loop:
LCDOUT $FE, 1
PAUSE 250
LCDOUT "Hello"
LCDOUT $FE, $C0
LCDOUT "World"
PAUSE 250
END
...and this is my output spew:Executing: "D:\PBP\PBPMPLAB.BAT" -ampasmwin -k# -p16F883 "Untitled.bas"
Executing: "D:\PBP\PBPW.EXE" -ampasmwin -k# -p16F883 "Untitled.bas"
PICBASIC PRO(TM) Compiler 2.60, (c) 1998, 2009 microEngineering Labs, Inc.
All Rights Reserved.
Pass 1:
Pass 2:
Code Gen:
Macro Pass:
mpasmwin /o- "D:\PIC Projects\Untitled.ASM"
ERROR: Unable to execute mpasmwin.Error[113] D:\PIC PROJECTS\UNTITLED.ASM 244 : Symbol not previously defined (_LCD_DATAUS)
Error[113] D:\PIC PROJECTS\UNTITLED.ASM 244 : Symbol not previously defined (_LCD_DATAUS)
Error[113] D:\PIC PROJECTS\UNTITLED.ASM 244 : Symbol not previously defined (_LCD_COMMANDUS)Halting build on first failure as requested.
BUILD FAILED: Sat Nov 14 14:08:14 2009
Sorry to bother you about this, and than you for taking the time to replay to my posts. Pardon me as I'm a noob to PIC programming and have not developed any intuition with this environment yet.
If this code indeed works for you, as shown, it should work for me but isn't.
(yet)
Bookmarks