Hi All,
I put myself down as a newbie even though I played with Pic's over a year ago.
The problem I have stems from I had a severe brain injury and had to undergo surgery, and since then I have had problems remembering things.

I've had to start leaning about Pic's and PBP from scratch really.

To help myself I bought an easypic 6 but decided to stick with PBP instead of Mikrobasic (had a quick look and it seemed really hard compared to PBP)

I cant figure out what I'm doing wrong,
I'm trying to get the simle "hello world" lcd test working but it just wont

My code is as follows
Code:
'****************************************************************
'*  Name    : Test.BAS                                          *
'*  Author  : Lewis                                             *
'*  Notice  :                                                   *
'*          : All Rights Reserved                               *
'*  Date    : 07/12/2009                                        *
'*  Version : 1.0                                               *
'*  Notes   :                                                   *
'*          :                                                   *
'****************************************************************
  @   DEVICE pic16F887,HS_OSC
   'LCD DEFINATION
        DEFINE OSC 8
        DEFINE LCD_DREG PORTB       ' Set LCD Data port
        DEFINE LCD_DBIT 0           ' Set starting Data bit (0) 
        DEFINE LCD_RSREG PORTB      ' Set LCD Register Select port
        DEFINE LCD_RSBIT 4          ' Set LCD Register Select bit, Port B.4
        DEFINE LCD_EREG PORTB       ' Set LCD Enable port
        DEFINE LCD_EBIT 5           ' Set LCD Enable bit, PORTB.5
        DEFINE LCD_BITS 4           ' Set LCD bus size 4 bits
        DEFINE LCD_LINES 2         ' Set number of lines on LCD to 4 Lines
        DEFINE LCD_COMMANDUS 2000   ' Set command delay time in us
        DEFINE LCD_DATAUS 50        ' Set data delay time in us

'*******************************************************************************
   pause 500       ' Wait for LCD to startup

loop:   Lcdout $fe, 1   ' Clear LCD screen
        Lcdout "Hello"  ' Display Hello
        Pause 500       ' Wait .5 second

        Lcdout $fe, 1   ' Clear LCD screen
        Lcdout "World"
        Pause 500       ' Wait .5 second

        Goto loop       ' Do it forever
I set it like that after studying the easypic manual and lcd that came with it

I use MicroCode Studio

The programmer is the picflash program that came with the easypic board, the xtal is 8Mhz

When I write the program in Microcode Studio I get a wierd effect when choosing a 16F887 PIC
the ICD Compile row of buttons goes greyed out, yet they dont when choosing a 16F877
Does this matter?


I get the following error when I compile I have no idea what it is.
Warning [207]C:P\pbp\tests\lcdtes~1.asm 108 : found label after colum 1. (DEVICE)
Error [122] c:\pbp\tests\cdtes~1.asm 108 : Illegal opcode (pic16f877)

IF I take the @ DEVICE pic16F877,HS_OSC out and put it as the first line of the program it does the same thing

If I take it out altogether it compiles ok but just won't do anything with the LCD.

I don't want anyone to write any code for me, I want and need to learn, however I'd really like someone to help please and explain what I'm doing wrong please.

I also tried changing the osc to xt but it makes no difference.

Has anyone any ideas? and sorry for asking for help for what must be to most of you a very simple problem, but I've spent 3 days trying to figure out what is wrong, as well as trying various combinations of code.

Oh Picflash v7.13
Microcode Studio ver 3.0.0.5
PBP ver I THINK it's 2.50C but not sure how to check.
Windows 7 X64