4 bit counter

Discussion in 'Homework Help' started by alibedelci, Oct 29, 2013.

  1. alibedelci

    Thread Starter New Member

    Apr 15, 2013
    10
    0
    Hi,

    I am assigned a project for which I am required to do a 4 bit binary counter.

    It is to be done with 74HC163. We are given a very simple block which has only input CLOCK, and 4 (as expected) outputs Y0, Y1, Y2, Y3.

    We are also given another schematic which explains how leds work. 5V's at top, a resistor, led, and output. When output is low, current flows and led is on.

    We are given the 74HC..'s data sheet and also clock cycles. From what I can gather it is pretty simple, as clock increments itself, outputs are increased as 0000,0001,0010 and so on. But it says I should provide the list of logic gates I want to use for this counter. As far as I can see, only gates required are 4 inverters since for example Y0 is on, I must make it 0V (instead of 5Vs) to turn that led on. But I am in the dark regarding the use of other gates such as AND, OR, XOR's etc.

    Am I missing something? Or is it this simple?

    Also, how to set the clock (in the first place working) and also how to make it's frequency low enough so that the effects are observable?

    Thank you,
     
  2. WBahn

    Moderator

    Mar 31, 2012
    17,720
    4,788
    (1) This should be in Homework Help (I'll ask a mod to move it for you).

    (2) We need to see some indication of effort on YOUR part to solve YOUR assigned problem. That gives us a starting point for discussions.

    (3) How can we possibly know how to adjust the frequency on YOUR system when we have absolutely no idea what your system is? We are not mind readers.
     
  3. alibedelci

    Thread Starter New Member

    Apr 15, 2013
    10
    0
    It's not a homework though. If lab's are counted as homework, then it is a different story, I'm not sure...

    My effort is to read all the given data and search for the internet for similar cases. This is why I can never learn electronics. This is very complex and uncharted waters for people who are beginners like me. How can I propose solutions for a problem which I'm only introduced about a week ago (tops, also mind you, as just a concept).

    I am very well aware that this is MY problem. There is no need to capitalize MY problems. I think I explained the situation pretty succintly. There is no system. This is only 4 bit counter which from I can gather, is pretty basic. I really don't get what I can do to clarify it further? I have a breadboard, a 74HC163 (Presettable synchronous 4-bit binary counter; synchronous reset) and that's it.
     
  4. Danm1

    Member

    Jul 19, 2010
    55
    7
    it sounds like all you need to do is connect the outputs of the 4 bit counter to the LEDS. This sounds like an easy assignment.
     
  5. WBahn

    Moderator

    Mar 31, 2012
    17,720
    4,788
    Homework is anything that you are assigned for the primary purpose of education, especially if it will be graded, but that's not critical.

    You haven't indicated what the goal of the project is. You have a counter. You have some LEDs. Great. What should happen with the LEDs in order to satisfy the unstated goals of this project?

    Have you read the data sheet for the counter you are using?

    And, again, how can we possibly tell you how to set the clock and make it's frequency low enough when you have given no clue as to where your clock is coming from in the first place?

    What source(s) are available to you for a clock? Are you doing this in a physical lab where you have access to some kind of equipment such as a function generator? Or are you effectively sitting out under a shade tree powering this think from a 9V battery and don't even have a multimeter? Or something in between. Your options on what to do depend on the situation you are in and, I say again, we are not mind readers.
     
  6. alibedelci

    Thread Starter New Member

    Apr 15, 2013
    10
    0
    This will be performed in a lab with power supplies, oscilloscopes and signal generators. I am clueless enough that I don't know what the clock input is supposed to be. I at first thought the clock is inside the "thing" (74hc) and all needs to be done is to supply some power, but now I think it will be done via signal generators.

    Goal is to design and implement a sequential circuit on the breadboard by
    using a 4-bit counter and logic gates, and demonstrate output(s) by driving LED circuits.

    This is all we are given.

    Of course I have read the data sheet. Most of it is the table of features, reference data. It does not really explain how to achieve my goal (as it shouldn't, since it is a datasheet not a lab manual)
     
  7. WBahn

    Moderator

    Mar 31, 2012
    17,720
    4,788
    You signal generator is probably capable of producing a square wave output and you can probably adjust the amplitude, the DC offset, and the frequency in a fairly straightforward way. Since you are using 74HC logic, your power supply can be anything from 2V to 6V (IIRC). So you need to decide what supply voltage you will use (it may be stated or you may only have a fixed supply to work with). Let's assume that you will use a 5V supply. So now you need to figure out how to adjust your signal generator to give a square wave (probably just pushing a button or turning a knob to the picture of a square wave -- should be something obvious). Then you want to adjust the frequency to something suitable. Probably 1Hz to 5Hz will work; keep in mind that you can adjust the frequency as needed while you are working. Finally, you need to adjust the amplitude and offset so that your square wave goes between 0V and 5V (or reasonably close, say within 0.25V either way). Use the oscilloscope for that. You may have to flip a switch (or pull a knob out or push a button in) in order to enable adding a DC offset, but you will almost certain want to do this because most signal generators, by default, produce an output that is symmetric about 0V. So you want a 2.5V amplitude signal (which would go between -2.5V and +2.5V) combined with a DC offset of 2.5V that is added to it. Again, spend some time playing with the signal generator to get used to it since how you do each of these things is entirely dependent on the specific signal generator you are working with. If you don't know how to use the oscilloscope, then you need to have someone show you how or you need the Operator's Manual for it because that will again be very specific to the exact scope you are using and there are way to many variables to try to tell you how to do it here.

    I'm not sure how taking a pre-made counter and applying a clock to it qualifies as "design and implement a sequential circuit", but if that's all you're asked to do, then that's all you're asked to do. I'll assume that this is essentially a "Hello World" type project to get your feet wet. Are you sure you aren't expected to design a circuit that does something more than just display the value of the count? The description you give of needing to provide a list of chips you need for your design implies pretty strongly that you are to design a sequential circuit that has, at its core, a 74HC163 counter.

    If you do as Danm1 suggests, then your LEDs will be OFF when the output is a 1. This may seem backwards, but all you have to do is declare that a lit LED indicates a 0 and a dark LED indicates a 0. This would clearly be enough to demonstrate the outputs by driving LED circuits -- unless something in the assignment indicates that this is not acceptable, in which case you can use the inverter you talked about.
     
  8. MrChips

    Moderator

    Oct 2, 2009
    12,432
    3,360
    You still have not defined your goal.

    Your assignment is to design and implement a sequential circuit on the breadboard.

    You still have to state the function of the circuit? What does the circuit do?
     
  9. alibedelci

    Thread Starter New Member

    Apr 15, 2013
    10
    0
    @WBahn

    Thank you. It definitely says to list the gates I will be using. But that is confusing since everything seems to be done by 74HC163. What can be the use of the gates?

    The list I can choose from is this:

    74 LS/HC 00 Quad 2-input NAND gate
    74 LS/HC 02 Quad 2-input NOR gate
    74 LS/HC 04 Hex inverter
    74 LS/HC 08 Quad 2-input AND gate
    74 LS/HC 10 Triple 3-input NAND gate
    74 LS/HC 11 Triple 3-input AND gate
    74 LS/HC 12 Triple 3-input NAND gate OCT
    74 LS/HC 20 Dual 4-input NAND gate
    74 LS/HC 27 Triple 3-input NOR gate
    74 LS/HC 32 Quad 2-input OR gate
    74 LS/HC 40 DUAL 4-INPUT POSITIVE-NAND BUFFERS
    74 LS/HC 47 BCD to 7-Segment Decoder /Driver with Open-Collector Outputs
    74 LS/HC 48 BCD TO 7-SEGMENT DECODER
    74 LS/HC 74 ON Semiconductor - Dual D Flip−Flop
    74 LS/HC 138 3-to-8 line decoder/demultiplexer
    74 LS/HC 163 NXP Semiconductors - Presettable synchronous 4-bit binary counter
    74 LS/HC 244 Octal buffer/line driver; 3-state
     
  10. alibedelci

    Thread Starter New Member

    Apr 15, 2013
    10
    0
  11. MrChips

    Moderator

    Oct 2, 2009
    12,432
    3,360
    Here is an example of a goal:

    Using a 74LS163, design a binary-rate-multiplier where the frequency of the output signal is n times a fixed frequency and n = 1 to 16.
     
  12. WBahn

    Moderator

    Mar 31, 2012
    17,720
    4,788
    It really seems to me that you are being asked to define your own objective for a sequential logic circuit and then, using only parts from that list, proceed to design and implement it. You appear to merely have the additional constraint that the design must include the '163 counter in it somehow.

    That is a question that is entirely beyond our ability to answer (not mind readers, remember?)

    Perhaps it is time to ask for clarification on what the expectations for this assignment are? If you don't and all you do is drive four LEDs with the output of a counter, you may end up very disappointed in the grade you receive.

    It's interesting that you can use 7-segment decoders but not 7-segment displays. Or is this just the list of logic gates you can use and you have a broader list of other parts available. That must be the case, since LEDs and resistors are obviously fair game.
     
  13. Danm1

    Member

    Jul 19, 2010
    55
    7
    I think maybe is you should just connect your LEDs to the high output of each flip flop, then connect your clock source to the chip, you will see it counting and have fulfilled your assignment. All those other parts are not needed.
     
  14. MrChips

    Moderator

    Oct 2, 2009
    12,432
    3,360
    I would not consider that to be a lab project assignment in a digital logic course.
     
  15. MrChips

    Moderator

    Oct 2, 2009
    12,432
    3,360
    How about:

    Design a traffic light sequencer where the green light comes on for 21 seconds, the yellow light for 3 seconds and the red light for 24 seconds.
     
  16. WBahn

    Moderator

    Mar 31, 2012
    17,720
    4,788
    And if he does that, he is likely to get a zero.

    He needs to ask his instructor for clarification and to make sure that he understands what the expectations for this project are.
     
  17. alibedelci

    Thread Starter New Member

    Apr 15, 2013
    10
    0
    OK, so what can be done to get frequency which is less than 1Hz? (lowest the generator provides)

    For example, @MrChips, as in your traffic light example, what kind of circuitry can manage (general ideas at least- assuming 1 have a 1Hz square wave at my disposal and some gates) 21 seconds as 1 cycle?
     
  18. WBahn

    Moderator

    Mar 31, 2012
    17,720
    4,788
    You have 4-bit counter ICs available to you, right?

    With a 1 Hz clock, you can trivially produce 2Hz, 4Hz, 8Hz, and 16Hz without any other parts. With a few additional parts, you can produce any frequency from 1Hz to 16Hz in 1Hz increments.

    You can also cascade counters.
     
Loading...