goule Posted March 23, 2006 Report Share Posted March 23, 2006 Hi folks,I've been working with one DOUT without any problem. I've now connected a second DOUT, and want to play with some leds connected to it. How is it possible to tell the program that I want to address the second DOUT ?Thancks,Goule Quote Link to comment Share on other sites More sharing options...
TK. Posted March 23, 2006 Report Share Posted March 23, 2006 Hi Goule,there are several possibilities. By using the MIOS_DOUT_PinSet function, you can address the appr. outputs with pin number 8-15.With the MIOS_DOUT_SRSet function, you can write all 8 pins with a single function call - the SR number is 1 in this case (we are counting from 0)A pintable can be found here: http://www.midibox.org/dokuwiki/doku.php?id=din_dout_pintableBest Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
goule Posted March 23, 2006 Author Report Share Posted March 23, 2006 Hi Thorsten, always great to have an answer directly from the technical father ;DI don't want to address the second shift register, I want to access the first shift register of the second DOUT module connected to te first one. So reading the pintable, I guess I can do it with MIOS_DOUT_PinSetX(32) .. MIOS_DOUT_PinSetX(63) ?Is there a particular goal using MIOS_DOUT_SRSet function, for instance lighting up 8 leds in one single step ? Any other trick about that function that is frequently used ?Last question : I could not find the schematics for connecting J2 of 1st DOUT to J1 of 2nd DOUT. I made completely parallel connexions : was that right ?Thanks again, this project brings a lot of fun everyday !Please tell me if by chance you come to Paris, one never knows !Goule Quote Link to comment Share on other sites More sharing options...
goule Posted March 23, 2006 Author Report Share Posted March 23, 2006 Okay, I understand my strange behaviours of my DOUT #2 : I still had :MIOS_SRIO_NumberSet( 4 )instead of :MIOS_SRIO_NumberSet( 8 )Now everything seems to work perfect !But I'm still curious about SRSet function if you can give me the answer ;DBye crew,Goule Quote Link to comment Share on other sites More sharing options...
TK. Posted March 24, 2006 Report Share Posted March 24, 2006 The SRSet function is just the fastest way to change 8 bits at once. This is useful when setting patterns (-> time multiplexed circuits, like LED digits or LED rings), and it's useful if the state of digital outputs is mirrored somewhere in the application (useful if you want to switch between two or more "layers")Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
goule Posted March 24, 2006 Author Report Share Posted March 24, 2006 Okay; as I'm using 10 led bargraph displays (multiplexed) I could for instance use DOUT_SRSet() + 2x DOUT_PinSet() to set the values ... would you do it that way ? Goule Quote Link to comment Share on other sites More sharing options...
TK. Posted March 24, 2006 Report Share Posted March 24, 2006 Yes - and if the remaining 6 pins of second DOUT are not used, you could take the MIOS_DOUT_SRSet function as well (but this is your decition - it doesn't save that much cycles)Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
bill Posted March 27, 2006 Report Share Posted March 27, 2006 Hello goule,please could u post a sample code using the DOUT_SRSet(?) function, so newbe user (like me ;)) could use it in a near future ?Sound very interesting for 7seg led displays !!!cheerz Quote Link to comment Share on other sites More sharing options...
goule Posted March 28, 2006 Author Report Share Posted March 28, 2006 Sorry m8 still havn't used it.I'll post code if I use it successfully.Goule Quote Link to comment Share on other sites More sharing options...
stryd_one Posted March 29, 2006 Report Share Posted March 29, 2006 Have a look at the code in existing projects, and the function reference, it should give you an idea of how to implement this in your own stuff. 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.