Re: Source pins delay?

22 views
Skip to first unread message

Andrew Stone

unread,
Dec 30, 2012, 11:16:39 PM12/30/12
to Mel Patrick, toasted-circu...@googlegroups.com
try bracketing the clear and set pair with cli() and sei() to temporarily turn off interrupts.  If that does not work, I'll probably have to look at your code.

Cheers!
Andrew


On Fri, Dec 28, 2012 at 5:27 PM, Mel Patrick <trav...@wabbitwanch.net> wrote:
I'm using the Arduino bitset and bitclear to toggle the 16 pin 500ma source pins outputs. I have 12 of the outputs connected up to 12 LEDs that are the hour indicators for a clock.

When the hour changes I clear the bit that indicated the previous hour and then set the bit for the current hour. Not rocket science.

I found that if I set the sources with a clear followed immediately by a set, the Lightuino doesn't always get the clear but it always gets the set.

So just how fast can you toggle states on those source pins? I put in a delay of 250ms but it still doesn't always get the clear so I get two LEDs on instead of one.

At the same time, I'm using the 70 sinks as the seconds and minute indicators.

Oh, I also tried sending 0 to the sources to turn then all off before turning on the new output, but that seems to flash all lines. The outputs work a little weird...🐛

Mel
Sent from my iPad

Reply all
Reply to author
Forward
0 new messages