Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 18, 2024, 02:35:58 14:35


Login with username, password and session length


Pages: [1]
Print
Author Topic: Why cannot compile PIC16F877A  (Read 16748 times)
0 Members and 1 Guest are viewing this topic.
newboy
Junior Member
**
Offline Offline

Posts: 94

Thank You
-Given: 42
-Receive: 20


« on: February 29, 2008, 08:27:06 08:27 »

Hi all,

I just install PicBasicPro 2.50 ( update to 2.50a) and then install Microcode Studio Plus 3.0.0.5.

I succesfully compile 'blink.bas' from sample (using PIC16F877)  to blink.hex but when I change the uC to 16F877A, it's give such error. I looked at /PBP/, there is 16F877a.inc. Any solution ?
« Last Edit: February 29, 2008, 08:46:59 08:46 by newboy » Logged
sohel
Senior Member
****
Offline Offline

Posts: 442

Thank You
-Given: 167
-Receive: 149



« Reply #1 on: February 29, 2008, 09:39:18 09:39 »

its not compiler problem. u need to setup pbp proper way. read help file how to setup pbp, or copy include file from pbp247.
« Last Edit: February 29, 2008, 09:42:57 09:42 by sohel » Logged
newboy
Junior Member
**
Offline Offline

Posts: 94

Thank You
-Given: 42
-Receive: 20


« Reply #2 on: February 29, 2008, 10:33:26 10:33 »

Help me please. Any guide to follow ?

I just newbie.
Logged
frasenci
Translator
Active Member
***
Offline Offline

Posts: 171

Thank You
-Given: 142
-Receive: 84


« Reply #3 on: February 29, 2008, 11:13:57 11:13 »

its not compiler problem. u need to setup pbp proper way. read help file how to setup pbp, or copy include file from pbp247.
Help already given by sohel.
Compiler is asking for missing .inc file wich you must provide in proper file path to ide software.
It is only 1 error  ( missing file )
This missing file should contain the definition words of fuses for the particular PIC you want to use ( WDT , etc )
Nothing else to say .
Logged
newboy
Junior Member
**
Offline Offline

Posts: 94

Thank You
-Given: 42
-Receive: 20


« Reply #4 on: February 29, 2008, 11:46:02 11:46 »

Help already given by sohel.

Sorry, I still in the dark. I check in /PBP/, there is 16F877A.inc and 16F877.inc

16F877A.inc contain this :

;****************************************************************
;*  16F877A.INC                                                 *
;*                                                              *
;*  By        : Leonard Zerman, Jeff Schmoyer                   *
;*  Notice    : Copyright (c) 2003 microEngineering Labs, Inc.  *
;*              All Rights Reserved                             *
;*  Date      : 11/06/03                                        *
;*  Version   : 2.45                                            *
;*  Notes     :                                                 *
;****************************************************************
        NOLIST
    ifdef PM_USED
        LIST
        include 'M16F87xA.INC'  ; PM header
        device  pic16F877A, xt_osc, wdt_on, lvp_off, protect_off
        XALL
        NOLIST
    else
        LIST
        LIST p = 16F877A, r = dec, w = -302
        INCLUDE "P16F877A.INC"  ; MPASM  Header
        __config _XT_OSC & _WDT_ON & _LVP_OFF & _CP_OFF
        NOLIST
    endif
        LIST


and the 16F877.inc contain this :

;****************************************************************
;*  16F877.INC                                                  *
;*                                                              *
;*  By        : Leonard Zerman, Jeff Schmoyer                   *
;*  Notice    : Copyright (c) 2003 microEngineering Labs, Inc.  *
;*              All Rights Reserved                             *
;*  Date      : 11/07/03                                        *
;*  Version   : 2.45                                            *
;*  Notes     :                                                 *
;****************************************************************
        NOLIST
    ifdef PM_USED
        LIST
        include 'M16F87x.INC'   ; PM header
        device  pic16F877, xt_osc, wdt_on, pwrt_on, lvp_off, protect_off
        XALL
        NOLIST
    else
        LIST
        LIST p = 16F877, r = dec, w = -302
        INCLUDE "P16F877.INC"   ; MPASM  Header
        __config _XT_OSC & _WDT_ON & _PWRTE_ON & _LVP_OFF & _CP_OFF
        NOLIST
    endif
        LIST


When I search for 'P16F877.inc" is none. 'P16F877A.inc' also none. So where can I find it ? Why can I compile 16F877 but not 16F877A  Huh Huh Huh

Please help, I just first time setup PBP 2.50 (not even PBP 2.47 ). Please point to something that can guide me better .

Thanks for all help   Smiley
Logged
SKUPAD
Newbie
*
Offline Offline

Posts: 17

Thank You
-Given: 2
-Receive: 9


« Reply #5 on: February 29, 2008, 01:51:46 13:51 »

Answer for the problem is already given by Sohel & Frasenci. The required file for compilation is not in the system's path due to improper installation. For temperory measure you can copy the required file  in the source file directory from PBP and recompile. If still there is problem then it is sure that the problem is not due to path setting.
Logged
newboy
Junior Member
**
Offline Offline

Posts: 94

Thank You
-Given: 42
-Receive: 20


« Reply #6 on: February 29, 2008, 05:54:28 17:54 »

The required file for compilation is not in the system's path due to improper installation. For temperory measure you can copy the required file  in the source file directory from PBP and recompile.

If you mention there is problem with my installation then I accept it, but what's the solution? I just newbie, never program any PIC with PicBasicPro. Normally I just copy somebody else hex code into the pic. Now I try to make it my self.

What I need is some guide line so then I can start slowly using PicBasicPro but now I'm stuck in first step to make compiler work ok. Maybe I'm not at right forum to ask for some guide line ...   Huh

If you all just point my problem but never point to where should heading to then it's not going anywhere. BTW thanks a lot for pointing the problem.  Smiley
« Last Edit: February 29, 2008, 05:57:50 17:57 by newboy » Logged
frasenci
Translator
Active Member
***
Offline Offline

Posts: 171

Thank You
-Given: 142
-Receive: 84


« Reply #7 on: February 29, 2008, 08:56:45 20:56 »

I would say ,
Yes you are at the right forum if you can accept the fact that it is not the forums members responsability to solve your problems and that that its is a community for learning by sharing.
No you are not at the right forum if you think that this is a PBP/Windows  experts one.
Will try to help with some more ideas

1.- Uninstall and reinstall the software , try
1.1.- Return faulty product to whom you bought it from if their helpdesk can not help you either.
1.2.- If software is of unknown origin , uninstall and try to find another , this time , working copy.

2.- Try making copy of 16f877a.inc file and rename to p16f877a.inc , the compile

3.- Forget PBP and try Proton compiler it is almost same syntax and comes with examples to

4.- Search this forum for PBP 2.47 , this one will work for shure. It did for me in the past.

Greetings
 
« Last Edit: February 29, 2008, 09:10:13 21:10 by frasenci » Logged
SKUPAD
Newbie
*
Offline Offline

Posts: 17

Thank You
-Given: 2
-Receive: 9


« Reply #8 on: March 01, 2008, 03:13:53 03:13 »

Dear Newboy,
   From your post it is not clear that you are applying the suggestion or not. It is assumed that you are well known to the terms system path, source file, source file directory, copying file from one directory to another directory etc.
   I had the similar problem and solved by copying the required inc file to the source file directory from pic basic pro directory. Let us know wheather you are applying the suggestions or not.
Logged
picbasic4
Newbie
*
Offline Offline

Posts: 23

Thank You
-Given: 24
-Receive: 30


« Reply #9 on: March 01, 2008, 07:05:56 07:05 »

I also moved the sample program.
Please confirm the setting of MCS (MCSP)
 
View>
Use MPASM in Compile and Program Options>
Assembler is checked or it doesn't exist.
Then, the error doesn't go out in I not am.
I think that I become an error when the setting of the file is bad when certain.
I'm sorry in strange English. It translates with the translation software.
Logged

picbasic user  Smiley
newboy
Junior Member
**
Offline Offline

Posts: 94

Thank You
-Given: 42
-Receive: 20


« Reply #10 on: March 01, 2008, 12:35:36 12:35 »

Yes you are at the right forum if you can accept the fact that it is not the forums members responsability to solve your problems and that that its is a community for learning by sharing.
Yes, I accept that 'it is not the forums members responsability to solve your problems' but please dont just say it wrong (because I already know it's wrong). What I want is 'any solution' base on your experience.

No you are not at the right forum if you think that this is a PBP/Windows  experts one.
Will try to help with some more ideas
I'm be here because many people here already successful program in PicBasicPro and he should has a right way to install the PicBasicPro (may be my installation having problem).

1.- Uninstall and reinstall the software , try
1.1.- Return faulty product to whom you bought it from if their helpdesk can not help you either.
1.2.- If software is of unknown origin , uninstall and try to find another , this time , working copy.
I'm get it from here (sonsivri)

2.- Try making copy of 16f877a.inc file and rename to p16f877a.inc , the compile
I already put 'p16f877a.inc' in /PBP/ folder where '16f877a.inc' is in but nothing changed

3.- Forget PBP and try Proton compiler it is almost same syntax and comes with examples to
I have to make one project that require robust and prove of code stablity and that's what I got base on some forum here suggest PicBasicPro instead of Proton compiler. I cannot afford of failure at remote end.

4.- Search this forum for PBP 2.47 , this one will work for shure. It did for me in the past.
Any guideline to install this as I just newbie. I don't want/cannot afford  many uncertainness as I'm very new to this compiler.

Thanks for comments ... Smiley

Posted on: March 01, 2008, 01:13:44 13:13 - Automerged

   I had the similar problem and solved by copying the required inc file to the source file directory from pic basic pro directory. Let us know wheather you are applying the suggestions or not.

I just copy from 'C:\Program Files\Microchip\MPASM Suite' ( P16F877A.inc ) and paste to 'C:\PBP\ but nothing diffrent. FYI, '16F877A.inc' is there ( in C:\PBP\ ).

I tried to compile with '18F452' ( in MicroCode Studio ) and succesfull compiled.

I tried to compile with '16F877A' ( in MicroCode Studio ) and 'untick' the MPASM box ( in MicroCode Studio, click 'view'-> 'Compile and Program Option' -> 'Assembler' ) then it can succesfully compiled. I'm very confius on this matter.

Any tips to follow ?

Posted on: March 01, 2008, 01:31:47 13:31 - Automerged

I also moved the sample program.
Please confirm the setting of MCS (MCSP)
Can you take pic (snapshot) and post it here ( on the setting of MCS) ?

Thanks


Posted on: March 01, 2008, 01:33:24 13:33 - Automerged

One more thing, can somebody upload 'WORKING' microstudio plus 3.0.0.5 and PBP 2.50 and 2.50a patch (maybe my version having problem) and some installation steps & tips.

Thanks a lot in advance  Grin
Logged
joker12
Junior Member
**
Offline Offline

Posts: 84

Thank You
-Given: 13
-Receive: 80


« Reply #11 on: March 01, 2008, 06:31:54 18:31 »

I'm confused. Huh

In your first post you say

Quote
Hi all,

I just install PicBasicPro 2.50 ( update to 2.50a) and then install Microcode Studio Plus 3.0.0.5.

and in your last post you ask for

Quote
One more thing, can somebody upload 'WORKING' microstudio plus 3.0.0.5 and PBP 2.50 and 2.50a patch (maybe my version having problem) and some installation steps & tips.

Thanks a lot in advance 

I haven't seen a link for 2.50a yet.

Anyway

I'm using PBP247 and MC3.0.0.0 and entered your code which complied without problems. So it must be; as others have said, an install issue.

Based on what I have.

In your root directory there should be a directory called PBP. In that directory should be a directory called micro code studio plus 3.0.0.0 and a directory called PBP247. in the PBP247 Directory should be the following directories, FP,INC,Samples,USB,USB18

Is that what you have???
Logged
newboy
Junior Member
**
Offline Offline

Posts: 94

Thank You
-Given: 42
-Receive: 20


« Reply #12 on: March 01, 2008, 07:22:41 19:22 »

I already install PBP 2.50 and update the patch 2.50a. I'm asking the 'WORKING' version PBP 2.50 incase mine is not complete or corrupt.

Quote
In your root directory there should be a directory called PBP. In that directory should be a directory called micro code studio plus 3.0.0.0 and a directory called PBP247. in the PBP247 Directory should be the following directories, FP,INC,Samples,USB,USB18
I do have in PBP folder  (C:\PBP|) INC,USB,USB18 andSAMPLES but no FP .

Is it diffrence to install PBP 2.50 compare to PBP 2.47 ? Let say I install PBP2.47, need I to install MCSP 3.0.0.0 too ?

Any steps to install PBP2.47 and MCSP 3.0.0.0 ?

What the good thing about PBP2.50 compare to PBP2.47 ?
Logged
hemlig
Translator
Active Member
***
Offline Offline

Posts: 168

Thank You
-Given: 26
-Receive: 50



« Reply #13 on: March 01, 2008, 09:11:01 21:11 »

I think you should add the paths to your compiler AND to your IDE
in the windows environment.
Use windows help and support to see how.
Logged

If it work don't fix it!
joker12
Junior Member
**
Offline Offline

Posts: 84

Thank You
-Given: 13
-Receive: 80


« Reply #14 on: March 02, 2008, 03:17:58 03:17 »

Sorry ,I lied, found the link here:

http://www.sonsivri.com/forum/index.php?topic=4715.120

Installed and your code compiles fine.

I don't have any paths set and I'm running it on Vista.

In MicroCode, under the "View" tab , then select "Compile and Program Options"

Under Compiler Tab use the "Find Manually"  and  select the directory where PBP250A is located.

i.e. c:\PBP\PBP250 , yours may be different.

Try that, Running out of ideas. It's not Rocket Science. Wink
Logged
newboy
Junior Member
**
Offline Offline

Posts: 94

Thank You
-Given: 42
-Receive: 20


« Reply #15 on: March 02, 2008, 09:38:26 09:38 »


Quote
In MicroCode, under the "View" tab , then select "Compile and Program Options"

Under Compiler Tab use the "Find Manually"  and  select the directory where PBP250A is located.

i.e. c:\PBP\PBP250 , yours may be different.

I just did what are u suggested but still same. What is confius to me,(with tick in MPASM box)  if I select 18F452, it compile ok. If I select 16F877, it's also ok but when I select 16F877A or 16F876A (other PIC not tried), the compiler give error ( same picture at beginning of this topic).

I just update PBP2.50A in same folder (c:\PBP\) and no error found.
Logged
joker12
Junior Member
**
Offline Offline

Posts: 84

Thank You
-Given: 13
-Receive: 80


« Reply #16 on: March 02, 2008, 05:23:29 17:23 »

I just did what are u suggested but still same. What is confius to me,(with tick in MPASM box)  if I select 18F452, it compile ok. If I select 16F877, it's also ok but when I select 16F877A or 16F876A (other PIC not tried), the compiler give error ( same picture at beginning of this topic).

I just update PBP2.50A in same folder (c:\PBP\) and no error found.

Ahhhhh, That may be it.

You're probably using the mpasm for 18 type microprocessors.

PBP does not need mpasm for 16 type products.

untick  MPASM box and try again.

Logged
newboy
Junior Member
**
Offline Offline

Posts: 94

Thank You
-Given: 42
-Receive: 20


« Reply #17 on: March 02, 2008, 05:45:32 17:45 »

PBP does not need mpasm for 16 type products.
So that's mean its ok to untick MPASM box if not using PIC18F ? If you know, what the diffrent between with MPASM or not ?


untick  MPASM box and try again.
If I untick MPASM box, PBP compile ok both with 16F877A or 16F876A. If I compile using PIC16F84A or PIC16F8A ( with tick or untick MPASM box ), both are compiling ok. So what's the diffrent between 16F877A vs 16F84A ?
Logged
sohel
Senior Member
****
Offline Offline

Posts: 442

Thank You
-Given: 167
-Receive: 149



« Reply #18 on: March 06, 2008, 01:19:37 01:19 »

if u dont mind , i will say forget pbp, and learn proton. this is ur answer. i think pbp and proton are same, just change some rule, like pause goes to delayms   etc. Embarrassed 
Logged
newboy
Junior Member
**
Offline Offline

Posts: 94

Thank You
-Given: 42
-Receive: 20


« Reply #19 on: March 06, 2008, 12:39:38 12:39 »

Sohel,

I dont mind to use Proton. I just use PBP because of 'a lot of people' in some FORUM (include sonsivri)  say it's code (PBP code) is robust (stable in rough environment)  and proven working without problem.

Actually I want to use proton but seem this project will be installed far away from me and this first experience for me in PIC then I couldnt afford any failure at remote end. To me, proton is more feature but some of design is not for hobby grade. Sometime I do a design for someone for small pay (but still cannot afford for original PBP ...  Grin )

So, if u dont mind, how long u use proton and how about stability of proton code ? any problem experience ?

Thanks for comments.

Logged
jasonix
Newbie
*
Offline Offline

Posts: 12

Thank You
-Given: 48
-Receive: 3


« Reply #20 on: March 07, 2008, 01:58:33 01:58 »

hi newboy, i am installed several times in differents computers PBP and MCSP with out problem.
1. you must have first installed the last version of MPLAB in your machine.
2. install PBP
3. install MCSP
4. Run MCSP, it scans your computer in order to find  executable PBP
If you follow these instructions, no problems you will have.

bye, and i hope these indications help you...
Logged
newboy
Junior Member
**
Offline Offline

Posts: 94

Thank You
-Given: 42
-Receive: 20


« Reply #21 on: March 07, 2008, 07:38:39 07:38 »

Thanks ... I will try the steps and will  update later .

 Cheesy
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC