Author |
Message |
Uncle Krunkus
Moderator
Joined: Jul 11, 2005 Posts: 4761 Location: Sydney, Australia
Audio files: 52
G2 patch files: 1
|
|
Back to top
|
|
|
Adam-V
Joined: Jan 29, 2007 Posts: 300 Location: Australia
Audio files: 1
|
|
Back to top
|
|
|
Adam-V
Joined: Jan 29, 2007 Posts: 300 Location: Australia
Audio files: 1
|
|
Back to top
|
|
|
Uncle Krunkus
Moderator
Joined: Jul 11, 2005 Posts: 4761 Location: Sydney, Australia
Audio files: 52
G2 patch files: 1
|
Posted: Mon Jun 29, 2009 12:08 am Post subject:
|
|
|
Does this last schem really work? It seems way too simple to be true, but it's exactly the kind of simple solution I thought might be possible. Thanks heaps Adam, I'll give it a go and let you know. _________________ What makes a space ours, is what we put there, and what we do there. |
|
Back to top
|
|
|
Adam-V
Joined: Jan 29, 2007 Posts: 300 Location: Australia
Audio files: 1
|
Posted: Mon Jun 29, 2009 3:20 pm Post subject:
|
|
|
I ran it through cedar logic and it works there. Simulators and reality do not necessarily coincide but I reckon it should do what you're after. Please do let us know if it works.
Cheers,
Adam-V _________________ Digitalis Effect | Fractured Symmetry (www.spiralsect.com) |
|
Back to top
|
|
|
Uncle Krunkus
Moderator
Joined: Jul 11, 2005 Posts: 4761 Location: Sydney, Australia
Audio files: 52
G2 patch files: 1
|
Posted: Mon Jun 29, 2009 4:47 pm Post subject:
|
|
|
I'm gonna try it this morning.
The main thing that came up while I've been mulling it over was whether, because it's only using the carry out, it might count down to 00000000 then hit 11111111 before changing direction. This would cause a momentary spike in the R/2R output. (It's the main counter on my Re-Animator)
If that's the case, it's possible I could use the same reasoning to trigger the FF "from the other side" also, with a pair of inverters and another AND hanging off the carry ins.
I don't spose you could try that in cedar logic could you?
Thanks heaps either way,
Andrew _________________ What makes a space ours, is what we put there, and what we do there. |
|
Back to top
|
|
|
Uncle Krunkus
Moderator
Joined: Jul 11, 2005 Posts: 4761 Location: Sydney, Australia
Audio files: 52
G2 patch files: 1
|
Posted: Mon Jun 29, 2009 6:25 pm Post subject:
|
|
|
When I AND both carry outs, it flatlines, (ie the counters sit on the same value, OR they are jumping back and forth between two adjacent values)
BUT,.... when I just send the second carry out to the flip-flop, it works fine!
I had to send my master sync signal to the set input of the flip-flop so it started in the same direction for each wave, but that's cool. It even adds the option of starting with an up or down count, (Set/Reset)
I still haven't checked the possible spike effect, which in this case might still be apparent, as it would still tip over from all 0s to all 1s in order to change direction and come back to all 0s. That fraction of a second at all 1s may be audible, but I can't see a spike on the scope. _________________ What makes a space ours, is what we put there, and what we do there. |
|
Back to top
|
|
|
Uncle Krunkus
Moderator
Joined: Jul 11, 2005 Posts: 4761 Location: Sydney, Australia
Audio files: 52
G2 patch files: 1
|
|
Back to top
|
|
|
Adam-V
Joined: Jan 29, 2007 Posts: 300 Location: Australia
Audio files: 1
|
Posted: Mon Jun 29, 2009 7:25 pm Post subject:
|
|
|
Interesting. There maybe a difference in the way Cedar handles U/D counters versus the real world.
What should happen is, when counting up and 11111111 is reached, is that the carry out of both counters should pulse (counter 1 briefly before counter 2). Similarly when counting down, the same should happen when 00000000 is reached. This should clock the latch and change the direction logic accordingly.
Maybe you have an issue with edges here, some flip flops and counters are positive edge triggered, others are negative edge. I just tried this in Cedar by inverting the ANDed carry out signal before sending it to the flip flop clock input and you get some weird results, flipping between 00000000 and 11111111.
Running with just the carry out of the second counter causes it to count between 00001111 and 11101111 as the second counter outputs a carry pulse when it reaches 0000 or 1111 depending on the direction.
You can download Cedar logic from here - its free.
http://cedarlogic.scienceontheweb.net/
Looks like there is a newer version to the one I am using. _________________ Digitalis Effect | Fractured Symmetry (www.spiralsect.com) |
|
Back to top
|
|
|
Adam-V
Joined: Jan 29, 2007 Posts: 300 Location: Australia
Audio files: 1
|
Posted: Mon Jun 29, 2009 7:36 pm Post subject:
|
|
|
Just looking at the datasheets, both the 4029 and 4013 are positive edge triggered so that can't be the issue.
You could try ripple clocking them rather than parallel clocking.
Take the carry out of counter 1 and apply it to the clock in of counter 2 instead of your clock signal. Then use the carry out of counter 2 to toggle the flip flop which controls the direction.
Cheers,
Adam-V _________________ Digitalis Effect | Fractured Symmetry (www.spiralsect.com) |
|
Back to top
|
|
|
Uncle Krunkus
Moderator
Joined: Jul 11, 2005 Posts: 4761 Location: Sydney, Australia
Audio files: 52
G2 patch files: 1
|
Posted: Tue Jun 30, 2009 12:43 am Post subject:
|
|
|
I can't remember why I didn't want to ripple count them. There's something I'm missing here about the nature of the carry in/out.
Anyway, it seems to work fine with just the carry out from the second one. I'm going to investigate the functionality of the carry pins and see if I can work out why.
Looking at the scope, it is definitely reversing at each end, and there's no spike at the turn around point. _________________ What makes a space ours, is what we put there, and what we do there. |
|
Back to top
|
|
|
Uncle Krunkus
Moderator
Joined: Jul 11, 2005 Posts: 4761 Location: Sydney, Australia
Audio files: 52
G2 patch files: 1
|
Posted: Tue Jun 30, 2009 12:58 am Post subject:
|
|
|
Adam-V wrote: | the second counter outputs a carry pulse when it reaches 0000 or 1111 depending on the direction |
I just re-read the description in the datasheet, and the above statement is true "provided the carry input is at logical 0 state."
Does that change what we are expecting? I'm getting myself very confused about what is happening across both counters in the up and down modes. _________________ What makes a space ours, is what we put there, and what we do there. |
|
Back to top
|
|
|
Adam-V
Joined: Jan 29, 2007 Posts: 300 Location: Australia
Audio files: 1
|
Posted: Tue Jun 30, 2009 3:44 pm Post subject:
|
|
|
There's the difference between the counter in Cedar logic and the CMOS counter you are using!
In Cedar, the second counter outputs the carry pulse regardless of the carry in state.
Sounds like you've got it sussed though.
Cheers,
Adam-V _________________ Digitalis Effect | Fractured Symmetry (www.spiralsect.com) |
|
Back to top
|
|
|
Uncle Krunkus
Moderator
Joined: Jul 11, 2005 Posts: 4761 Location: Sydney, Australia
Audio files: 52
G2 patch files: 1
|
Posted: Tue Jun 30, 2009 7:51 pm Post subject:
|
|
|
Adam-V wrote: | Sounds like you've got it sussed though. |
I don't know if I'd say I've got it sussed just yet.
I've read a couple of online tutorials about using the 4029, but haven't found anything specific about this situation.
I still don't know exactly what's going on. Only that it is. _________________ What makes a space ours, is what we put there, and what we do there. |
|
Back to top
|
|
|
|