Bidirectional circuit in LogicCircuit

An area for asking questions, making suggestion, share ideas and place circuit examples.
User avatar
admin
Site Admin
Posts: 407
Joined: Sun Jun 14, 2009 10:53 pm
Contact:

Re: Bidirectional circuit in LogicCircuit

Post by admin »

In your very last circuit where AND gate does not have any inputs connected the entire circuit get optimized away.
Now back to your original problem. I think you are trying to solve incorrectly defined problem. Instead try to think about your circuit as a bus with multiple data providers each of them is connected to the bus via tri-state buffers. All the consumers of the bus information just having their inputs connected to the bus. This way you don’t need to solve our problem with bi-directional circuits.
SomeGuy
Posts: 8
Joined: Thu Apr 03, 2014 12:05 pm

Re: Bidirectional circuit in LogicCircuit

Post by SomeGuy »

Alexander wrote:Z is not treated as 1. In Logiccircuit Z is treated like there was no pin at all. So the 3 input "And" gate with one of the inputs set to Z is treated like 2 input gate. And 2 input pins "And" gate will be like a repeater.
Wow, thanks, I didn't get it, I think I'm just too much into those tri-states so I didn't notice behavior without one of the pins connected - and of course all four-state logic thing did not help me to understand it :). Anyway, it looks promising. And the tool you linked to, after first impression, doesn't look so hard to work with. I'd even say that it's getting really nice to play with it.
admin wrote:In your very last circuit where AND gate does not have any inputs connected the entire circuit get optimized away.
Now back to your original problem. I think you are trying to solve incorrectly defined problem. Instead try to think about your circuit as a bus with multiple data providers each of them is connected to the bus via tri-state buffers. All the consumers of the bus information just having their inputs connected to the bus. This way you don’t need to solve our problem with bi-directional circuits.
Thanks for getting into my problem again. That's just a simplification, the original problem is three-way bus where A is being bidirectional, B is an output and C is an input so: when we provide data to A it has to be routed to B output and when we provide data to C, it has to be outputted with A. I've got to get into the original schematics again, clean it up to get it understandable and upload it here to show you the original problem.

[edit]
Ok, I'm getting into the original design again. I'll try to figure out something, also with the tool that Alexander provided. I'll be back in few days, either with solution and original design or with further questions. Anyway, thank you very much, you've both been great help, I feel bit smarter now :)
SomeGuy
Posts: 8
Joined: Thu Apr 03, 2014 12:05 pm

Re: Bidirectional circuit in LogicCircuit

Post by SomeGuy »

Hi!

Well, I got the whole thing working :). I'd like to share it, take in moderation that I'm a beginner so I suppose that some of my solutions can make you lol :).
But it works and I reached my goal - there's single line between every two connected hubs and whole communication is bidirectional.
Whole thing is programmed by buttons, I attached sample 'program' as a screenshot.

So, as I said, it's a routing system. In LogicCircuit it's routing provided signal from source to target. Every target has a number, every endpoint allows you to provide target or be a target itself (every of them has set of buttons to provide target endpoint and a signal diode). Buttons are representing binary number. 0 means 'no target'. Only one endpoint at the same time can have a target provided, otherwise results are unpredictable. Whole network can handle up to 31 endpoints. The rest is described inside of modules.
I know there are limitations, but that's just a prototype. I might work on it to get it 'final' so you can't provide wrong configuration, but I won't promise I'll do that (there's no need for me to develop that project further, now I need to implement it in Minecraft :) ).

I believe that it's 'electrically possible' based on things that I've read about tri-state logic, but I might be wrong. If I am, I'd be happy to know that - I really care about being physically correct so feel free to point me out any errors, if you do, I'll correct my design.
Attachments
metro.CircuitProject
(194.24 KiB) Downloaded 459 times
Sample program
Sample program
metro.png (92.74 KiB) Viewed 7694 times
User avatar
admin
Site Admin
Posts: 407
Joined: Sun Jun 14, 2009 10:53 pm
Contact:

Re: Bidirectional circuit in LogicCircuit

Post by admin »

Thanks for sharing your project.
Can you please provide a bit more details on what it is doing and how it works - some sort of big picture overview?
SomeGuy
Posts: 8
Joined: Thu Apr 03, 2014 12:05 pm

Re: Bidirectional circuit in LogicCircuit

Post by SomeGuy »

Hi, thanks for response.
That design is the logical part of communication network - a subway. It's designed to handle station addresses and route signals within the network along with the player riding a cart. As I said before, this is designed to work within the computer game - Minecraft, if you're not aware of capabilities of this game in building logical circuits, I encourage you to dig through youtube, people have done really amazing things in it, such as fully functional tetris game, partially functional scientific calculator (capable of drawing linear and square root function charts) or even a 16-bit computer.

The design is following: The player on the source station gets on the minecart and provides target station address using interface similar to endpoints in my project. Stations are addressed using binary-encoded numbers, from 1 to 31 (0, as I mentioned before, means 'no target selected' and is a standby state for whole network). After pushing the button, the network carries a delayed signal, along with the player inside the minecart, through the hubs lying between source and the target station. Every hub routes signal and the minecart at the same time (minecart is routed using 'electrically' controlled steerings). Every hub is programmable using interface similar to the interface that I designed using LogicCircuit. For obvious reason the network I designed in LogicCircuit is lacking the minecart part :-). Signal lines between hubs are bi-directional. Whole design is very loosely inspired on computer network routing using ip addresses and network masks (very loosely because there are major differences).

When I'll implement that design in the game, I'll certainly upload save-state here for people who own the game to look at final working project. I also plan to record the gameplay and, maybe, some tutorial on how to build it in Minecraft and upload it on youtube.

I hope that it's clear now and I'll be glad to answer any questions about it and of course if you'll find any error in the design or, as I said, 'physical inconsistency' - I'd be happy to fix it and learn something about electronic circuits. I really do have fun working on it in LogicCircuit and that's certainly first of many designs that I'll implement using your software. I'll upload my next projects for sure.
Post Reply