I used XP mode, to run 32 bit application. I compile it under dos and the program works fine including the LCD ..
ken
I used XP mode, to run 32 bit application. I compile it under dos and the program works fine including the LCD ..
ken
It's in your first row something like this :
@ DEVICE pic16F88, XT_OSC, WDT_OFF, PWRT_OFF, BOD_OFF, MCLR_ON ?
here is the code:
'LCD testing program
@ DEVICE pic16F88, INTRC_OSC, WDT_OFF, PWRT_OFF, BOD_OFF, MCLR_ON
OSCCON = %01110000 '8 Mhz
DEFINE OSC 8
'/////////////////////////
'// LCD configuration //
'/////////////////////////
DEFINE LCD_DREG PORTB ' Set LCD Data port
DEFINE LCD_DBIT 4 ' Set starting Data bit (0 or 4) if 4-bit bus
DEFINE LCD_RSREG PORTB ' Set LCD Register Select port
DEFINE LCD_RSBIT 0 ' Set LCD Register Select bit
DEFINE LCD_EREG PORTB ' Set LCD Enable port
DEFINE LCD_EBIT 1 ' Set LCD Enable bit
DEFINE LCD_BITS 4 ' Set LCD bus size (4 or 8 bits)
DEFINE LCD_LINES 2 ' Set number of lines on LCD
DEFINE LCD_COMMANDUS 2500
DEFINE LCD_DATAUS 250
DEFINE CHAR_PACING 2000
pause 1000
Mainloop:
lcdout $FE,1, " This is a test" '
lcdout $FE,$C0, "Next or Select" '
pause 200
GOTO Mainloop
End
and here is the error message:
Executing: "C:\PBPDEMO\PBPW.EXE" -ampasmwin -k# -p16F88 "lcdtest.bas"
PICBASIC PRO(TM) Compiler 2.60C, (c) 1998, 2011 microEngineering Labs, Inc.
All Rights Reserved.
ERROR: Unable to execute mpasmwin.Warning[207] C:\PBPDEMO\LCDTEST.ASM 117 : Found label after column 1. (DEVICE)
Error[122] C:\PBPDEMO\LCDTEST.ASM 117 : Illegal opcode (pic16F88)
Halting build on first failure as requested.
BUILD FAILED: Sun Oct 30 00:00:24 2011
ken
but it does compile if I remove this line:
@ DEVICE pic16F88, INTRC_OSC, WDT_OFF, PWRT_OFF, BOD_OFF, MCLR_ON
but nothing happens on the LCD
My MPlab is configures as following when I go into the language tools option.. in the executable:
C:\PBP\PBPMPLAB.BAT
K
I dont have microcode studio, just MPLab and a plain text editor..
Micro Code Studio ships with PBP. It is on your install CD.
Dave
Always wear safety glasses while programming.
Here is the configuration I have:
![]()
Bookmarks