That is a bad example in my opinion. It uses no series resistors and claims that by using pwm they are not needed. It is also badly written code.Daniele, i can help you with some code tomorrow evening, if you still need it.Paul
There's probably a better one out there.The point is to do some research by Googling.
So, just to clarify to whoever is going to help me, these are the 2 design I am working with. Which one do you recon will be easier to code? Please bare in mind that for the final project I will have to effectivly double everything as I need to connect a second DOUBLE digit display.
digitalWrite (csPin, LOW);SPI.transfer (addressRegister); // 1 to 8 for digit selectSPI.transfer (dataToDisplay); // built in font decode handles 0-9, -, blank, H,E,L,P, or send your owndigitalWrite (csPin, HIGH);
Although each I/O port can source more than the test conditions (20mA at VCC = 5V, 10mA at VCC = 3V) under steadystate conditions (non-transient), the following must be observed:ATmega640/1280/2560:1)The sum of all IOH, for ports J0-J7, G2, A0-A7 should not exceed 200mA.2)The sum of all IOH, for ports C0-C7, G0-G1, D0-D7, L0-L7 should not exceed 200mA.3)The sum of all IOH, for ports G3-G4, B0-B7, H0-H7 should not exceed 200mA.4)The sum of all IOH, for ports E0-E7, G5 should not exceed 100mA.5)The sum of all IOH, for ports F0-F7, K0-K7 should not exceed 100mA.If IOH exceeds the test condition, VOH may exceed the related specification. Pins are not guaranteed to source currentgreater than the listed test condition.
The forward voltage of your green segments is 2.1V, so series resistors should be around (5 - 2.1) / 0.005 = 500R so 510R is the closest common value.Do you still need some help with code?