one output switches between two outputs

Jon_

Member
Hi All,

I have a problem, i have used up all my outputs bar one, and i need to control two enable inputs on another chip. What i really need is a chip that takes one control signal and switches between to outputs, so i can use both high and low of my last output pin?

Thanks,
 

eclectic

Moderator
Hi All,

I have a problem, i have used up all my outputs bar one, and i need to control two enable inputs on another chip. What i really need is a chip that takes one control signal and switches between to outputs, so i can use both high and low of my last output pin?

Thanks,
Jon, could you elaborate a little more please?

I'm sure that you'll then receive a variety of
creative solutions. :)

E
 

Jon_

Member
well, basically i have one pin left on my picaxe which is controlling a RS485 comms chip, it has RE (read enable) and DE (Drive enable). However, only having one pin left means i cannot enable both, i can only hard wire it to one. Therefore, i am wondering if there is a chipset out there which switches between two outputs when its input is high or low.

That would mean i could use my last remaining output to switch the two enables?
 

eclectic

Moderator
well, basically i have one pin left on my picaxe which is controlling a RS485 comms chip, it has RE (read enable) and DE (Drive enable). However, only having one pin left means i cannot enable both, i can only hard wire it to one. Therefore, i am wondering if there is a chipset out there which switches between two outputs when its input is high or low.

That would mean i could use my last remaining output to switch the two enables?
Add an 08M to the circuit?

Ec
 

bgrabowski

Senior Member
You must state which Picaxe you are using. With 18, 28 and 40 pin Picaxes you can use the serial out pin as an extra output.
 

Jon_

Member
well i was hoping there was a more logic level way of doing it, as it is a bit of a waste of a microprocessor....
 

eclectic

Moderator
well i was hoping there was a more logic level way of doing it, as it is a bit of a waste of a microprocessor....
Perhaps it would be easier if you posted both

your current proposed circuit
your current program

Then, Forum members could supply you with more ideas.

e
 

hippy

Ex-Staff (retired)
Do you want RE to be low when DE is high and RE to be high when DE is low ? If so a simple inverter would do the job and you may be able to use part of the RS485 chip for that.

You could use two RC circuits, one biased to be high, one biased to be low and have three states from one pin rather than two but it probably would be easier to use another 08M as suggested. Or move up to a PICAXE controller with more I/O.
 

BeanieBots

Moderator
This sounds like a simple logic 'multiplexing' problem but I'm not 100% clear on the requirement.
Without some level of intelligence, one OP can only control one thing.
However, with the simplest of logic, two outputs can control 3 things and 3 outputs can control 7.
Of course, with something like serial comms, 1 OP can control thousands of things:)
 

graynomad

Senior Member
It's still not clear why you need to control both lines seperately.

Normally on 485 transceivers the RE is active low and DE is active high so you just use a single signal to swap between Tx and Rx.

Is there some reason you need to control them seperately? Do you need to read what's being transmitted? In which case you could leave RE hard wired on.

Next question, do you need all 4 combinations of DE on/off RE on/off?
 
Last edited:

Jon_

Member
argh, hang on i may have misread the datasheet. I assumed you need to use RE and DE as two seperate enables, however, after what graynomad has said i have had another look at the data sheet. Attached is a print screen of the pin functions.

Reading that i would assume that i can use one pin, DE, to both read and write. So DE high would enable the driver output, but making it low would enable the receiver input. Is this right?

That means i can drop the connection from my picaxe to the RE input as i have no need for it?
 

Attachments

graynomad

Senior Member
Reading that i would assume that i can use one pin, DE, to both read and write. So DE high would enable the driver output, but making it low would enable the receiver input. Is this right?
Correct, in fact if the Rx and Tx are going to seperate pins on the Picaxe you don't really have to disable the receiver, but unless you want to read the line while transmitting (say to detect bus clashes) you may as well just connect RE and DE together.
 
Top