7-Segment display program change

Hi,

Does anybody knows how to build a 7-segmente led display that show the current program number?!

Thanks

Yes :wink:

Either use 7-segment LED drivers or individual DOUT pins for the individual LEDs in the display. What exactly is your question though?

Hi,

I have a midi switch witch controlls relays acording to program change messages, and i need to know what the current program number… for example if i change de program to 1, the led display will show 001, if i change it to the 105, the led display will show 105 and so on…

thanks

is the midi switch a midibox? if so, just hook up another DOUT module to it (you’ll need 16 pins if you go without 7-segment display drivers, assuming not displaying the leading “0” is not a problem, otherwise you’ll need 20 pins) and change the source code so it changes the status of the 16/20 pins according to the program number.

Hi,

No, its not a midibox… I need an interface with a midi input, then turn that input into the led number… no problem with the zero.. just need numbers from 1 to 128…

Thanks

Okay, so you could just split the midi signal (using some inverters for instance) and run it into a core module. Hook up a DOUTx2 to it, wire up the displays - done :wink:

The software side is a piece of cake as well, I’ll gladly help out if you need anything.

Hi,

I had already made a midi splitter. For the rest ( modules and so on) i´m a noob…lol Can you explain it better?!

Thanks

Well you best do some reading on http://www.ucapps.de then :wink: You’ll need a CORE8 (the heart of each midibox) module and a DOUT (Digital OUTput, in your case LED) module. Read up on those and come back with more question afterwards :slight_smile:

Hi,

So, for what i understood, for example if i use this led digits,http://www.bond-led.com/specification/led-numeric-display/0.3%20Three%20digit%20numeric.pdf i will need 2 dout modules ( eight digital outs) right?!

Thanks

Each DOUTx4 module gives you 32 outputs.

Using that module is a bit more complicated as the leds are wired in a matrix (for some more info on how this is done check http://ucapps.de/mbhp/button_duoled_matrix.pdf)

I’d suggest using 3 indivual displays, which makes life (on the software side as well) a lot easier for a beginner’s project.

Hi again,

I was misunderstooding the functioning of the three digit led…

Has you said it’s easier to use three separated led.. like these ones http://futurlec.com/LED/7SR3911AS.shtml … I Think…

So, in this case i will need a common ground and 7 signals for each led…(7 x 3 = 21) DOUTx3 give 24 outs right ???

Thanks

Yes that’s the kind of dipsplay that will be easiest to use.

You’ll need a common ground, correct. But you won’t need 21 output pins. As you only want to display numbers from 0..127, the leftmost display only uses 2 of the LEDs (see attached pic) - which means you need 2 x 7 + 1 x 2 = 16 outputs. Which is exactly how many outputs you get from a DINx2 :slight_smile:

Oh… that’s cool!lol

I didn’t thought of that…

So, from the dout to the led the question is explained… and about the core!?

Thanks

What’s the question about the core? You’ll need one :slight_smile: See: http://ucapps.de/mbhp_core.html

Ok, So i need to build one of each, and programm the pic… (that’s the question part…i don’t know nothing of writing the code…)lol

Writing the application isn’t reall all that hard :wink: You can use the "http://ucapps.de/mios/ain64_din128_dout128_v2b.zip application to test all the individual segments. So you can go ahead and build the hardware and see if it works.

Don’t worry about the code at this point. We’ll get to that once you got the hardware up and running. As I said, if you for some reason really can’t do it, I’ll be happy to help out :wink:

Ok, thanks…

I’m building a pedalboard using this http://www.jimkim.de/html/guitar01_01.htm 5x, for 16 pedal, guitar A/B selector. amp A/B selector and plenty fo other functions… but in this case the code is already available and i just program the chip…

I’ll build these components (it will take about a month 'cause i’m missing 4x the above switch)

Thanks

Well 90% of what you need is already done here as well. The only coding you’d have to do is this:

unsigned char segments[10] = {0x3F, 0x06, 0x5B, 0x4F, 0x66, 0x6D, 0x7C, 0x07, 0x7F, 0x6F};

// ...

void MPROC_NotifyReceivedEvnt(unsigned char evnt0, unsigned char evnt1, unsigned char evnt2) __wparam {
if (evnt0 = 0xC0) { // it's a program change on channel 1
unsigned char prog_num = evnt1;
unsigned int status = 0; // all leds off

if (prog_num > 99) { // 1st digit
status = 0xC000;
prog_num -= 100;
}

status |= segments[(prog_num / 10)] << 7;	// 2nd digit
status |= segments[(prog_num %% 10)]; // 3rd digit

MIOS_DOUT_SRSet(0, (status & 0xFF)); // set first shift register
MIOS_DOUT_SRSet(1, (status >> 8)); // set second shift register
}
}[/code]





(Untested, just wrote that down quickly to give you an idea) ;)