Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.electronics.design > #457988

Re: Binary counter - please check my work

From Don Y <blockedofcourse@foo.invalid>
Newsgroups sci.electronics.design
Subject Re: Binary counter - please check my work
Date 2017-04-29 08:45 -0700
Organization A noiseless patient Spider
Message-ID <oe2c8b$39u$1@dont-email.me> (permalink)
References <l1QMA.1138$aC3.305@fx02.iad> <oe0iha$10b$1@dont-email.me> <l1TMA.48233$uf1.15437@fx40.iad> <oe0vro$ogs$1@dont-email.me> <YRUMA.1140$aC3.868@fx02.iad>

Show all headers | View raw


On 4/28/2017 9:43 PM, bitrex wrote:
> On 04/28/2017 11:07 PM, Don Y wrote:
>> On 4/28/2017 7:39 PM, bitrex wrote:
>>> On 04/28/2017 07:20 PM, Don Y wrote:
>>>> On 4/28/2017 4:14 PM, bitrex wrote:
>>>>> I'd like to have a 74HC163 4-bit counter count the following sequence:
>>>>>
>>>>> 1000
>>>>> 1001
>>>>> 1010
>>>>> 1011
>>>>> 0100
>>>>> 0101
>>>>> 0110
>>>>> 0111
>>>>>
>>>>> So A, B preset inputs grounded, C, D preset fed back from the outputs
>>>>> C, D
>>>>> swapped, synchronous preset enable pin (active low) NANDed from A
>>>>> and B?
>>>>
>>>> Why not just use the three LSb's of the counter "as is"and inverting the
>>>> most
>>>> significant of those (with your NAND gate) to form the MSb (of four)?
>>>
>>> Ah, indeed, indeed.
>>>
>>> DUH.
>>>
>>> This is why I ask...;-)
>>
>> There are no "steady state" consequences of this.  However, the
>> temporal behavior of the "4th bit" will vary near the clock edge
>> as it will be more closely synchronized with the other three bits
>> in the case where the state is set-up *before* the clock edge
>> vs. derived from the TRANSITIONED third bit AFTER the clock edge.
>
> "El Cheapo" 2 switch sample and hold is my ideal, but I don't know that it's
> possible:
>
> <https://www.dropbox.com/s/t1lkycctbqojpt5/20170429_003617.jpg?dl=0>

I don't see a second switch...

Presumably, you're using some combinatorial logic to "decode" the
"current state" (or "current selection?") from the counter to
control/sequence the switches.  See my notes in other post re: the
hazzard this presents (esp as you don't want to be "jittering"
the switch(es) needlessly).

You'd need to "sample" the outputs of the "decoder" at some
point after the clock edge that advances the "count".  As I
indicated, putting the extra layer of NAND on the output will
increase the time that it takes for the "count output" to
settle.  And, this can increase the time for the "decoded"
output to settle.

As such, it pushes the point at which you can reliably sample the
decoded output further from the counter's clock edge.  This
can be good -- or bad -- depending on the other edges that you
have available (e.g., if you have a known duty cycle for the
clock driving the counter, you can use the "other" edge to
sample the decoded output -- introducing a fixed and predictable
skew to the control signals.

Or, decode the "count" as an inherent part of the counting
sequence; replacing the binary counter with a suitable
gray/johnson/overbeck counter.  (see other post)

[You should be able to do this with roughly the same amount
of "logic" as your original approach]

Back to sci.electronics.design | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Binary counter - please check my work bitrex <bitrex@de.lete.earthlink.net> - 2017-04-28 19:14 -0400
  Re: Binary counter - please check my work Don Y <blockedofcourse@foo.invalid> - 2017-04-28 16:20 -0700
    Re: Binary counter - please check my work rickman <gnuarm@gmail.com> - 2017-04-28 19:31 -0400
    Re: Binary counter - please check my work bitrex <bitrex@de.lete.earthlink.net> - 2017-04-28 22:39 -0400
      Re: Binary counter - please check my work Don Y <blockedofcourse@foo.invalid> - 2017-04-28 20:07 -0700
        Re: Binary counter - please check my work bitrex <bitrex@de.lete.earthlink.net> - 2017-04-29 00:27 -0400
          Re: Binary counter - please check my work Don Y <blockedofcourse@foo.invalid> - 2017-04-28 22:44 -0700
            Re: Binary counter - please check my work Don Y <blockedofcourse@foo.invalid> - 2017-04-28 22:46 -0700
            Re: Binary counter - please check my work rickman <gnuarm@gmail.com> - 2017-04-29 10:29 -0400
              Re: Binary counter - please check my work bitrex <bitrex@de.lete.earthlink.net> - 2017-04-29 11:07 -0400
              Re: Binary counter - please check my work bill.sloman@ieee.org - 2017-04-29 20:34 -0700
                Re: Binary counter - please check my work rickman <gnuarm@gmail.com> - 2017-04-29 23:43 -0400
                Re: Binary counter - please check my work bill.sloman@ieee.org - 2017-04-29 21:53 -0700
                Re: Binary counter - please check my work rickman <gnuarm@gmail.com> - 2017-04-30 01:42 -0400
                Re: Binary counter - please check my work bill.sloman@ieee.org - 2017-04-29 23:28 -0700
                Re: Binary counter - please check my work rickman <gnuarm@gmail.com> - 2017-04-30 20:10 -0400
                Re: Binary counter - please check my work bitrex <bitrex@de.lete.earthlink.net> - 2017-04-30 20:26 -0400
                Re: Binary counter - please check my work rickman <gnuarm@gmail.com> - 2017-04-30 21:07 -0400
                Re: Binary counter - please check my work rickman <gnuarm@gmail.com> - 2017-04-30 21:20 -0400
                Re: Binary counter - please check my work bill.sloman@ieee.org - 2017-04-30 18:52 -0700
                Re: Binary counter - please check my work rickman <gnuarm@gmail.com> - 2017-05-01 08:43 -0400
                Re: Binary counter - please check my work krw@notreal.com - 2017-05-01 13:33 -0400
                Re: Binary counter - please check my work bill.sloman@ieee.org - 2017-05-01 23:02 -0700
                Re: Binary counter - please check my work Jasen Betts <jasen@xnet.co.nz> - 2017-05-02 11:42 +0000
                Re: Binary counter - please check my work bill.sloman@ieee.org - 2017-05-02 06:10 -0700
                Re: Binary counter - please check my work upsidedown@downunder.com - 2017-05-03 03:26 +0300
                Re: Binary counter - please check my work pcdhobbs@gmail.com - 2017-05-02 18:41 -0700
                Re: Binary counter - please check my work bill.sloman@ieee.org - 2017-05-02 19:39 -0700
                Re: Binary counter - please check my work rickman <gnuarm@gmail.com> - 2017-05-02 11:30 -0400
          Re: Binary counter - please check my work Jasen Betts <jasen@xnet.co.nz> - 2017-04-29 20:25 +0000
            Re: Binary counter - please check my work rickman <gnuarm@gmail.com> - 2017-04-29 23:15 -0400
              Re: Binary counter - please check my work upsidedown@downunder.com - 2017-05-01 11:12 +0300
        Re: Binary counter - please check my work bitrex <bitrex@de.lete.earthlink.net> - 2017-04-29 00:43 -0400
          Re: Binary counter - please check my work Winfield Hill <hill@rowland.harvard.edu> - 2017-04-29 05:31 -0700
            Re: Binary counter - please check my work bitrex <bitrex@de.lete.earthlink.net> - 2017-04-29 09:48 -0400
          Re: Binary counter - please check my work Don Y <blockedofcourse@foo.invalid> - 2017-04-29 08:45 -0700
            Re: Binary counter - please check my work bitrex <bitrex@de.lete.earthlink.net> - 2017-04-29 12:51 -0400
              Re: Binary counter - please check my work rickman <gnuarm@gmail.com> - 2017-04-29 14:54 -0400
              Re: Binary counter - please check my work Don Y <blockedofcourse@foo.invalid> - 2017-04-29 12:34 -0700
                Re: Binary counter - please check my work bitrex <bitrex@de.lete.earthlink.net> - 2017-04-29 15:51 -0400
                Re: Binary counter - please check my work Don Y <blockedofcourse@foo.invalid> - 2017-04-29 21:37 -0700
            Re: Binary counter - please check my work Jasen Betts <jasen@xnet.co.nz> - 2017-04-29 20:49 +0000
              Re: Binary counter - please check my work Don Y <blockedofcourse@foo.invalid> - 2017-04-29 14:08 -0700
              Re: Binary counter - please check my work bitrex <bitrex@de.lete.earthlink.net> - 2017-04-29 17:31 -0400
                Re: Binary counter - please check my work Jasen Betts <jasen@xnet.co.nz> - 2017-04-30 00:51 +0000
                Re: Binary counter - please check my work bitrex <bitrex@de.lete.earthlink.net> - 2017-04-29 21:42 -0400
          Re: Binary counter - please check my work bloggs.fredbloggs.fred@gmail.com - 2017-04-29 12:17 -0700
            Re: Binary counter - please check my work bitrex <bitrex@de.lete.earthlink.net> - 2017-04-29 15:36 -0400
              Re: Binary counter - please check my work bloggs.fredbloggs.fred@gmail.com - 2017-04-30 08:00 -0700
                Re: Binary counter - please check my work bitrex <bitrex@de.lete.earthlink.net> - 2017-04-30 11:13 -0400
                Re: Binary counter - please check my work bitrex <bitrex@de.lete.earthlink.net> - 2017-04-30 11:24 -0400
                Re: Binary counter - please check my work bloggs.fredbloggs.fred@gmail.com - 2017-04-30 08:30 -0700
                Re: Binary counter - please check my work bitrex <bitrex@de.lete.earthlink.net> - 2017-04-30 16:06 -0400
  Re: Binary counter - please check my work Jasen Betts <jasen@xnet.co.nz> - 2017-04-29 00:04 +0000
  Re: Binary counter - please check my work bill.sloman@ieee.org - 2017-04-28 21:14 -0700
  Re: Binary counter - please check my work stratus46 <stratus46@yahoo.com> - 2017-05-01 01:51 -0700
    Re: Binary counter - please check my work stratus46 <stratus46@yahoo.com> - 2017-05-01 01:56 -0700
      Re: Binary counter - please check my work bitrex <bitrex@de.lete.earthlink.net> - 2017-05-01 13:36 -0400

csiph-web