What I do with unknown displays, is write a sketch that cycles through the segments/digits in linear order, and very slow. In one difficult case, I made it scan one segment at a time, controlled by a pushbutton to give me time to think/write what I see.
At the end of that, I have a verified "assignment table" to use when writing the code.
I wouldn't worry too much about the LED voltage if they do illuminate satisfactorily.
You do have current limiting resistors on the segments, right?
I have 2.2k resistors on the base of the pnp transistors and a 0 ohm resistor on the collector as per the recommendation of the review request I posted on the EEVblog, worse case scenario I can easily flip the two if need be.
Oh, boy, I didn't see that. I think the modules must be shown incorrectly. Strangely the datasheet agrees. Wired that way, only one of the 3 LEDs for each segment would conduct.
But in many larger modules, LEDs are series wired because they have to be multiple to cover the entire segment area. However the DP is small so only needs one LED. The voltage drop is lower, so a higher value resistor is needed for the same current.
There are TWO 2V4 green LEDS in series for a total of 4V8 needed. Easy on a 5V0 system, not so much on a 3V3.
Red v green are DIFFERENT in more ways than just emission spectra. Engineering is checking ALL params when subbing parts.
Note that the schematic being referenced is the original from the instructables project. The OP posted a different schematic in the PDF file in the original post.
Alright, so I found some code online that can potentially help solve my issue or at the very least is a step in the right direction. I realize now that even though I am using 4 individual displays, they are acting as combined 4 digit 7 segment display (quite obvious I know, but this is all a learning process for me clearly). I wrote some code here:
So all 4 segments do turn on, however segment E is the one that isn't turning on, making numbers 2, 6, and 8 missing a segment (Numbers 1,3,5,7, and 9 are all good). Putting in 0000 for the numbers doesn't really work either, segment U30 on my schematic doesn't turn on at all, and U31-U33 turn on but segment E is missing. I checked continuity with a multimeter and it was present, so I'm thinking my pin assignment for pin E is wrong.
There is not a pin number defined for the TX LED Actually the pin number is 30, or LED_BUILTIN_TX. TXLED0 is a macro to output a LOW to the pin, TXLED1 is a macro to output a HIGH.
You really should have breadboarded this and done some testing before building the hardware, you may need to do a bit of re-wiring to make it work with a library. See above, use LED_BUILTIN_TX instead of TXLED0.
The way you have all the LED segments wired to a single port would make it easy to directly write to the port, but that is a rather advanced bit of coding.
Changing pin E to LED_BUILTIN_TX does work, however as soon as I change one of the four numbers the display doesn't show those numbers properly
#include "SevSeg.h"
SevSeg sevseg;
void setup(){
byte numDigits = 4;
byte digitPins[] = {8, 10, 9, 11};
byte segmentPins[] = {3, 2, 0, 1, LED_BUILTIN_TX , 4, 12, 6};
bool resistorsOnSegments = true;
bool updateWithDelaysIn = true;
byte hardwareConfig = COMMON_ANODE;
sevseg.begin(hardwareConfig, numDigits, digitPins, segmentPins, resistorsOnSegments);
sevseg.setBrightness(90);
}
void loop(){
sevseg.setNumber(3332);
sevseg.refreshDisplay();
}
The display shows 3 on digit 1, and the remaining 3 digits show 3 with segment e on. I think my pin assignment for pin C is wrong, I made it digital pin 0 which is RX on the arduino leonardo.
I learned that I really need a better understanding of my pin assignments... still confused as to how I'm going to display the time from what I can find online a lot of the example code has numerous errors, I tried creating an array with my pin definitions of the original code I found on instructables but that didn't seem to work either.
Originally I had capacitors connected to the crystal as I was using a different RTC IC, then changed to the DS1307. I updated the schematic, but then forgot to update the PCB (bad mistake I know), so I'm wondering if the unpopulated capacitors C28 and C29 for crystal Y21 is causing issues. This is the serial monitor output: