Jump to content

Recommended Posts

Posted

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

Posted

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_pintable

Best Regards, Thorsten.

Posted

Hi Thorsten, always great to have an answer directly from the technical father  ;D

I 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

Posted

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

Bye crew,

Goule

Posted

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.

Posted

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

Posted

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.

Posted

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

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...