Jump to content

Recommended Posts

Posted

Yes ;)

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

Posted

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

Posted

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.

Posted

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 ;)

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

Posted

Well you best do some reading on http://www.ucapps.de then ;) 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 :-)

Posted

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 :-)

5274_digits_png5694fcdcf258bc246beb8f457

5274_digits_png5694fcdcf258bc246beb8f457

Posted

Writing the application isn't reall all that hard ;) 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 ;)

Posted

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) ;)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...