Ok das mit Timer1 hat geklappt mit Timer3 leider nicht.
Timer3 ist wenn ich ihn entpacke im Ordner "TimerThree" darin befindet sich ein Odrner "Timer3" und darin 3Dateien: "TimerThree.h","TimerThree.cpp" und "TimerThree.o"
Wenn ich den Ordner einfüge so wie ich ihn entpackt habe, kommt nach einem Klick auf Upload das hier:
pwm_test.cpp:1:24: error: TimerThree.h: No such file or directory
pwm_test.cpp: In function 'void setup()':
pwm_test:8: error: 'Timer3' was not declared in this scope
Speicher ich den Unterordner "Timer3" in libraries kommt folgendes:
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp: In member function 'void TimerThree::initialize(long int)':
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp:26: error: 'TCCR3A' was not declared in this scope
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp:27: error: 'TCCR3B' was not declared in this scope
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp: In member function 'void TimerThree::setPeriod(long int)':
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp:40: error: 'ICR3' was not declared in this scope
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp:41: error: 'TCCR3B' was not declared in this scope
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp: In member function 'void TimerThree::setPwmDuty(char, int)':
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp:50: error: 'OCR3A' was not declared in this scope
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp:51: error: 'OCR3B' was not declared in this scope
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp:52: error: 'OCR3C' was not declared in this scope
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp: In member function 'void TimerThree::pwm(char, int, long int)':
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp:61: error: 'DDRE' was not declared in this scope
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp:61: error: 'PORTE3' was not declared in this scope
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp:61: error: 'TCCR3A' was not declared in this scope
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp:61: error: 'COM3A1' was not declared in this scope
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp:62: error: 'DDRE' was not declared in this scope
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp:62: error: 'PORTE4' was not declared in this scope
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp:62: error: 'TCCR3A' was not declared in this scope
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp:62: error: 'COM3B1' was not declared in this scope
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp:63: error: 'DDRE' was not declared in this scope
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp:63: error: 'PORTE5' was not declared in this scope
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp:63: error: 'TCCR3A' was not declared in this scope
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp:63: error: 'COM3C1' was not declared in this scope
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp: In member function 'void TimerThree::disablePwm(char)':
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp:70: error: 'TCCR3A' was not declared in this scope
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp:70: error: 'COM3A1' was not declared in this scope
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp:71: error: 'TCCR3A' was not declared in this scope
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp:71: error: 'COM3B1' was not declared in this scope
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp:72: error: 'TCCR3A' was not declared in this scope
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp:72: error: 'COM3C1' was not declared in this scope
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp: In member function 'void TimerThree::attachInterrupt(void (*)(), long int)':
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp:79: error: 'TIMSK3' was not declared in this scope
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp: In member function 'void TimerThree::detachInterrupt()':
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp:86: error: 'TIMSK3' was not declared in this scope
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp: In member function 'void TimerThree::start()':
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp:91: error: 'TCCR3B' was not declared in this scope
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp: In member function 'void TimerThree::stop()':
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp:96: error: 'TCCR3B' was not declared in this scope
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp: In member function 'void TimerThree::restart()':
Z:\arduino_software\arduino-0019\libraries\Timer3\TimerThree.cpp:101: error: 'TCNT3' was not declared in this scope
Wenn ich nun den Ordner in "TimerThree" umbenenne kommt der selbe Fehler wie zuvor.
Allerdings brauche ich meiner Ansicht nach Timer3 um an das PWM Signal zu kommen, weil Timer1 ja über Pin 9 und 10 das Signal ausgibt. Timer 3 auf den Pins 2,3 & 5.
Das LCD Pad welches auf den Duemilanove gesteckt wird ist über die Pins 0,4,5,6,7,8,9,10 angechlossen
http://www.robotshop.com/content/PDF/dfrobot-arduino-shields-manual.pdf (ab Seite 8)
Seh ich das Richtig mit meiner Annahme mit den Timern? Wenn ja, wie bekomme ich dann Timer 3 zum laufen oder wie sag ich Timer1 dass er PWM auf Pin 1,2,3,11,12 oder 13 ausgeben soll 