sidysm Posted April 1, 2003 Report Share Posted April 1, 2003 k, hopefully the last last question before I finalise the planned controls for my box.I plan to run 16 segment meterbridges ( )and 11 segment led rings.Would I need an output for eac set set or each LED ie. would one of each of the above require to outputs from a dout board or 26 from 4 Dout Boards? Quote Link to comment Share on other sites More sharing options...
sidysm Posted April 1, 2003 Author Report Share Posted April 1, 2003 k, hopefully the last last question before I finalise the planned controls for my box.I plan to run 16 segment meterbridges ( )and 11 segment led rings.Would I need an output for eac set set or each LED ie. would one of each of the above require to outputs from a dout board or 26 from 4 Dout Boards? Quote Link to comment Share on other sites More sharing options...
TK. Posted April 1, 2003 Report Share Posted April 1, 2003 Hi,LED-rings and meter bridges are driven multiplexed - this saves a lot of pins :)See also http://www.ucapps.de/mbhp/mbhp_doutx4_ledrings.pdfSo: for 16 LEDrings and 16 meters you need 2 DOUTX4 modulesBest Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
TK. Posted April 1, 2003 Report Share Posted April 1, 2003 Hi,LED-rings and meter bridges are driven multiplexed - this saves a lot of pins :)See also http://www.ucapps.de/mbhp/mbhp_doutx4_ledrings.pdfSo: for 16 LEDrings and 16 meters you need 2 DOUTX4 modulesBest Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
goule Posted January 18, 2006 Report Share Posted January 18, 2006 I dont understand how it is possible to multiplex and have different values for each ledring ... ???Electrically speaking and programmatically speaking, the last values sent to the connectors with resistor will update ... the whole bunch of ledrings with that value :( Only thing you can do is shut off some rotarys but that's all ...Playing with MIOS_DOUT_PinSet0( ) and MIOS_DOUT_PinSet1( ) I could not set two different values for each ledring ... ::)Did I misunderstood something ??? What's wrong with my ... logic ? :DGoule Quote Link to comment Share on other sites More sharing options...
TK. Posted January 18, 2006 Report Share Posted January 18, 2006 It's easier to set 8 pins at once with the MIOS_DOUT_SRSet() function, it should be done within the SR_Service_Prepare() hook, which is called each mS before the LEDs will be updated.Programming handling for this circuit: http://www.ucapps.de/mbhp/mbhp_doutx4_ledrings.pdfFirst cycle: set D7 of the first shift register (SR1) to 0 (ground), and all other outputs of SR1 and SR2 to 1 (+5V)As a result, only the first row of LEDs will lit, all others will close (cathode driven with +5V)set the data outputs of SR3 and SR4 to the pattern which should be displayed by the first rowOn the next cycle (1 mS after SR_Service_Prepare() has been called again), set D6 of SR1 to 0, all other to 1, and apply the pattern for the second row to SR3 and SR4Once the 16th row has been reached, switch back to the firstSo - a loop takes 16 mS. And now the trick: if a LED row is not supplied with power for 15 mS, it will continue to lit for a short moment. The brightness will be lower, but you won't regognized that it's switched off/on very quickly.Btw: see the code in mm_vpot.c of the MIDIbox MM application for an example which drives 8 LED rings://///////////////////////////////////////////////////////////////////////////// This function should be called from SR_Service_Prepare in main.c// it copies the current LEDring pattern to the DOUT registers/////////////////////////////////////////////////////////////////////////////void MM_VPOT_LEDRing_SRHandler(void){#if LEDRINGS_ENABLED static unsigned char sr_ctr; unsigned int anode_pattern; // increment the counter which selects the ledring that will be visible during // the next SRIO update cycle --- wrap at 8 (0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, ...) sr_ctr = ++sr_ctr & 0x07; // select the cathode of the LEDring (set the appr. pin to 0, and all others to 1) MIOS_DOUT_SRSet(LEDRINGS_SR_CATHODES, cathode_patterns[sr_ctr]); // set the LEDring pattern on the anodes anode_pattern = ledring_pattern[sr_ctr]; MIOS_DOUT_SRSet(LEDRINGS_SR_ANODES_1, anode_pattern & 0xff); MIOS_DOUT_SRSet(LEDRINGS_SR_ANODES_2, (anode_pattern >> 8) & 0xff);#endif}[/code]Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
audiocommander Posted January 19, 2006 Report Share Posted January 19, 2006 I see! ...this is tricky :oThanks for the explanation, Thorsten!(Now I can put back my soldering iron and spare some pins for my 4 LED-levelMeters... ;D)@Goule: I wouldn't be astonished at all if our MidiBoxes would look exactly the same once they're finished... over and over the same problems :P ;D Quote Link to comment Share on other sites More sharing options...
goule Posted January 19, 2006 Report Share Posted January 19, 2006 Thorsten thank you for this useful explanation :D as I've planned to emmbed several 10 led meters to see the joysticks & D-Beam activity 8)Audiocommander : you're right ;D I wouldn't be surprised as well 8) What kind of controllers have you planned to put in your machine among the distance sensor ? Joysticks ? ;DTonight there will be some new soldering to test all this !Best Regards to all of you,Goule Quote Link to comment Share on other sites More sharing options...
goule Posted January 19, 2006 Report Share Posted January 19, 2006 Works like a charm, thanks again ! :DGoule Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.