+ Reply to Thread
Results 1 to 11 of 11

Thread: Pickit2: Could not build Project

  1. #1
    aaronchay Newbie
    Join Date
    Aug 2008
    Posts
    37

    Default Pickit2: Could not build Project

    Hi all,

    I've been trying to build a project in Assembly language but could not. I've even resorted to creating a new project and used back the same .asm code (copy and paste) as the tutorials but could not build also.



    P/S: is there any tutorial websites for assembly language and programming PIC16F877A on breadboard?
    Last edited by aaronchay; 21st October 2008 at 03:13 PM.


  2. #2
    ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent
    Join Date
    Jan 2007
    Location
    Hampshire. England.
    Posts
    10,849
    Blog Entries
    13

    Default

    hi,

    Look at Nigels site for assembler tutorials.

    WinPicProg Page

    Cannot see the image you have posted.?
    Last edited by ericgibbs; 21st October 2008 at 03:14 PM.
    Eric " Good enough is Perfect "
    I will NOT answer PM's requesting technical help, please use the Forum
    PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

    Link to my Articles: http://www.electro-tech-online.com/a...icgibbs-55450/

  3. #3
    mvs sarma Excellent mvs sarma Excellent mvs sarma Excellent mvs sarma Excellent mvs sarma Excellent mvs sarma Excellent mvs sarma Excellent mvs sarma Excellent mvs sarma Excellent
    Join Date
    Oct 2006
    Location
    Hyderabad, India.
    Posts
    2,476
    Blog Entries
    1

    Default

    Quote Originally Posted by aaronchay View Post
    Hi all,

    I've been trying to build a project in Assembly language but could not. I've even resorted to creating a new project and used back the same .asm code (copy and paste) as the tutorials but could not build also.



    P/S: is there any tutorial websites for assembly language and programming PIC16F877A on breadboard?
    From the tutorials, perhaps you have to learn the way of approaching the assembly programming methodology. By cut and paste, you would not learn much. If writing needs skill, adaptation of existing routines need more of understandability and higher skill level.
    So please try to start writing small programs and develop, though it might take time. Try to appreciate.
    Last edited by mvs sarma; 21st October 2008 at 03:30 PM.
    Regards,
    Sarma.

  4. #4
    aaronchay Newbie
    Join Date
    Aug 2008
    Posts
    37

    Default

    Quote Originally Posted by mvs sarma View Post
    From the tutorials, perhaps you have to learn the way of approaching the assembly programming methodology. By cut and paste, you would not learn much. If writing needs skill, adaptation of existing routines need more of understandability and higher skill level.
    So please try to start writing small programs and develop, though it might take time. Try to appreciate.
    Hi there, what I meant was I couldn't Build as I got the error message "Preprocessor symbol `__DEBUG' is defined." So I do not know if the problem is with my source code or with the setting up of workspace. So in order to troubleshoot, I tried to copy the source code from the provided Tutorials and I still couldn't build my program. So I would like to know if there were any mistakes I made while creating the Workspace/Project.

  5. #5
    mvs sarma Excellent mvs sarma Excellent mvs sarma Excellent mvs sarma Excellent mvs sarma Excellent mvs sarma Excellent mvs sarma Excellent mvs sarma Excellent mvs sarma Excellent
    Join Date
    Oct 2006
    Location
    Hyderabad, India.
    Posts
    2,476
    Blog Entries
    1

    Default

    Quote Originally Posted by aaronchay View Post
    Hi there, what I meant was I couldn't Build as I got the error message "Preprocessor symbol `__DEBUG' is defined." So I do not know if the problem is with my source code or with the setting up of workspace. So in order to troubleshoot, I tried to copy the source code from the provided Tutorials and I still couldn't build my program. So I would like to know if there were any mistakes I made while creating the Workspace/Project.
    as the screen posted is not legible, could you create that again, copy the contents in a word file or as text and make available for study please !

    The best is try to attach the code as a file zipped.
    Last edited by mvs sarma; 21st October 2008 at 04:39 PM.
    Regards,
    Sarma.

  6. #6
    aaronchay Newbie
    Join Date
    Aug 2008
    Posts
    37

    Default

    Quote Originally Posted by mvs sarma View Post
    as the screen posted is not legible, could you create that again, copy the contents in a word file or as text and make available for study please !

    The best is try to attach the code as a file zipped.
    Hi,

    I have attached a zip file of the workspace.

    Free file hosting by Savefile.com

    Thanks!

  7. #7
    Mickster Good Mickster Good
    Join Date
    Feb 2008
    Location
    UK
    Posts
    397

    Default

    Read from file "project1.err" :

    Message[302] C:\DOCUMENTS AND SETTINGS\AARON CHAY\DESKTOP\PIC16F690\PROJECT1.ASM 6 : Register in operand not in bank 0. Ensure that bank bits are correct.
    Error[173] C:\DOCUMENTS AND SETTINGS\AARON CHAY\DESKTOP\PIC16F690\PROJECT1.ASM 11 : Source file path exceeds 62 characters (C:\DOCUMENTS AND SETTINGS\AARON CHAY\DESKTOP\PIC16F690\PROJECT1.ASM)

    Better to create a new directory in the root (C:\PIC Projects) or similar, than suffer from using tiny file names when using the desktop, to keep under 62 characters.

    Error 302 is just a warning to check you are in the correct bank, since MPLAB can't do it for you. The message can be suppressed within your .asm file, with the line below:

    Code:
    ERRORLEVEL	0,	-302
    

  8. #8
    aaronchay Newbie
    Join Date
    Aug 2008
    Posts
    37

    Default

    Quote Originally Posted by Mickster View Post
    Read from file "project1.err" :

    Message[302] C:\DOCUMENTS AND SETTINGS\AARON CHAY\DESKTOP\PIC16F690\PROJECT1.ASM 6 : Register in operand not in bank 0. Ensure that bank bits are correct.
    Error[173] C:\DOCUMENTS AND SETTINGS\AARON CHAY\DESKTOP\PIC16F690\PROJECT1.ASM 11 : Source file path exceeds 62 characters (C:\DOCUMENTS AND SETTINGS\AARON CHAY\DESKTOP\PIC16F690\PROJECT1.ASM)

    Better to create a new directory in the root (C:\PIC Projects) or similar, than suffer from using tiny file names when using the desktop, to keep under 62 characters.

    Error 302 is just a warning to check you are in the correct bank, since MPLAB can't do it for you. The message can be suppressed within your .asm file, with the line below:

    Code:
    ERRORLEVEL	0,	-302
    
    Hi, the problem have been solved, the reason was because I did not include a Linker script. Anyway, I do not understand some codings for example:
    bsf STATUS,RP0 ; select Register Page 1
    bcf STATUS,RP0 ; back to Register Page 0
    What does these 2 lines mean? Is it because I'm using PORTC which is under Bank 0 therefore I've got to select it? Or am I wrong?

  9. #9
    skyhawk Excellent skyhawk Excellent skyhawk Excellent skyhawk Excellent
    Join Date
    Feb 2007
    Location
    Morgantown, WV
    Posts
    197

    Default

    Hi, the problem have been solved, the reason was because I did not include a Linker script. Anyway, I do not understand some codings for example:
    bsf STATUS,RP0 ; select Register Page 1
    bcf STATUS,RP0 ; back to Register Page 0
    What does these 2 lines mean? Is it because I'm using PORTC which is under Bank 0 therefore I've got to select it? Or am I wrong?
    Hard to say, since you don't give enough information.

    Typically one would switch to bank 1 to setup the TRIS registers for output, since they initialize to input on reset. Additionally there may be other SFRs in bank 1 that need to be setup.

  10. #10
    mvs sarma Excellent mvs sarma Excellent mvs sarma Excellent mvs sarma Excellent mvs sarma Excellent mvs sarma Excellent mvs sarma Excellent mvs sarma Excellent mvs sarma Excellent
    Join Date
    Oct 2006
    Location
    Hyderabad, India.
    Posts
    2,476
    Blog Entries
    1

    Default

    Quote Originally Posted by aaronchay View Post
    Hi, the problem have been solved, the reason was because I did not include a Linker script. Anyway, I do not understand some codings for example:
    bsf STATUS,RP0 ; select Register Page 1
    bcf STATUS,RP0 ; back to Register Page 0


    these 2 instructions would exactly do this bank switching work

    What does these 2 lines mean? Is it because I'm using PORTC which is under Bank 0 therefore I've got to select it? Or am I wrong?
    you are trying to program the PORTC for all pins as output for example. the concerned instruction is to be in TRISC. This TRISC is in Bank 1. So you have to switch the bank, store the TRISC to define PORTC as outgoing and switch back to Bank 0 for normal working

    Once you readthe 16Fxxx data sheet, the clouds would automatically clear off. You would start enjoying the program as you read through the tutorials.
    Last edited by mvs sarma; 22nd October 2008 at 07:16 PM.
    Regards,
    Sarma.

  11. #11
    aaronchay Newbie
    Join Date
    Aug 2008
    Posts
    37

    Default

    Thanks for all the replies, guess I would have to read up more on the manuals. Will post back if there are further questions.

+ Reply to Thread

Similar Threads

  1. Help to build project
    By Nps in forum General Electronics Chat
    Replies: 1
    Latest: 16th March 2005, 06:47 AM
  2. Need a advanced project to build
    By NEEDSAPROJECT in forum Micro Controllers
    Replies: 9
    Latest: 27th January 2005, 11:31 PM
  3. help me build a project
    By escin in forum Electronic Projects Design/Ideas/Reviews
    Replies: 2
    Latest: 25th June 2004, 10:34 AM
  4. i want to build a simple project plz help me
    By electro_meru in forum Electronic Projects Design/Ideas/Reviews
    Replies: 1
    Latest: 20th May 2004, 03:28 PM
  5. plz help me build a robot for my project.....
    By cutu in forum Robotics Chat
    Replies: 0
    Latest: 12th May 2004, 05:15 PM

Tags for this Thread