theSalar
Newbie level 4
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.
#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.