Pickit2: Could not build Project

Status
Not open for further replies.

aaronchay

New Member
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.

**broken link removed****broken link removed**

P/S: is there any tutorial websites for assembly language and programming PIC16F877A on breadboard?
 
Last edited:
hi,

Look at Nigels site for assembler tutorials.



Cannot see the image you have posted.?
 
Last edited:
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:
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:
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?
 

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.
 

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:
Thanks for all the replies, guess I would have to read up more on the manuals. Will post back if there are further questions.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…