Pic16f88 compiling. . not working


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default Re: Pic16f88 compiling. . not working

    I used XP mode, to run 32 bit application. I compile it under dos and the program works fine including the LCD ..

    ken

  2. #2
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    Did you find this post helpful? Yes | No

    Default Re: Pic16f88 compiling. . not working

    It's in your first row something like this :
    @ DEVICE pic16F88, XT_OSC, WDT_OFF, PWRT_OFF, BOD_OFF, MCLR_ON ?

  3. #3
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default Re: Pic16f88 compiling. . not working

    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

  4. #4
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default Re: Pic16f88 compiling. . not working

    My MPlab is configures as following when I go into the language tools option.. in the executable:

    C:\PBP\PBPMPLAB.BAT

    K

  5. #5
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    Did you find this post helpful? Yes | No

    Default Re: Pic16f88 compiling. . not working

    Do you have this setting ?
    Attached Images Attached Images  

  6. #6
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default Re: Pic16f88 compiling. . not working

    I dont have microcode studio, just MPLab and a plain text editor..

  7. #7
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Pic16f88 compiling. . not working

    Micro Code Studio ships with PBP. It is on your install CD.
    Dave
    Always wear safety glasses while programming.

  8. #8
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default Re: Pic16f88 compiling. . not working

    Here is the configuration I have:
    Name:  mcs1.jpg
Views: 466
Size:  440.1 KBName:  mcs2.jpg
Views: 458
Size:  442.2 KB

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts