Go Down

Topic: New library for timer1 and timer3 of the ATmega1284P (Read 1 time) previous topic - next topic

Elektrix

This is my very first library project:

The TimerOne library http://playground.arduino.cc/Code/Timer1 makes use of the 16-bit timer1 of the ATmega328P (Uno R3 chip). As I changed my RGB-LED project to the ATmega1284P because I wanted higher PWM solution I tried the TimerOne library. Unfortunately it doesn't run on the ATmega1284P beacuse the pin settings are somewhat hard-coded in the lib. So I changed the pin settings and then my timer1 was working.

Now the 1284P also has a timer3 (this was the reason why I switched to this controller). The TimerThree library at http://playground.arduino.cc/uploads/Code/TimerThree.zip didn't work and so I simply doubled the code of the TimerOne lib and adapted the register and pin settings, accordingly.

You can find a short description with all the links in my blog:

http://heliosoph.mit-links.info/timeronethree-library-atmega1284p/

The lib is at: https://github.com/heliosoph/TimerOneThree

In my IDE (1.0.5) everything works good, hopefully this is the same on other 1.0 versions of the IDE.

So I'm not a skilled programmer but am publishing now this lib hoping that everything works and some others find it useful.

Elektrix
My blog about arduino and Linux themes:
http://heliosoph.mit-links.info/

Go Up