proplem with microcode studio !!


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2007
    Posts
    16

    Default proplem with microcode studio !!

    i am beginner in programming with picbasic...

    iam trying to compile this code, for kebad with pic16f877a device...

    --------------------------------------------------------------------------
    OLDRESULT VAR BYTE
    FLAG VAR BIT
    KEYPRESS VAR BYTE
    RESULT VAR BYTE

    TRISB=%11110000
    PORTD=%11111111
    RESULT =$FF
    OLDRESULT=$FF


    MAIN:
    PORTD=OLDRESULT

    GOSUB SCANKEYS

    IF RESULT = OLDRESULT THEN MAIN
    IF RESULT = 12 THEN MAIN

    GOTO MAIN

    SCANKEYS:
    KEYPRESS=0

    PORTB=%1000
    GOSUB ROW
    IF FLAG=1 THEN FIRSTCOLUMN

    PORTB=%0100
    GOSUB ROW
    IF FLAG=1 THEN SECONDCOLUMN

    PORTB=%0010
    GOSUB ROW
    IF FLAG=1 THEN THIRDCOLUMN

    RESULT = 12
    RETURN

    FIRSTCOLUMN:
    LOOKUP KEYPRESS,[1,4,7,10],RESULT
    OLDRESULT = RESULT
    RETURN

    SECONDCOLUMN:
    LOOKUP KEYPRESS,[2,5,8,0], RESULT
    OLDRESULT = RESULT
    RETURN

    THIRDCOLUMN:
    LOOKUP KEYPRESS,[3,6,9,11],RESULT
    OLDRESULT=RESULT
    RETURN

    ROW:
    FLAG=1

    IF PORTB.4=1 THEN EXITROW
    KEYPRESS = KEYPRESS+1

    IF PORTB.5=1 THEN EXITROW
    KEYPRESS=KEYPRESS+1

    IF PORTB.6=1 THEN EXITROW
    KEYPRESS=KEYPRESS+1

    IF PORTB.7=1 THEN EXITROW
    KEYPRESS=KEYPRESS+1

    FLAG=0

    EXITROW:
    RETURN

    END
    --------------------------------------------------------------------------

    but alot of errors appeared like this one:

    error[105]d:\microc~1\keybad\keybad~1.asm 5: cannot open file (include file "c:\PBP245\16f877.inc"not found)

    what is the problem??

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,521


    Did you find this post helpful? Yes | No

    Default

    Hi,
    The problem is that the compiler can't find the file [/i]16F877.inc[/i] in the folder it's looking for it in. Make sure that file is in c:\pbp245\. Also you're saying that you're using a 16F877A but the compiler looks for the include file for 16F877. Make sure that you select the correct device in MicroCode Studio.

    /Henrik Olsson.

Similar Threads

  1. 16F877A Microcode Studio won't compile
    By curt66111 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 25th November 2009, 19:35
  2. Replies: 3
    Last Post: - 1st July 2008, 21:07
  3. Microcode studio loader problem
    By woodygjw in forum General
    Replies: 2
    Last Post: - 10th September 2007, 01:18
  4. Microcode studio and USB pics
    By KPDes in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 27th May 2007, 09:28
  5. How to used ICD of microcode studio
    By chai98a in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 19th November 2005, 00:29

Members who have read this thread : 1

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