mmmh .. ok
i used some suggestions i found here:
for now the leds of all my 8 shift registers are turned all off after 250 ms since the last note on received...
i used a global variable called "timerled"
ad every note on received it is turned to 0
and everytime it reaches 250 all led are set to 0
this is how the thing works
void SR_Service_Prepare(void) __wparam
{
if( ++timerled >= 250 ) {
timerled = 0;
MIOS_DOUT_SRSet(0,0x00);
MIOS_DOUT_SRSet(1,0x00);
MIOS_DOUT_SRSet(2,0x00);
MIOS_DOUT_SRSet(3,0x00);
MIOS_DOUT_SRSet(4,0x00);
MIOS_DOUT_SRSet(5,0x00);
MIOS_DOUT_SRSet(6,0x00);
MIOS_DOUT_SRSet(7,0x00);
}
}
now.. i repeat i have no programming skills
what i need now is a way to make the same work but for every single led
i thougt i have to use a multiple variabe like " unsigned char timerled[64] "
but do i have to repeat the "if" code 64 times????
is there an intelligent way to do this?
i mean .. how do i have to configure the code for a multiple variable in the SR_Service_Prepare section??