You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is Issue 307 moved from a Google Code project.
Added by 2010-07-28T21:54:20.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.
Closed (Fixed).
Original labels: Type-Enhancement, Priority-Medium, Component-Core, Milestone-0022
Original description
What change would like to see?
I have rewritten analogWrite and fixed an omission.
Why?
I have been doing a lot of work porting Arduino to other Atmega boards with other cpus. The cpu list includes 2560, 1281, 128, 644 and others. The timer portion of the code is the hardest part to port. There were a lot of cpu specific #ifdefs. Instead of using cpu #ifdefs, a better way of #ifdef the control port which is properly defined in the appropriate iomxxx.h file. This allows the code to work without having to make any changes when the code is ported to a new CPU.
Additionally while doing this I discovered that timer TIMER5C which controls the PWM on mega pin 44 (Port L bit 5) was omitted and therefore the PWM function on this pin did not work.
Would this cause any incompatibilities with previous versions? If so, how can these be mitigated?
No issues at all
I used a switch statement instead of if else
on the atmega328 it takes 14 more bytes
on the atmega1280 it takes 40 more bytes
the speed should be faster
The text was updated successfully, but these errors were encountered:
This is Issue 307 moved from a Google Code project.
Added by 2010-07-28T21:54:20.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.
Closed (Fixed).
Original labels: Type-Enhancement, Priority-Medium, Component-Core, Milestone-0022
Original description
What change would like to see?
I have rewritten analogWrite and fixed an omission.
Why?
I have been doing a lot of work porting Arduino to other Atmega boards with other cpus. The cpu list includes 2560, 1281, 128, 644 and others. The timer portion of the code is the hardest part to port. There were a lot of cpu specific #ifdefs. Instead of using cpu #ifdefs, a better way of #ifdef the control port which is properly defined in the appropriate iomxxx.h file. This allows the code to work without having to make any changes when the code is ported to a new CPU.
Additionally while doing this I discovered that timer TIMER5C which controls the PWM on mega pin 44 (Port L bit 5) was omitted and therefore the PWM function on this pin did not work.
Would this cause any incompatibilities with previous versions? If so, how
can these be mitigated?
No issues at all
I used a switch statement instead of if else
on the atmega328 it takes 14 more bytes
on the atmega1280 it takes 40 more bytes
the speed should be faster
The text was updated successfully, but these errors were encountered: