Author Topic: Timer640 errors!!?  (Read 4450 times)

0 Members and 1 Guest are viewing this topic.

Offline CALEBTopic starter

  • Jr. Member
  • **
  • Posts: 17
  • Helpful? 0
Timer640 errors!!?
« on: January 18, 2009, 03:52:24 PM »
I am trying to use the Code to create a green LED pulsing effect  below.
 
Code: [Select]
//Add your code here
//#include "timer640.h"
#include "timer640.c"
//#include "timer640.h"
int i;
//enter your control equation in here
void control(void)
{
PWM_Init_timer1_LED(8);
PWM_timer1_On_LED();
 while(1)
{
 for(i=110;i<255;i++) 
{
 PWM_timer1_Set_LED(i); 
delay_ms(10);
//control pulse speed 
}
for(i=255;i>110;i--) 

PWM_timer1_Set_LED(i);
 delay_ms(10);//control pulse speed
 }
}
}

When I do this I get the following Errors .

Code: [Select]
Build started 18.1.2009 at 15:22:42

-------- begin --------
avr-gcc (WinAVR 20081124rc3) 4.3.2
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Compiling: a2d.c
avr-gcc -c -mmcu=atmega640 -I. -gstabs   -O0 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=a2d.lst  -std=gnu99 -Wp,-M,-MP,-MT,a2d.o,-MF,.dep/a2d.o.d a2d.c -o a2d.o

Compiling: buffer.c
avr-gcc -c -mmcu=atmega640 -I. -gstabs   -O0 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=buffer.lst  -std=gnu99 -Wp,-M,-MP,-MT,buffer.o,-MF,.dep/buffer.o.d buffer.c -o buffer.o

Compiling: uart4.c
avr-gcc -c -mmcu=atmega640 -I. -gstabs   -O0 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=uart4.lst  -std=gnu99 -Wp,-M,-MP,-MT,uart4.o,-MF,.dep/uart4.o.d uart4.c -o uart4.o

Compiling: timerx8.c
avr-gcc -c -mmcu=atmega640 -I. -gstabs   -O0 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=timerx8.lst  -std=gnu99 -Wp,-M,-MP,-MT,timerx8.o,-MF,.dep/timerx8.o.d timerx8.c -o timerx8.o

Compiling: rprintf.c
avr-gcc -c -mmcu=atmega640 -I. -gstabs   -O0 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=rprintf.lst  -std=gnu99 -Wp,-M,-MP,-MT,rprintf.o,-MF,.dep/rprintf.o.d rprintf.c -o rprintf.o

Compiling: Axon.c
avr-gcc -c -mmcu=atmega640 -I. -gstabs   -O0 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=Axon.lst  -std=gnu99 -Wp,-M,-MP,-MT,Axon.o,-MF,.dep/Axon.o.d Axon.c -o Axon.o
In file included from control.c:17,
                 from Axon.c:20:
timer640.c: In function 'timerInit':
timer640.c:94: warning: implicit declaration of function 'timer3Init'
timer640.c:97: warning: implicit declaration of function 'timer4Init'
timer640.c:100: warning: implicit declaration of function 'timer5Init'
timer640.c: At top level:
timer640.c:138: warning: conflicting types for 'timer3Init'
timer640.c:94: warning: previous implicit declaration of 'timer3Init' was here
timer640.c: In function 'timer3Init':
timer640.c:142: warning: implicit declaration of function 'timer3SetPrescaler'
timer640.c:142: error: 'TIMER3PRESCALE' undeclared (first use in this function)
timer640.c:142: error: (Each undeclared identifier is reported only once
timer640.c:142: error: for each function it appears in.)
timer640.c:146: warning: implicit declaration of function 'timer3ClearOverflowCount'
timer640.c: At top level:
timer640.c:151: warning: conflicting types for 'timer4Init'
timer640.c:97: warning: previous implicit declaration of 'timer4Init' was here
timer640.c: In function 'timer4Init':
timer640.c:154: warning: implicit declaration of function 'timer4SetPrescaler'
timer640.c:154: error: 'TIMER4PRESCALE' undeclared (first use in this function)
timer640.c:158: warning: implicit declaration of function 'timer4ClearOverflowCount'
timer640.c: At top level:
timer640.c:163: warning: conflicting types for 'timer5Init'
timer640.c:100: warning: previous implicit declaration of 'timer5Init' was here
timer640.c: In function 'timer5Init':
timer640.c:166: warning: implicit declaration of function 'timer5SetPrescaler'
timer640.c:166: error: 'TIMER5PRESCALE' undeclared (first use in this function)
timer640.c:170: warning: implicit declaration of function 'timer5ClearOverflowCount'
timer640.c: At top level:
timer640.c:195: warning: conflicting types for 'timer3SetPrescaler'
timer640.c:142: warning: previous implicit declaration of 'timer3SetPrescaler' was here
timer640.c:203: warning: conflicting types for 'timer4SetPrescaler'
timer640.c:154: warning: previous implicit declaration of 'timer4SetPrescaler' was here
timer640.c:211: warning: conflicting types for 'timer5SetPrescaler'
timer640.c:166: warning: previous implicit declaration of 'timer5SetPrescaler' was here
timer640.c:370: warning: conflicting types for 'timer3ClearOverflowCount'
timer640.c:146: warning: previous implicit declaration of 'timer3ClearOverflowCount' was here
timer640.c:385: warning: conflicting types for 'timer4ClearOverflowCount'
timer640.c:158: warning: previous implicit declaration of 'timer4ClearOverflowCount' was here
timer640.c:400: warning: conflicting types for 'timer5ClearOverflowCount'
timer640.c:170: warning: previous implicit declaration of 'timer5ClearOverflowCount' was here
timer640.c: In function '__vector_35':
timer640.c:882: error: 'TIMER3OVERFLOW_INT' undeclared (first use in this function)
timer640.c: In function '__vector_45':
timer640.c:894: error: 'TIMER4OVERFLOW_INT' undeclared (first use in this function)
timer640.c: In function '__vector_50':
timer640.c:906: error: 'TIMER5OVERFLOW_INT' undeclared (first use in this function)
timer640.c: In function '__vector_21':
timer640.c:926: error: 'TIMER0OUTCOMPAREA_INT' undeclared (first use in this function)
timer640.c: In function '__vector_13':
timer640.c:942: error: 'TIMER2OUTCOMPAREA_INT' undeclared (first use in this function)
timer640.c: In function '__vector_22':
timer640.c:950: error: 'TIMER0OUTCOMPAREB_INT' undeclared (first use in this function)
timer640.c: In function '__vector_14':
timer640.c:966: error: 'TIMER2OUTCOMPAREB_INT' undeclared (first use in this function)
make: *** [Axon.o] Error 1
Build failed with 12 errors and 27 warnings...


I am not sure if my .c file is referenceing the timer640.h file  even though I included it.
Please help I have tried everything I know and cant solve the problem.
« Last Edit: January 18, 2009, 03:55:45 PM by CALEB »

Offline yerbie

  • Full Member
  • ***
  • Posts: 62
  • Helpful? 3
Re: Timer640 errors!!?
« Reply #1 on: January 18, 2009, 05:00:02 PM »
your makefile is incorrect.  download the 1.03 for the newest makefile.  Currently you are compiling timer8x.c, but that should be timer640.c

Offline CALEBTopic starter

  • Jr. Member
  • **
  • Posts: 17
  • Helpful? 0
Re: Timer640 errors!!?
« Reply #2 on: January 18, 2009, 09:58:36 PM »
Thanks for the help but I have looked at all of the make files,and tried them all .Which one out of the list am i  suppose to use? I tried every one and got the same errors. Can you send me a link? Thanks again

Offline CALEBTopic starter

  • Jr. Member
  • **
  • Posts: 17
  • Helpful? 0
Re: Timer640 errors!!?
« Reply #3 on: January 18, 2009, 10:37:50 PM »
Ok i figured it out ;D! in the sor_utils.h i needed the timer640.h i did not have it . thanks again!
Code: [Select]
//AVRlib includes
#include "global.h" // include global settings
#include "uart4.h" // include uart function library, includes buffer.h
#include "rprintf.h" // include printf function library
#include "timerx8.h" // include timer function library (timing, PWM, etc)
#include "timer640.h"  // be sure that you have this!!!
#include "a2d.h" // include A/D converter function library
« Last Edit: January 18, 2009, 10:40:16 PM by CALEB »

 


Get Your Ad Here

data_list