Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Tool suite and linker problem with mplab 8.56 for C programming

Status
Not open for further replies.

theSalar

Newbie level 4
Joined
Jun 29, 2010
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Pakistan
Activity points
1,325
i am trying to burn hex file of a c program in pic18f458 using mplab 8.56 and development board CP-PIC V3. my code gets build without any error or warning and it also gets burned in the controller but the code is not producing any results( even simple programs like toggling a port is not working on it). currently i am using MCC18 tool suite and 18f458.lkr as linker file and i am using cp458v3 software to burn the hex file in the controller(this software came with the development board) .The simple code for toggling the port which i am using is as follows:

#include<p18f458.h>
void MSDelay(unsigned int);
void main(void)
{ TRISA=0X00;
while(1)
{
PORTA=0XFF;
MSDelay(250);
PORTA=0X00;
MSDelay(250);
}
}

void MSDelay(unsigned int itime)
{
unsigned int i;
unsigned char j;
unsigned int k;
for(i=0;i<itime;i++)
for(j=0;j<165;j++);
for(k=0;k<50;k++);
}

Someone please help me out. i dont know whether there is a problem with my linker file or tool suite or development board or else.
 

del the hex file from the directory in hard disk and recompile it again. see if new hex file is produced. Burn it and verify.
Is the program working in simulator
 

i have deleted the hex file and rebuilt the project, another hex file is generated but upon burning port A is behaving the same way i.e., it is continuously giving high on the whole port.
yes the program is working in mplab simulator as well as in proteus.

---------- Post added at 13:36 ---------- Previous post was at 13:34 ----------

i have deleted the hex file and rebuilt the project, another hex file is generated but upon burning port A is behaving the same way i.e., it is continuously giving high on the whole port.
yes the program is working in mplab simulator as well as in proteus.
 

the onchip crystal is of 10MHz with label M10 000Z. No there arent any pull up resistor with any pin.

---------- Post added at 17:53 ---------- Previous post was at 17:43 ----------

Here is a snapshot of the board
23_1292172804_thumb.jpg
[/url][/IMG]
 

one basic doubt i got , while you program the switch is moved to one end. i hope you dont forget to put switch to other end for execution.

Did you test some sample codes given with that board any time.

---------- Post added at 01:58 ---------- Previous post was at 01:56 ----------

Since i dont know the exact hardware connection, should i assume that you are following proper jumper connection if any, or inserting proper IC in the OC base for proper connection like LATCH or MUX at port pins
 

about your doubt, yeah i am well aware of that common mistake and i am not making that mistake.
the hex files of the sample codes that came with the board are in assembly and they are working fine.
and yes i have checked all the hardware connection for more than a dozen time and i am reasonably sure that they are all right.

---------- Post added at 18:52 ---------- Previous post was at 18:51 ----------

about your doubt, yeah i am well aware of that common mistake and i am not making that mistake.
the hex files of the sample codes that came with the board are in assembly and they are working fine.
and yes i have checked all the hardware connection for more than a dozen time and i am reasonably sure that they are all right.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top