| Electronics > Beginners |
| Can I multiplex a 2-digit 7-segment display one segment at a time? |
| << < (4/7) > >> |
| Nusa:
--- Quote from: Peabody on December 02, 2018, 04:59:26 pm --- --- Quote from: ogden on December 02, 2018, 04:31:29 pm --- --- Quote from: Peabody on December 02, 2018, 02:15:47 pm ---I didn't say that clearly enough. I'm only using 7 pins for the segments. The respective segments of both digits are connected to the same pins. The digit is selected via the common cathod or anode. So I'm using a total of 9 pins to drive two digits. --- End quote --- Well, then you need 2:7 multiplex, not 1:14. If this is too difficult task for you to code, then you shall reconsider your occupation [kidding] ;) --- End quote --- I don't understand your comment. The whole point of this exercise was to see if I could multiplex one *SEGMENT* at a time, not one digit at a time. So I am NOT doing 2:7 multiplexing. Two digits have a total of 14 segments, and I'm cycling through them one at a time - the individual segments of the first digit followed by the individual segments of the second digit, one segment at a time. So every digit is turned on 1/14 of the total time. This isn't too difficult for me to code. And by the way, saying "kidding" doesn't make it any less insulting. --- End quote --- Perceived insult aside, the guy had a point even if you missed it. Since you have independent control of the anode/cathode (whichever it was) lines, you can probably update the same segment on both digits at the same time. Current limits of the segment pins permitting. |
| ogden:
--- Quote from: Peabody on December 02, 2018, 04:59:26 pm ---I don't understand your comment. The whole point of this exercise was to see if I could multiplex one *SEGMENT* at a time, not one digit at a time. --- End quote --- Yes, do *segment* at a time, but for *both* digits at the same time - so you scan all the segments of all digits in 7 steps, not 14. Also transistors are not that necessary, I/O's of msp430 are more than capable. --- Quote ---And by the way, saying "kidding" doesn't make it any less insulting. --- End quote --- Sensitive? :-// Sorry then. |
| Peabody:
Further testing has shown that if I increase the interrupt rate from 500 Hz to 1KHz, which reduces the ON period from 2ms to 1ms, I can do four digits (1/28) with no blinking detectable by me. But of course it's not as bright since each segment is only ON 1/28 of the time instead of 1/14. Reducing the resistor value can restore brightness - up to a point. So basically this just maintains the blink rate at about 35Hz for four digits, which as others have said appears to be the controlling factor for flicker regardless of how long the blink actually lasts. Well I'm sure there's a limit to that at some point, but as the ON time gets shorter, the eye interprets this primarily as just less bright so long as the frequency remains the same. The bottom line for all of this appears to be that if you fire one segment at a time, you don't need resistors on all the segment lines, and you don't need transistors or base resistors on the common anode/cathode lines. You just need one resistor on each common anode/cathode line. And if you have flexibility as to the refresh frequency, you can make this work for four digits or more without flicker and without any power consumption penalty versus multiplexing one entire digit at a time. The coding is only a little more complicated. You would still load the segment lines' I/O port OUT register with the segment pattern to be displayed, and set the common anode/cathode pin for that digit, but then just shift a bit in the port's DIRECTION register to the left on each interrupt. Then do the other digit the same way. Thanks very much for everyone's comments and suggestions. |
| Peabody:
--- Quote from: Nusa on December 02, 2018, 05:23:44 pm --- Perceived insult aside, the guy had a point even if you missed it. Since you have independent control of the anode/cathode (whichever it was) lines, you can probably update the same segment on both digits at the same time. Current limits of the segment pins permitting. --- End quote --- I'm still missing it. If the top segment on one digit is supposed to be ON, but the same segment on the other digit is supposed to be OFF, I don't see how I can update both at the same time if both are connected to the same I/O pin. I only have seven I/O pins for the segments. Could you please explain it again? |
| Peabody:
--- Quote from: ogden on December 02, 2018, 05:45:32 pm --- --- Quote from: Peabody on December 02, 2018, 04:59:26 pm ---I don't understand your comment. The whole point of this exercise was to see if I could multiplex one *SEGMENT* at a time, not one digit at a time. --- End quote --- Yes, do *segment* at a time, but for *both* digits at the same time - so you scan all the segments of all digits in 7 steps, not 14. Also transistors are not that necessary, I/O's of msp430 are more than capable. --- Quote ---And by the way, saying "kidding" doesn't make it any less insulting. --- End quote --- Sensitive? :-// Sorry then. --- End quote --- As I just said to Nusa, I don't see how I can do what you're suggesting if the segments on the two digits are connected to the same I/O pin. Perhaps you could explain how I would do that. Sensitive? Perhaps. But I would just never say what you said to anyone, kidding or not. And by the way, it's not my occupation. |
| Navigation |
| Message Index |
| Next page |
| Previous page |