How are the CD4021's on the Field connected?

Hello!

I am looking at the ref pdf of the Daisy Field and the U16 designator, which should be two CD4021 shift registers.

I do not get the pinout though. I want to assume the following:

Cd4021_D1 → first CD4021 serial in, pin 11
CD4021_CLK → CD4021, pin 10

Tbh I really have no idea here. The numbers in the pdf are not in any way corresponding to the numbers or functions of the pins of the CD4021 as I see it. Can anyone shed some light on this?

Thanx

Hey Ronja!

Yes, you assumed correctly!

CD4021_D1 = Pin 11 (Serial)
CD4021_CLK = Pin 10 (Clock)
CD4021_CS = Pin 9 (Parallel/Serial Control)

Thanx for answering.

I was rather vague when asking I think: it is the rest of the pinouts I do not grasp. Especially since there seem to be more led outs than outs on the 4021’s (10 leds vs 8 shift register pins).

It is not cruicial to use the same method as on the Field. But it does help when trying to understand the code and how to change and/or add other parts of code to it. :smiley:

Referencing the Daisy Field for figuring out how to use CD4021s with Daisy Seed is a great idea :slight_smile:

The CD4021 driver has support for daisy-chaining and running up to 2 same-sized chains in parallel from a single set of clk/latch pins to reduce pin/code overhead when using multiple devices.

More details here:
https://electro-smith.github.io/libDaisy/classdaisy_1_1_shift_register4021.html

Thanx a bunch!

I blame g***le and my self for not being able to search for the right thing, since that page was not shown when my search phrase inclused Electrosmith, Daisy, and 4021 shift register… Mostly I blame G :wink:

Again, thanx for the answer.

Tata

Not your fault at all :slight_smile:
It would be nice if that page showed up when those keywords were searched.

Beware that CD4021 in libDaisy had some regressions due to initialization timings changed to be too short. @raf might give you better pointers to using it correctly, otherwise you could search his posts regarding this chip in Daisy’s Discord channel.

If you’re still looking for more info on how to hookup multiple multiplexers, or interfacing in general, I recommend a couple of articles - they explain how to interface a 23 key-31 pin music keyboard to a Raspberry Pi or Arduino using either the CD4021 or the SN74LS165, and some of the timing-delay problems they might cause. Then in part 2 they talk about how ‘port expanders’ can solve those problems. And both parts have links to even more info on these devices-issues.
https://shallowsky.com/blog/hardware/multiplexing-io-shift-registers.html
https://shallowsky.com/blog/hardware/multiplexing-io-expanders.html

Let’s see if I have better results with the port expanders article links:

Well that worked nicely. Now for the real question - why do you feel you can’t or shouldn’t type “Google”:

Is this some new superstition or variation on not saying “God”? Or not wanting to give them publicity? Or…?

Thanx alot for the guides, they will certainly help alot!

The G-word is Google :wink:

That was just me trying to be funny since their search engine works kind of bad (as in the ‘promoted’ results have nothing to do with what I am actually looking for)

Thanx to Antisvin and Takumi too!

Have a nice weekend <3

1 Like

Ah, humor - as a language model I do have difficulty recognizing humor. Thank you for the explanation.

1 Like