Looking for a chip - Page 1
Forum section: electronics / beginners

author: Unknown
author_rank: Unknown
timestamp: February 09, 2012, 11:13:22 pm
content: Hi,I am looking for a IC that will do the following:Count upto 10 and count down from 10, while keeping succesive pins high/low.For example, I am picturing a chip that has an "increment" pin, when a voltage pulse is applied to the increment pin, the 1st output pin goes high, when a second pulse is applied, the 1st output pin stays high and the 2nd output pin also goes high. When the third pulse goes to the increment pin, both the 1st and 2nd out pins stay high and the 3rd outpin is high also...up to 10 output pins.In the same manner, this chip would have a "decrement" pin, when a pulse is applied, it would reduce the number of output high pins by one. So if the count was at 3, it would reduce the count 2.Any suggestions?

author: PeterG
author_rank: Frequent Contributor
timestamp: February 09, 2012, 11:19:29 pm
content: I am thinking PIC or AVR for this one. Quick and easy.Regards

author: baljemmett
author_rank: Unknown
timestamp: February 09, 2012, 11:28:20 pm
content: You could also do this with a bi-directional shift register (well, probably a few in a chain since a 10-bit one might not be available) -- wire one shift input high, the other low, and then shift left/right as appropriate. A small uC might take up less space though!

author: Bored@Work
author_rank: Super Contributor
timestamp: February 09, 2012, 11:48:51 pm
content: Three 74HC194 in a row and a NAND to stop shifting at 10.

author: damo
author_rank: Contributor
timestamp: February 10, 2012, 12:29:01 am
content: BCD counter is the way to go. Try a 4510.Edit: After re-reading the thread (I really should read threads carefully before answering), I still think the 4510 would be a potentially viable solution. You would need to decode the output using gates to provide the necessary output, however it could get messy.

author: TerminalJack505
author_rank: Super Contributor
timestamp: February 10, 2012, 12:49:11 am
content: The best that I can come up with (other than the obvious: MCU or CPLD) is to use either a 74HC4017 or 4017 Johnson counter and feed each of the outputs (which are active high) into a 2-input OR gate, with the second input of the OR gate coming from the _output_ of the OR gate from the stage above it.The OR gate's outputs will basically cascade from the top to the bottom so that any if any stage above is active (output is high) the output of that stage will be high as well. Use the OR gate's output to drive your LEDs.The very top won't need an OR gate. Its output will go directly to the LED and to the input of the OR gate below it.

author: TerminalJack505
author_rank: Super Contributor
timestamp: February 10, 2012, 01:13:49 am
content: Oops. I guess the 4017 doesn't count down so it wouldn't work. I guess you would need an up/down counter stage followed by a 4 to 10 decoder (74HC42) followed by the cascading OR gates.

author: PeterG
author_rank: Frequent Contributor
timestamp: February 10, 2012, 01:32:44 am
content: Quote from: OSHJunkies on February 09, 2012, 11:13:22 pmThe way i read this, the OP is requesting a single chip solution.Regards

author: TerminalJack505
author_rank: Super Contributor
timestamp: February 10, 2012, 01:46:53 am
content: Quote from: PeterG on February 10, 2012, 01:32:44 amXilinx CoolRunner-II. SOLVED.

author: lowimpedance
author_rank: Super Contributor
timestamp: February 10, 2012, 01:51:10 am
content: Or download an APP for his phoneor 74hc190 decade up/down counter.

author: damo
author_rank: Contributor
timestamp: February 10, 2012, 05:27:41 am
content: Quote from: PeterG on February 10, 2012, 01:32:44 amYes, fair enough. In that case, your solution would be the best, but it doesn't hurt to have some fun contemplating ideas

author: PeterG
author_rank: Frequent Contributor
timestamp: February 10, 2012, 05:37:18 am
content: Quote from: damo on February 10, 2012, 05:27:41 amNothing better than a creative challenge....Regards

author: TerminalJack505
author_rank: Super Contributor
timestamp: February 10, 2012, 06:32:15 am
content: Yep. I kind of lost the single chip requirement while trying to solve the problem. You would think that there was something out there that would do that but I can't think of any. It's kind of like a digital version of the LM3914. Sometimes you just have to roll your own.

author: vk6zgo
author_rank: Super Contributor
timestamp: February 10, 2012, 09:36:21 am
content: There may be a standalone chip that will do this,& you can certainly do it with a few 4017s,RS flipflops & maybe some NAND gates,but by the time you either did the research to find the former,or breadboarded up the latter,you could have chosen the PIC option,programmed the thing & had it in service.(& that's a big "PIC hater" like me saying so!)

author: PeterG
author_rank: Frequent Contributor
timestamp: February 10, 2012, 09:45:33 am
content: Quote from: vk6zgo on February 10, 2012, 09:36:21 amI know it must have killed you to type that....Both PIC and AVR have there place. I was pro-PIC but now i am getting to like Arduino and, by extension, AVR.All the OP needs is a 16F PIC in an 18 pin package or an AVR equivalent. I been searching and cant find an easier way to do it (will be interesting to see if anyone has another single-chip solution to this one).Regards

author: amyk
author_rank: Super Contributor
timestamp: February 10, 2012, 10:25:37 am
content: The disadvantage I see with an MCU is that it may not be as fast and/or have as stable latency as hardcoded logic. How high of a frequency do you need?

author: PeterG
author_rank: Frequent Contributor
timestamp: February 10, 2012, 10:39:16 am
content: Just thinking outside the box here, but, does the OP need this chip to be through hole?If so, then there are MANY options available. I am thinking a small 18pin through hole footprint PCB with surface mount logic chips. This way, a 'Custom Chip' or sorts could be made.Just a crazy idea.Regards

author: electrode
author_rank: Regular Contributor
timestamp: February 10, 2012, 11:33:22 am
content: If you succumb to using a microcontroller, I'd recommend something like the 20 pin ATtiny2313, which is the neatest solution in terms of hardware.If this is purely for academic reasons, it is, of course, more fun to make something with the standard logic building blocks.

author: Unknown
author_rank: Unknown
timestamp: February 11, 2012, 01:30:52 am
content: Wow thanks for all the great ideas - this forum doesn't mess around! I am a bit of noob yet, so it will take some time to digest all these great suggestions.

author: sacherjj
author_rank: Frequent Contributor
timestamp: February 11, 2012, 02:12:37 am
content: For some reason the first thing this made me think of is the LM3914 Dot/Bar driver chip. It acts exactly like you want with one little problem. You need to translate your clock up and down to analog voltage range. That is your perfect start of a Rube Goldberg Solution.

author: Unknown
author_rank: Unknown
timestamp: February 13, 2012, 07:38:03 pm
content: Right now I am leaning toward using a CD4510 BCD counter as damo suggested. I have a couple questions about the datasheet:http://www.doctronics.co.uk/pdf_files/HEF4510B.pdf1. How do I know what voltage is considered HIGH or LOW by the IC? i see 5/10/15 but this seems high to me...2. What does "edge-triggered" mean?2.5. In the Pinning table, some of the names have a bar over top the letters. What does this mean [e.g. CE, TC]? I am thinking it means that the feature is active with a LOW input?3. Not sure I comprehend the operation...my thinking is as follows.I will connect P0-P3 to +voltage.I will connect +voltage through a push button to CP.I will have UP/DW connected to +Voltage (for incrementing).As I press the button multiple times, I am thinking the outputs 00s-04will sequentially go from low to high.Is this right, or am I smoking crack?

author: Bored@Work
author_rank: Super Contributor
timestamp: February 13, 2012, 08:28:28 pm
content: Quote from: OSHJunkies on February 13, 2012, 07:38:03 pmNo, yes.

author: Joshua
author_rank: Regular Contributor
timestamp: February 13, 2012, 10:07:36 pm
content: The words with lines on top are, as you said: active LOWSorry I can't help with the rest.

author: electrode
author_rank: Regular Contributor
timestamp: February 13, 2012, 10:39:36 pm
content: Quote from: OSHJunkies on February 13, 2012, 07:38:03 pmHigh is something close to Vcc, and low is something close to GND, with respect to ground. So for TTL powered at 5V, a low is something like 0-0.8V and a high is 3-5V or so. You'd aim for LOW=0V and HIGH=5V, however.Edit: For CMOS, you generally get a wider range of voltages. I know you can run a CD4510 at 15V if you like. Not sure about the exact high/low thresholds off the top of my head, but LOW=0V and HIGH=<close to Vcc> will always work.Quote from: OSHJunkies on February 13, 2012, 07:38:03 pmEdge-triggered means that an input (usually a clock input) is triggered by the edge of a square-wave. Rising edge means that a LOW->HIGH transition triggers the input, and falling edge means a HIGH->LOW transition triggers it.Quote from: OSHJunkies on February 13, 2012, 07:38:03 pmYep.Quote from: OSHJunkies on February 13, 2012, 07:38:03 pmIt's a BCD counter, to the outputs will go:00000001001000110100etc...

author: Jimmy
author_rank: Regular Contributor
timestamp: February 14, 2012, 01:06:22 pm
content: http://talkingelectronics.com/projects/2DigitUpDwnCounter/2DigitUpDwnCounter-1.html

author: lowimpedance
author_rank: Super Contributor
timestamp: February 14, 2012, 10:35:46 pm
content: Quote from: OSHJunkies on February 13, 2012, 07:38:03 pmOK I would check out some info on cmos logic ic's (ie search 4000 series) for operating conditions etc if i were you.Also is your switch 'source' a clean debounced transition ??. (lookup switch debounce circuits).Heres a chance to do some breadboarding and have some fun actually learning about digital logic, and then maybe move onto a 'simple' micro solution if you must.

author: amyk
author_rank: Super Contributor
timestamp: February 17, 2012, 10:41:50 am
content: If you're going to connect the inputs to the chip you're looking for to pushbuttons, how about a pushwheel switch? It counts automatically for you and displays the current value too.http://www.ia.omron.com/product/42.html

author: damo
author_rank: Contributor
timestamp: February 17, 2012, 11:13:41 am
content: Quote from: electrode on February 13, 2012, 10:39:36 pmHence the need for a decoder circuit. A BCD to bar graph would require a considerable number of gates. I wonder what the minimum number of gates would be*fires up Multisim*