Forum Index > Projects > LED Pegboard and Matrix Projects
 Another Peggy 2 Arduino tip
 |  Printable Version
By: Windell (offline) on Tuesday, April 28 2009 @ 11:58 AM PDT (Read 1706 times)  
Windell

We've noticed that Peggy 2 can give a somewhat jittery display sometimes when programmed from the Arduino environment. The reason is that there is a timer interrupt (for the millisecond timer) that happens approximately once per millisecond. If you are (1) using the "standard" Peggy 2 libraries and (2) not using the millisecond timer or other Arduino functions that obviously require interrupts, you can usually smooth things out again by turning off global interrupts.

To do this, add the following line to your setup section:

PHP Formatted Code
asm("cli");



This tip should work, for example, with all example programs in the standard Peggy 2 library.


Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   



 All times are PDT. The time is now 12:11 AM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Able to Post 
Filtered HTML Allowed 
Censored Content 

Evil Mad Scientist Forum Archives — Read only!

Please visit our new forums for new discussions.


DIY Hardware for Electronic Art


The Original Egg-Bot Kit


Octolively
Interactive LED kits


Meggy Jr RGB
LED matrix game
development kit.


Business-card sized
AVR target boards


Peggy 2
LED Pegboard kits

My Account






Lost your password?