California
Offline
Sr. Member
Karma: 2
Posts: 409
|
 |
« on: March 03, 2011, 05:27:57 am » |
So my 7seg has 8 anodes and 5 cathodes. How, with my two 595's do I switch the cathodes? This seems like it would be easy to google, but i guess I just havnt got the right key words because nothing is popping up...
thanks
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
UK
Offline
Brattain Member
Karma: 138
Posts: 19067
I don't think you connected the grounds, Dave.
|
 |
« Reply #1 on: March 03, 2011, 05:41:32 am » |
The cathodes are probably all commoned - easily checked with a meter.
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
California
Offline
Sr. Member
Karma: 2
Posts: 409
|
 |
« Reply #2 on: March 03, 2011, 05:42:19 am » |
Its a 4 digit, i shouldve specified. I need to be able to switch them.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
UK
Offline
Brattain Member
Karma: 138
Posts: 19067
I don't think you connected the grounds, Dave.
|
 |
« Reply #3 on: March 03, 2011, 05:48:30 am » |
Should still be easy to check with a meter. Or a datasheet.
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
California
Offline
Sr. Member
Karma: 2
Posts: 409
|
 |
« Reply #4 on: March 03, 2011, 05:53:38 am » |
Either you arent understanding my question, or Im not understating your answer. I know how to set the anodes of LED's to high to turn them on when they share a common ground. But in this case each digit shares anodes and is separated by using separate cathodes. So along with setting an output pin to apply charge to the anodes of the segments, I also need to know how to switch the ground on and off between the 5 cathodes to change between digits.
edit- okay I see the confusion. I know which cathodes control what... I need to know how to actually set the cathodes.
|
|
|
|
« Last Edit: March 03, 2011, 05:58:32 am by stoopkid »
|
Logged
|
|
|
|
|
0
Offline
Tesla Member
Karma: 71
Posts: 6623
Arduino rocks
|
 |
« Reply #5 on: March 03, 2011, 05:58:46 am » |
If its 4 digit and there are 5 cathodes it might be that one of them is the colon between digits 2 and 3?
Each cathode can be driven with a NPN transistor (emitter to GND, collector to cathode, base via resistor to one Arduino pin). Driving the relevant pin HIGH switches on the transistor. The transistor is operating as a saturated switch, just make sure it can take the combined current of all 7 segments (this is typically set by the current limit transistors on the anodes).
Alternatively there are LED driver chips that control such a multiplexed array directly.
|
|
|
|
|
Logged
|
|
|
|
|
California
Offline
Sr. Member
Karma: 2
Posts: 409
|
 |
« Reply #6 on: March 03, 2011, 06:08:23 am » |
perfect. thank you.
but since I will only be lighting up one digit at a time by rolling through the cathodes, I only need to worry about the current of one digit, right? whoops nevermind, i misread you.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
UK
Offline
Brattain Member
Karma: 138
Posts: 19067
I don't think you connected the grounds, Dave.
|
 |
« Reply #7 on: March 03, 2011, 06:39:18 am » |
Sorry for the misunderstanding - I originally thought it was maybe a single digit in a 14 pin package.
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
California
Offline
Sr. Member
Karma: 2
Posts: 409
|
 |
« Reply #8 on: March 03, 2011, 06:45:50 am » |
No problem, i wasn't very clear.
|
|
|
|
|
Logged
|
|
|
|
|
|