Pic16f88 compiling. . not working


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    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 ?

  2. #2
    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

  3. #3
    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

  4. #4
    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  

  5. #5
    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..

  6. #6
    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.

  7. #7
    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: 497
Size:  440.1 KBName:  mcs2.jpg
Views: 487
Size:  442.2 KB

  8. #8
    Join Date
    Sep 2007
    Location
    USA, CA
    Posts
    271


    Did you find this post helpful? Yes | No

    Default Re: Pic16f88 compiling. . not working

    Did you notice that it selected the assembler from your recycle bin?

    Also, it has been several years since I worked with the 16f88, but iirc it has at least one of the peripherals enabled by default. You must go through each and every pin used with the lcd and make sure it is configured to be a regular i/o pin, and not configured as a peripheral pin.

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