Tell me more ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

Is it possible to use a script using TimerOne from Arduino in an ATmega8 and how would I go about it?

share|improve this question

1 Answer

up vote 3 down vote accepted

I will answer this assuming you are referring to the arduino-timerone library, whose source is located here.

First of all, looking at the datasheets of the two parts, the ATmega8 is quite similar to the ATmega168/328, which the TimerOne library is stated to target (apart from some differences, including the number of PWM-capable outputs).

In particular, in relation to Timer1, inspecting the timer's descriptions in the two datasheets and its specific functionalities exploited in the TimerOne code, the ATmega8 and ATmega168/328 should be swappable with each other.

Lastly, the Arduino bootloader is made available to be burned onto an ATmega8 chip (IIRC, ATmega8 is one of the selectable boards in the Arduino 1.0 IDE).

With all of the above in mind, the TimerOne library should very likely function without modification on sketches written to an Arduino-bootloaded ATmega8 chip.

share|improve this answer
Thank you. That confirm what I reasearched. You covered more than I new already. – Mr Men Aug 22 '12 at 10:51
@MrMen - If you found this answer useful (which you probably did, since you accepted it) don't forget to upvote. – stevenvh Aug 22 '12 at 11:14
Done that ty((: – Mr Men Aug 22 '12 at 11:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.