AnsweredAssumed Answered

How to eliminate this Link Error????

Question asked by P Manasa on Jul 8, 2011
Latest reply on Jul 16, 2011 by P Manasa

Dear friends,

 

 I am using CW V5.0 for 16bit controller programming. In my program, I am using SCI, ADC and other modules.Through SCI receive interrupt, I set ADC control register bits for resolution.  SCI ISR is in main.c and I declared a global variable for this resolution in main.c. My ADC initialization is done in another .c file  for which initialization header file is included in main.c When I make, there gives me a link error for ADC resolution.For clear understanding,

 

#include <hidef.h>

#include "derivative.h"

#include "adc.h"

unsigned int adc_resolution;

void main(void)

{

SCI();

------

EnableInterrupts;

adc();

----

for(;:smileywink:;

}

SCI_ISR()

{

adc_resolution = SCI0DRL;

}

/********************end of main.c*******************/

#ifndef adc_h

#define adc_h

void adc(void);

void sci(void);

#endif

/******************end of adc.h*********************/

#include "derivative.h"

void adc(void)

{

------

ATD0CTL1=adc_resolution;

----

---

}

void sci(void)

{

---

}

/***********************end of adc.c*********************/

 

Need help...

Thank you in advance.

Outcomes