Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colon Support #96

Open
RodjGaming opened this issue Apr 12, 2022 · 4 comments
Open

Colon Support #96

RodjGaming opened this issue Apr 12, 2022 · 4 comments

Comments

@RodjGaming
Copy link

Hi there,

I have a 4 digit 7-segment display with an additional colon and a 3rd upper dot(to the right of the 3rd digit). These dots(L1,L2,L3) have their own common cathode/anode with the other end connected to segments A, B, and C individually, basically making it its own digit. Below are the pictures from the datasheet of the display:
image
image

I would like if native colon support could be added for components like this, or if there is another way to achieve lighting up L1 and L2 currently in the library.

@DeanIsMe
Copy link
Owner

Hi,
There is no native support for this. If I were you, I would treat L1,L2,L3 as DIGIT 0, where segments A,B,C correspond to L1,L2,L3.
You can then call setNumber() with a number 9999 or less. Follow this by setSegmentsDigit(0, b00000CBA) to override the digit code of digit 0 (where CBA are the states of L3, L2, & L1)

@basgoossen
Copy link

Hi RodjGaming,
Is there a reason you're not just using digitalWrite for this, to control the respective pins?
If you want to control brightness of those dots you can also use analogWrite if the pins they are connected to support pwm.

@machmar
Copy link

machmar commented Jan 15, 2023

Hi, the issue is that these dots are multiplexed like if they were digits. If you controlled the pin with regular digital write, you'd not only control the colon, but also the additional dot on the top.
Using PWM on those segments is a bad idea because you have no control over when both anode and cathode are enabled - theoretically, if the library ran at just the right speed, the segment's won't light up until some high percentage of PWM because the enabled time of the PWM could be synced with the disabled time of those particular common lines.

@basgoossen
Copy link

I did not check the connection schema carefully enough. My display has a separate anode and cathode for those led's (and is hence using 14 pins instead of 13).
i get your point for PWM, however a higher PWM frequency (arduino supports up to 62khz) mitigates this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants