Modulating PWM into a Shift Register

Thread Starter

ElectricSpidey

Joined Dec 2, 2017
2,774
Do you think it would be possible to produce a PWM output with the CD74HC195E shift register, if you took the PWM signal split it into two and inverted one of them, then placed one output to the Clock and the other to the Master Reset?

The register would be in Parallel mode.

The PWM would be anything from 3khz to 5khz.

I'm concerned about a timing problem with changing the reset line and the clock at the same time.

The PWM signal will be generated by a PSoC micro so I can place many buffers in series on the clock line to delay it...will that work?

Also if anybody knows of a more appropriate chip please let me know, all I really need is a set of gated buffers with the inputs on one side of the chip, and the outputs on the other side and have complementary outputs.

And, yes I know about the CD4081, but that chip does not meet one very important requirement. (see above about the input and output configuration) Which is also a shame because I have 25 in stock.

So this is basically what I need...
AAC_Gated_Buffer.jpg
 

Papabravo

Joined Feb 24, 2006
21,225
Very bad idea.
You don't want the Q outputs of a shift register to go anywhere near the asynchronous RESET pin.
You also don't want the outputs to control the clock. The clock must come from an independent source.
You can however loop the output back to the input and create a number of PWM like waveforms. Always high, always low, 50-50, 75 high-25 low, 75 low 25-high . that's it.
Your drawing is devoid of useful information and what you are trying to convey is unclear. You are showing 4 and gates with an enable. Whopee!
A more complete schematic would have been helpful, including what you think the waveforms would look like.
 

Thread Starter

ElectricSpidey

Joined Dec 2, 2017
2,774
Papa I never said anything about the register outputs going into the reset pin, the PWM signal will be going into the reset and clock pins, they come from a micro...not the register outputs.

Sorry if I was unclear, but I did state in the OP where the PWM was coming from.

@Ian0 What I'm doing is PWM on the low side of 42 RGB LEDs.

So, this is what I'm doing, except I want to replace the AND gates with the shift register.

AAC_Gated_Buffer_2.jpg
 

Ian0

Joined Aug 7, 2020
9,803
So, you want to dim the LEDs using the PWM signal?
Does the low-side driver have a output-enable input you could connect the PWM to?
 

Papabravo

Joined Feb 24, 2006
21,225
OK the revised diagram helps to clear up my confusion. I think if you reread the compound sentence slowly you may understand my confusion. You said: if you took the PWM signal split it into two and inverted one of them, then placed one output to the Clock and the other to the Master Reset? Without the right picture how an I to make sense of of that statement?

You also don't need a shift register. It looks like any 4-bit register you can parallel load will do the job.
 

Thread Starter

ElectricSpidey

Joined Dec 2, 2017
2,774
Then what would be the point of using this chip over the one I posted?

Remember my idea is to use the MR to provide the PWM modulation.
 

Papabravo

Joined Feb 24, 2006
21,225
Then what would be the point of using this chip over the one I posted?

Remember my idea is to use the MR to provide the PWM modulation.
I don't know, I've never used pulldowns on a tri-state output. I don't think the function you want exists within a single chip.
Why not put the register and the AND function inside PSoC and just have output to the low side drivers?
 

Ian0

Joined Aug 7, 2020
9,803
So now I'm completely baffled what you are trying to do. You want to produce a PWM signal from the 74HC195, and you're going to supply it with a PWM signal from the PSoC? Where do the LEDs connect?
 

Thread Starter

ElectricSpidey

Joined Dec 2, 2017
2,774
No, I do not want to produce a PWM signal "from" the 74HC195, I want to modulate the output from a with PWM. (semantics?)

So the register passes the data like normal, but also has the PWM signal present.

I want to inject the PWM signal into the data stream using the master reset.

And PapaBravo I would dearly love to set it up as you say, but I need software control over the signal pins and what you suggest would require hardware control along with software which is possible in a PSoC but...there is not enough control registers available for 42 pins.
 

Papabravo

Joined Feb 24, 2006
21,225
No, I do not want to produce a PWM signal "from" the 74HC195, I want to modulate the output from a with PWM. (semantics?)

So the register passes the data like normal, but also has the PWM signal present.

I want to inject the PWM signal into the data stream using the master reset.

And PapaBravo I would dearly love to set it up as you say, but I need software control over the signal pins and what you suggest would require hardware control along with software which is possible in a PSoC but...there is not enough control registers available for 42 pins.
Then the most straightforward way to do it involves two chips:
  1. A 4-bit parallel load register -- your choice.
  2. A quad 4-Input and gate (74HC08)
What you are doing is not modulation -- you are just enabling and disabling the inputs to the register. I would call it multiplexing. You either get meaningful data or you get zero.
 

Thread Starter

ElectricSpidey

Joined Dec 2, 2017
2,774
Yes, the option for the quad AND gate is there but as I explained in the OP I need all of the inputs on the same side of the chip, and this is the only reason I considered the shift register.

There is no good reason to replace a CD4081 with a shift register...unless there really is a good reason.
 

Ian0

Joined Aug 7, 2020
9,803
So, where does the HC195 get its data from? Are you using it parallel in parallel out, or serial in parallel out?
 

Papabravo

Joined Feb 24, 2006
21,225
So, where does the HC195 get its data from? Are you using it parallel in parallel out, or serial in parallel out?
It's parallel In and Parallel Out as I understand it. He doesn't need the shift function at all. I looked for a 4-bit non-shift register but was unable to identify anything except the 74xx75 quad latch which I'm not sure is available in a CMOS variant.
 

djsfantasi

Joined Apr 11, 2010
9,160
Papa I never said anything about the register outputs going into the reset pin, the PWM signal will be going into the reset and clock pins, they come from a micro...not the register outputs.

Sorry if I was unclear, but I did state in the OP where the PWM was coming from.

@Ian0 What I'm doing is PWM on the low side of 42 RGB LEDs.

So, this is what I'm doing, except I want to replace the AND gates with the shift register.

View attachment 234234
So, isn’t modulating VLED with PWM and not the four data lines an option? A P channel MOSFET and perhaps an N channel MOSFET or NPN BJT driven by the PWM signal should create the effect you want.
 

Thread Starter

ElectricSpidey

Joined Dec 2, 2017
2,774
No, high side PWM is not an option with these common anode LEDs because I need to vary the brightness individually.

I wish it was, that is how I normally do it with 6 pin LEDs, when I need to vary the PWM individually.

And yea, the diagram is misleading because it looks like a single LED but actually represents just the "RED" cathodes.
 
Top