On 04/03/2011 12:03 PM, piclist-request@mit.edu wrote: > Message: 7 > Date: Sat, 2 Apr 2011 21:53:14 -0400 > From: V G > Subject: [EE] Stroboscopic effect tuner for my guitar > To: PICLIST > Message-ID: > > Content-Type: text/plain; charset=3DISO-8859-1 > > Hey all, I'm looking at the stroboscopic effect tuner here: > > http://das-labor.org/wiki/Stimmmopped/en > > What is the purpose of having two LEDs? Do they both blink exactly the sa= me > way? Or are they out of phase somehow? Why not just have one LED? > > "Are they out of phase?" can be answered by looking at the source code.=20 ISR(TIMER1_COMPA_vect) { 169 switch (timer) { 170 case 1: 171 LED_PORT |=3D (1 << LED0); 172 break; 173 174 case 2: 175 LED_PORT &=3D ~(1 << LED0); 176 break; 177 178 case 6: 179 LED_PORT |=3D (1 << LED1); 180 break; 181 182 case 7: 183 LED_PORT &=3D ~(1 << LED1); 184 break; 185 186 case 10: 187 timer =3D 0; 188 break; 189 } They are not turned on and off simultaneously; the exact phase=20 relationship I guess should be an exercise for the implementer. Note=20 that LED0 toggles on timer values 0 and 1, while LED1 toggles on values=20 6 and 7, and the timer resets at 10. Might even look into this myself=20 some day. Joe W - New here; been reading in digest mode for a while. For the most=20 part, a very informative on-topic list! Along with some amusing=20 digressions. ;) --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .