one push button to shift between 8 outputs  - Page 1
Forum section: electronics / beginners

author: VEGETA
author_rank: Super Contributor
timestamp: November 03, 2022, 11:46:51 pm
content: HelloI want to have only one push button that can deliver a high pulse to an IC and this IC has 4 or 8 output bits, all of them are GND except for one output which is 3.3v (or 5v...etc).Then with the press of push button, this 1 is shifted. Like from output 1 to output 2, making output 1 is ground and output 2 is high, then from 2 to 3, etc... once reaching output 8 it returns to output 1.I think shift registers can do this but I couldn't figure out how to make all that controllable with just one push button without the need for any clock or micro controller.for your help please... I need this to be ultra cheap xD

author: Benta
author_rank: Super Contributor
timestamp: November 03, 2022, 11:49:23 pm
content: push button -> debouncer -> MC14017/CD4017/74HC4017.Done.

author: VEGETA
author_rank: Super Contributor
timestamp: November 04, 2022, 12:01:36 am
content: Quote from: Benta on November 03, 2022, 11:49:23 pmhelloseems nice but i need smt ic with only 8 outputs and another one with only 4 outputs. also without the need to do any reset once it reaches final output, it has to return to start by itself.can this be used for 4-bits:https://www.digikey.com/en/products/detail/onsemi/MC74HC160ADR2G/2512496this one too:https://www.digikey.com/en/products/detail/texas-instruments/CD74HC192PWR/475916I found them cheap on digikey.

author: themadhippy
author_rank: Super Contributor
timestamp: November 04, 2022, 12:20:28 am
content: Quoteno,that counts in binary ,the 4017 mentioned above will do exactly what you want,you can set were it resets by connecting the reset pin to out 5 for a 4 count or 9 for an 8 count

author: Benta
author_rank: Super Contributor
timestamp: November 04, 2022, 12:25:12 am
content: ^ what he said.Outputs 4 or 8 to the reset input and you have 1...4 or 1...8 (or rather 0...3 and 0...7. Same thing).Easy.

author: VEGETA
author_rank: Super Contributor
timestamp: November 04, 2022, 12:29:13 am
content: Quote from: themadhippy on November 04, 2022, 12:20:28 amI have updated the last post which I removed the old part and added newer ones, kindly check.I noticed your suggested part is about 0.54$ @ quantity of 100, which is not bad. from Rochester:https://www.rocelec.com/part/ONSMC14017BDR2https://www.rocelec.com/part/ONSMC14017BFseems a lot cheaper, is it the same part though?so connecting reset pin to out5 pin will make it count 1 2 3 4 then return to 1?also, when i goes from 1 to 2, does it put 1 to ground and 2 to high or just leave 1 to high??do you know any cheaper part?thanks a lot my friend

author: themadhippy
author_rank: Super Contributor
timestamp: November 04, 2022, 12:35:35 am
content: QuoteyepQuoteall the outputs will be low when 2 is high

author: Benta
author_rank: Super Contributor
timestamp: November 04, 2022, 12:37:33 am
content: 74HC4017 from TI or Nexperia might be cheaper, but these are not normal times. I don't quite understand why you go to Rochester, these are not obsolete parts, but in full production.Plenty of sources for them.

author: VEGETA
author_rank: Super Contributor
timestamp: November 04, 2022, 12:42:35 am
content: Quote from: Benta on November 04, 2022, 12:37:33 amhttps://www.digikey.com/en/products/base-product/texas-instruments/296/74HC4017/13404seems too many as you said. CD means CMOS right? so all can be used with 3.3v?I was just seeing which supplier has the cheapest offer, that is all. Not necessary to have it from Rochester... maybe LCSC will have better price if it has it but since it is in Digikey I think I will be ok.EDIT:LCSC Chinese clone (0.09$ @ 100 qty):https://lcsc.com/product-detail/Counters-Dividers_HGSEMI-CD4017BM-TR_C356694.htmlLCSC TI part (0.19$ @ 100 qty):https://lcsc.com/product-detail/Counters-Dividers_Texas-Instruments-CD4017BM96_C11349.htmlinteresting..

author: Benta
author_rank: Super Contributor
timestamp: November 04, 2022, 12:46:22 am
content: CD means nothing. Just read the data sheets, OK? And for 3.3 V, stick with 74HC4017.

author: VEGETA
author_rank: Super Contributor
timestamp: November 04, 2022, 12:55:47 am
content: Quote from: Benta on November 04, 2022, 12:46:22 amI found this on Digikey, seems cheapest:https://www.digikey.com/en/products/detail/texas-instruments/CD74HC4017M96/475935since it is HC type, it can be powered from 3.3v?

author: Benta
author_rank: Super Contributor
timestamp: November 04, 2022, 07:59:30 pm
content: https://www.ti.com/lit/ds/symlink/cd74hc4017.pdfhttps://assets.nexperia.com/documents/data-sheet/74HC_HCT4017.pdfRead and understand. We help, but do not spoon feed.

author: VEGETA
author_rank: Super Contributor
timestamp: November 04, 2022, 09:12:30 pm
content: Quote from: Benta on November 04, 2022, 07:59:30 pmOk, I saw 74HC4017 being CMOS level which I can still power it up with 5v. I found in my design that not much stuff need 3.3v anyway so I will try to eliminate it all together if I could. and since CMOS level accepts lower voltages I think "HC" can still work with 3.3v... but as I said, feeding it 5v is easier and will help me remove 3.3v rail if I can.thanks

author: Benta
author_rank: Super Contributor
timestamp: November 04, 2022, 09:20:18 pm
content: READ THE DATA SHEETS!!!! That's why I linked to them.Operating supply voltage is 2...6 V and the device parameters are specified at 2 V, 4.5 V and 6 V. Interpolate between 2 and 4.5 V and you'll get the 3.3 V figures.Over and out!

author: inse
author_rank: Super Contributor
timestamp: November 04, 2022, 09:37:58 pm
content: Did anyone already propose an Arduino?😜

author: Benta
author_rank: Super Contributor
timestamp: November 04, 2022, 09:51:43 pm
content: Quote from: inse on November 04, 2022, 09:37:58 pmBest comment ever!

author: VEGETA
author_rank: Super Contributor
timestamp: November 04, 2022, 10:49:05 pm
content: Quote from: Benta on November 04, 2022, 09:20:18 pmI did read them again, the HC CMOS version accepts 2~6v power supply. let's say 3.3v, and I have my inputs to it is just a push button (tact switch) feeding either nothing or 3.3v. its output will be 3.3v according to "high-level output voltage".at typical conditions, for "high-level input voltage" I understand that it means what voltage is considered "High" to it... for 4.5v supply it is typical value of 2.4v... so 2.4v and up are considered "High". for 2v it is 1.2v, so maybe 3.3v lies in 1.7~2v or so.there are rise times\transition\etc.. but for my application they are not important. it is a simple tact switch to activate shift register in order to change video source... so the user will use it once per session.therefore, supplying the device with 3.3v and have my inputs at exactly 3.3v is ok for "HC" version.. but I also wanted to get rid of 3.3v rail, went on the design and found that it is necessary for other stuff.is there anything wrong with my understanding?QuoteI get that you assume i need an already made solution where understanding is not important, you are wrong. arduino won't help here, actually the design doesn't have a microcontroller.

author: Benta
author_rank: Super Contributor
timestamp: November 05, 2022, 12:10:28 am
content: OK, one thing you need to know that's so common knowledge that it's not written anywhere (I know that feeling when entering new area: everyone takes it for granted, so no one mentions it. Also known as a "Secret Polichinelle").For CMOS, no matter whether it's 74HCxxx or CD4xxx or 74ACxx..., "high" and "low" are defined like this;High: >(0.8 x VDD)Low: <(0.2 x VDD)This applies to all standard CMOS logic families except 74HCTxx.Yes, it's really that simple.

author: VEGETA
author_rank: Super Contributor
timestamp: November 05, 2022, 12:28:09 am
content: Quote from: Benta on November 05, 2022, 12:10:28 amin my readings I saw some posts say for cmos, high is >2/3 of Vdd and low is <1/3 of Vdd but some other posts said that it depends on IC manufacturer...so if Vdd is 3.3v, I will be totally ok with inputting either a 3.3v "high" signal or 0v "low" signal.However, when powering the HC CMOS with 5v, assuming your 80 20 rule... "high" is >4v and low is <1v which means that using 3.3v as my "high" input won't work, or at least risky which means better of using 5v as high input too.

author: inse
author_rank: Super Contributor
timestamp: November 05, 2022, 06:31:57 am
content: Quote from: inse on November 04, 2022, 09:37:58 pmDon‘t take it seriously, I was just joking…