mirror of
https://github.com/taigrr/arduinolibs
synced 2025-01-18 04:33:12 -08:00
Provide Timer2 as an alternative to Timer1 for DMD
This commit is contained in:
@@ -70,7 +70,7 @@ always 16). We must also call DMD::loop() repeatedly from the application's
|
||||
main <tt>loop()</tt> function to ensure that the display is kept refreshed.
|
||||
|
||||
Sometimes it can be inconvenient to arrange for DMD::loop() to be called
|
||||
regularly. An alternative is to use Timer1 and
|
||||
regularly. An alternative is to use Timer1 or Timer2 and
|
||||
\ref dmd_interrupts "interrupt-driven display refresh":
|
||||
|
||||
\dontinclude DMD/examples/RunningFigureISR/RunningFigureISR.pde
|
||||
@@ -78,6 +78,9 @@ regularly. An alternative is to use Timer1 and
|
||||
\until loop()
|
||||
\until }
|
||||
|
||||
In the case of Timer2, \c TIMER2_OVF_vect and \ref DMD::enableTimer2() "enableTimer2()"
|
||||
would be used in place of \c TIMER1_OVF_vect and \ref DMD::enableTimer1() "enableTimer1()".
|
||||
|
||||
The full source code for the example follows:
|
||||
|
||||
\include DMD/examples/RunningFigure/RunningFigure.pde
|
||||
|
||||
Reference in New Issue
Block a user