servo library, some words undefined

I copy the code from servo.cpp. "TCCR3A","TCC3B" and "TCNT3" are not predefined. What are these words meaning? I cannot understand. if i program my own code, how to use them? thanks

#if defined (_useTimer3)
  if(timer == _timer3) {
    TCCR3A = 0;             // normal counting mode
    TCCR3B = _BV(CS31);     // set prescaler of 8
    TCNT3 = 0;              // clear the timer count
#if defined(__AVR_ATmega128__)
    TIFR |= _BV(OCF3A);     // clear any pending interrupts;
    ETIMSK |= _BV(OCIE3A);  // enable the output compare interrupt
#else
    TIFR3 = _BV(OCF3A);     // clear any pending interrupts;
    TIMSK3 =  _BV(OCIE3A) ; // enable the output compare interrupt
#endif
#if defined(WIRING)
    timerAttach(TIMER3OUTCOMPAREA_INT, Timer3Service);  // for Wiring platform only
#endif
  }
#endif

When you use the Arduino IDE, these terms should get defined. They are identical to the terms used in the datasheet for the microprocessor used by your Arduino.

wow! so fast reply. can you give some clues about the details? where to find the details?

They are identical to the terms used in the datasheet for the microprocessor used by your Arduino.

Which Arduino board are you using ?

duesuf: I copy the code from servo.cpp. "TCCR3A","TCC3B" and "TCNT3" are not predefined.

They are the names of registers on the microchip in your Arduino. If you are using an Uno that is an Atmega 328. It is a good idea to have a copy of the datasheet for reference. You can get it from the Microchip website. (Microchip now own Atmel)

...R

Yes, I'm using uno. now i should take some time on the datesheet. Thanks.

duesuf: Yes, I'm using uno. now i should take some time on the datesheet. Thanks.

The question that you should be asking is does the 328 chip used by the Uno actually have a third timer control register ?

In your code you have

#if defined (_useTimer3)
  if(timer == _timer3) {

How and where is _useTimer3 defined in your code ?

It would be so much easier to provide help if you posted a complete program that demonstrates the problem.

Timer/Counter 3 does not exist on the UNO so the Timer/Counter Control Register A for Timer/Counter 3 (TCCR3A) is not defined on an UNO. Same for TCCR3B, the Timer Interrupt MaSK register (TIMSK3), and the Timer CouNT (TCNT3)

That code is for an Arduino MEGA 2560 or Arduino MEGA 1280.