Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Doubt in PIC18F4620

Status
Not open for further replies.

Jyothi@Pic

New Member
Hi,

I am using PIC18F4620 IC for my project for this i have installed MCC18 compiler I have written the led blink programming.

the program is as below


#include <p18f4620.h>


#include"string.h"
#include"math.h"



Code:
void main (void)
{
  
  
  unsigned long int i,a,b;

 //DEBUG=0;

  PORTB=0X00;
  LATB=0X00;
  ADCON1=0X0F;
  TRISB=0x01;

  PORTE =0x00; 
  LATE =0x00;
  TRISE=0x00;

  PORTD =0x00; 
  LATD =0x00;
  TRISD = 0X00;
 
  TRISA=0X00;

  
 
  while(1)
  {
    
    
    PORTA=0x00;
    PORTD=0X00;

    for(i=0;i<500000;i++);

    PORTA=0xff;
    PORTD=0Xff;

    for(i=0;i<500000;i++);
  
	/*if(RB0==0)
	{
        while(RB0==1);
		RA0=0;
	}*/
     
  }
  
}



But when i build the project i am getting the error as below




----------------------------------------------------------------------
Debug build of project `D:\projects\PIC18F4620\TEST_MCC18_COMPILER\PROJECT.mcp' started.
Preprocessor symbol `__DEBUG' is defined.
Fri Jan 30 12:04:25 2009
----------------------------------------------------------------------
Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\MCC18\bin\mcc18.exe" -p=18F4620 -sa "TEST.C" -fo="TEST.o" -D__DEBUG -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
-sa: unknown option
Halting build on first failure as requested.
----------------------------------------------------------------------
Debug build of project `D:\projects\PIC18F4620\TEST_MCC18_COMPILER\PROJECT.mcp' failed.
Preprocessor symbol `__DEBUG' is defined.
Fri Jan 30 12:04:27 2009
----------------------------------------------------------------------
BUILD FAILED





can anybody tell me what has to be done for this
 
Status
Not open for further replies.

Latest threads

Back
Top