Two 3-digit 7-segment displays with MAX7219


hi all,

i'm playing around making digital gauge shows 2 different values 2 different analog inputs. these displayed using 7-segment leds; 1 3-digit , 1 2-digit.

i've got leds wired max7219 chip, , using basic tutorial (http://tok.hakynda.com/article/detail/3/max7219---4-digit-7-segment-display) able numbers counting upwards on 4 of 5 available digits, wiring works. here's code:

code: [select]
#include "ledcontrol.h"
ledcontrol lc = ledcontrol(11,13,10,4);

int count = 1000;

void setup()
{
    lc.shutdown(0,false);
    lc.setintensity(0,5);
    lc.cleardisplay(0);
}

void loop()
{
    string t = string(count++);
    lc.setdigit(0,0,(int)(t[0]-'0'),true);
    lc.setdigit(0,1,(int)(t[1]-'0'),false);
    lc.setdigit(0,2,(int)(t[2]-'0'),false);
    lc.setdigit(0,3,(int)(t[3]-'0'),false);
    delay(100);
    lc.shutdown(0,true);
    lc.shutdown(0,false);
}


my trouble is, how address each digit individually, can display 1 vale in 3-digit led, , different value in 2-digit led?

the example uses ledcontrol.h library, don't understand nomenclature of instances, devices , addresses. can give me nudge in right direction?

well nudge forget libraries , read data sheet chip. quite simple chip drive directly , each digit has own register write individual manipulation of digits easy.


Arduino Forum > Using Arduino > LEDs and Multiplexing > Two 3-digit 7-segment displays with MAX7219


arduino

Comments

Popular posts from this blog

DHT11 Time out error using v0.4.1library

Sketch upload fails with Java error (___REMOVE___/bin/avrdude)!

Arduino Uno + KTY81/210 temperature sensor