74138 ic ..NEED help, any better way to simplify this code ?
i'm trying simplify code. somehow cant correct output when use code below. outputs tested manually 1 one first combination of high , low. want use different method easier.
4 led anode cathode
pin 15 led 1 pin 11
pin 14 led 2 pin 10
pin 13 led 3 pin 9
pin 12 led 4 pin 8
table 1 - combination
setup 1(a) 2(b) 3(c)
1 l l l
2 l l h
3 l h l
4 l h h
5 h l l
6 h l h
7 h h l
8 h h h
table 2 - active led output
setup 1 2 3 4 5 6 7 8
1 no 1 no 1,3 no 1,2 no 1,3,4
2 1 1 1 1,3 2,3 1,2 1,2,4 1,2,3,4
3 no 1 no 3 no 1,2,3 no 3,4
4 1,3 1,3 1 3 2,3,4 1,2,3,4 2,4 2,4
5 no 1,2 no 2,3,4 no 2 no 2,4
6 no 1,2 1,2 1,2,3,4 2 2 2,4 2,4
7 no 1,2,4 no 4 no 2,4 no 4
8 1,4 1,2,4 4 2,4 2,4 2,4 4 4
thanks help
4 led anode cathode
pin 15 led 1 pin 11
pin 14 led 2 pin 10
pin 13 led 3 pin 9
pin 12 led 4 pin 8
table 1 - combination
setup 1(a) 2(b) 3(c)
1 l l l
2 l l h
3 l h l
4 l h h
5 h l l
6 h l h
7 h h l
8 h h h
table 2 - active led output
setup 1 2 3 4 5 6 7 8
1 no 1 no 1,3 no 1,2 no 1,3,4
2 1 1 1 1,3 2,3 1,2 1,2,4 1,2,3,4
3 no 1 no 3 no 1,2,3 no 3,4
4 1,3 1,3 1 3 2,3,4 1,2,3,4 2,4 2,4
5 no 1,2 no 2,3,4 no 2 no 2,4
6 no 1,2 1,2 1,2,3,4 2 2 2,4 2,4
7 no 1,2,4 no 4 no 2,4 no 4
8 1,4 1,2,4 4 2,4 2,4 2,4 4 4
thanks help
sorry being thick , asking dumb question trying achieve other simplying code.
are trying emulate 74138 ic arduino or sending signals 74138?
are trying emulate 74138 ic arduino or sending signals 74138?
Arduino Forum > Using Arduino > Programming Questions > 74138 ic ..NEED help, any better way to simplify this code ?
arduino
Comments
Post a Comment