Charlieplexing issue


i trying control 2 traffic lights using 4 pins , charlieplexing...

all modes work save both red (and should initial state so...
it gives me 2 lights both red , green on.



code: [select]


|----->4---------+
|                    |
|-<5-+-<2-+-<1-+
|      |     |     |
|->6-|->3-|     |
|      |     |     |
a     b      c    d

note: > , < led's
+ node
a, b, c , d digital pins on arduino 2009




1 , 4 green
2 , 5 yellow
3 , 6 red

i use code:
code: [select]

pinmode(ledpina, output);
 digitalwrite(ledpina, high);
 pinmode(ledpinb, input);
 digitalwrite(ledpinb, high);
 pinmode(ledpinc, output);
 digitalwrite(ledpinc, low);  
 pinmode(ledpind, input);
 digitalwrite(ledpind, high);


a should +, b input pull-up activated, c - , d input pull-up
that way red should activated since d not giving output, :s

any appreciated.

below circuit in fritzing:



left signal straight, right in l-shape (just circuit design of course, not real light...)

the pins not driving led's should input pull-up off, not on (low not high).


Arduino Forum > Using Arduino > LEDs and Multiplexing > Charlieplexing issue


arduino

Comments

Popular posts from this blog

Thread: PKI Client 5.00 install (for eToken Pro)

ATmega2560-Arduino Pin Mapping

Crossfader Arduino Tutorial