Login Join Maker Pro

# Logic Gate Sanity Check

#### Fish4Fun

##### So long, and Thanks for all the Fish!
Aug 27, 2013
471
I am trying to use a single uC i/o Pin To toggle a PWM output between two mosfets ... Easily done with 5 NAND gates, but I would like to achieve it with a single 74xxxx IC and the logic is killing me ;-)

Here is the Logic I need:
Code:
; A | B | Out1 | Out2 |
;---|---|------|------|
; 1 | 1 |   1  |   0  |
;---|---|------|------|
; 0 | 1 |   0  |   1  |
;---|---|------|------|
; x | 0 |   0  |   0  |
;---|---|------|------|

Goal would be a single 74xxxx IC (doesn't have to be a NAND gate) ... Don't want to use a PLA ... a second Logic IC or a uC with more i/o Pins ... It may not be possible ... I just thought I would see if anyone could at least tell me if it is NOT possible before I waste a whole day on it.

Fish

#### PETERDECO

Dec 19, 2019
239
I use a PIC16F73 to feed 2 PWM outputs to 2 MOSFETS.

#### Harald Kapp

##### Moderator
Moderator
Nov 17, 2011
12,615
If it has to be 74xx: You can use multiplexers as logic gates like so:

#### Fish4Fun

##### So long, and Thanks for all the Fish!
Aug 27, 2013
471
Thanks Harold!

That's EXACTLY what I needed ... I knew I was making it more difficult than I needed to .... I am an idiot. I am already using a pair of 4052's on the PCB ....

Thinking on it, I can connect the PWM output to the "inh" pin on the 4052's and this will eliminate needing to combine the PWM signal with the digit select.

Again, Thanks!

Fish

#### Harald Kapp

##### Moderator
Moderator
Nov 17, 2011
12,615
There's a catch with using only one output of the microcontroller: the dead band between Out1 and Out2 when they change states is very narrow (1 or 2 ns), This may lead to both transistors that are driven by these outputs to conduct for a short time (e.g. transistor driven by Out1 turns off but is not yet fully off while at the same time the transistor driven by Out2 already starts conducting). This can be avoided by using 2 outputs from the µC and setting the dead band as required.
See for example here.

#### Fish4Fun

##### So long, and Thanks for all the Fish!
Aug 27, 2013
471
Thanks Harald!

I was trying too hard to make a single ATTINY2313 read 4 x DS18S20 Digital Thermometers and Display the output on 4 x 4-Digit 7-Segment LED displays (Total of 16 7-Segment Digits) ... AND log the data to an external storage device ... While I am confident I could eventually get it to work, I finally decided it was more effort than it was worth ... I decided I would be better off to simply use 1 ATTINY2313 per DS18S20 & 4-Digit 7-Segment display ....

(Yes, I thought about using serial segment drivers, but they cost more than the ATTINY2313s, LoL.)

At the end of the day I have a bin full of ATTINY2313s that I only paid ~\$0.50 each for ... just doesn't make sense to try to minimize how many I use for this one-off project. This approach also greatly simplifies the code, prototyping and de-bugging.

Thanks!

Fish

Replies
6
Views
4K
Replies
14
Views
1K
Replies
3
Views
968
Replies
3
Views
1K
Replies
3
Views
953