Author Topic: CD4040BE chip HELP  (Read 1909 times)

0 Members and 1 Guest are viewing this topic.

Offline UltraRCTopic starter

  • Contributor
  • Posts: 18
  • Country: nz
CD4040BE chip HELP
« on: March 25, 2016, 05:14:15 am »
Hello, this is the first time I have posted on this forum, am I in the right place for asking questions?

My question is about the use of a cd4040e chip, a while ago I saw one of Dave's videos about his DIY clock which used one of these chips, am I correct in thinking that this chip will count up on the Q pins in binary when a signal is put in the clock pin. My questions are:
 - Do you have to use constant frequency on the clock pin? Or can you simply attach a push button to it and it will count up one every time you push it, same goes for the reset pin can you just put a switch on it? And also do you put a negative voltage onto the pins to activate it, or a positive? Do you have to pull the input up or down with a resistor?
 - For the Q inputs Do you have to pull the input up or down with a resistor?
 - It says on the data sheet that you power the chip with vcc and vdd? What does that mean? Why doesn't it just say positive and negative?
 
Hopefully I haven't posted in the wrong spot.

Any help would be very helpful, thank you in advance :)
 

Offline Paul Moir

  • Frequent Contributor
  • **
  • Posts: 926
  • Country: ca
Re: CD4040BE chip HELP
« Reply #1 on: March 25, 2016, 05:53:49 am »
Good questions!

1 - No, the signal can come at any rate.  This is normally how digital gates and flip flops work.  It can be high for a month, low for a microsecond and it'll count it.
1a - yes, you can just attach a switch.  However, the 4040 can count very quickly, and will count the various momentary contacts that occur when the switch contacts close.   Google "switch debounce" 
1b - Same deal with the reset, but perhaps you don't care about debouncing there since it'll just reset a bunch.
1c - NXP's datasheet (http://www.nxp.com/documents/data_sheet/HEF4040B.pdf) has a nice timing diagram that shows you it counts when RESET is low.  By low I mean ground or near to it, and the same voltage as on pin 8 (Vss)
1d - Depends on your debouncing circuit a bit.  But as a maxim, a digital input shall never be left floating.  For example, you can pull it up with a resistor, then pull it down with your switch to ground.  If you just connected it to a switch, the other side of which was connected to ground, then when the switch was open the input would be left floating.  The only time you can make an exception to the floating input rule is that you know for a fact it's fine and why.
2 - Q outputs you mean?  No pulling up or down is for inputs only.
3 - + to 16 and - (ground) to pin 8.  Vcc/Vee and Vss/Vdd are fairly opaque as they assume you know how things are connected up inside the chip.  Vcc = something to do with collectors in bipolar (eg, TTL) chips, Vee emitter.  Vss source in (C)MOS chips and Vdd refers to the drain.  All I ever needed to know was Vcc and Vdd were the positive terminals while Vee and Vss get connected to negative or ground.

Getting a little beyond your questions:  1a - there are some digital components that can only work so slowly.  For example DRAM will "forget" what you put in it's memory after a few milliseconds unless you constantly refresh it.  Many early microprocessors also worked this way, and it was a big deal for battery operated applications when processors that you could clock down to zero came out.  To know check the datasheet and look for a minimum clock speed.
1c - for common chips like the 4040 counter, check a few datasheets out from various manufacturers.  Some are more clear than others.  Some leave important information off them, which is I think because "everyone knows these parts."
1d - eg, some parts have internal pullups. 

« Last Edit: March 25, 2016, 06:08:52 am by Paul Moir »
 

Offline UltraRCTopic starter

  • Contributor
  • Posts: 18
  • Country: nz
Re: CD4040BE chip HELP
« Reply #2 on: March 25, 2016, 07:33:40 am »
Thank you soo much! Those are exactly the answers I needed
 

Offline rdl

  • Super Contributor
  • ***
  • Posts: 3667
  • Country: us
Re: CD4040BE chip HELP
« Reply #3 on: March 25, 2016, 10:43:15 am »
The CD4040 doesn't count up. They count an incoming frequency over a period of time and output the original frequency divided down with flip flops. To count up you probably want something more like a decade counter or Johnson counter (4017, 4026, 4518, 7490, etc.)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf