Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problem with chip as switch design

Status
Not open for further replies.

Zhasha

Junior Member level 3
Joined
Dec 3, 2005
Messages
30
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Denmark
Activity points
1,643
chip as switch

Hi, i have a little problem on my hands:

i made this nifty little switch:
Code:
            V+
  ___        ^
 |   |-------+---/\/\/\/----
 |   |-
 |   |-
 |   |-
 |   |-
 |___|-

so when the chip grounds the current on the port, the switch is off, and when not the switch is on
my problem is now that i would like every port to be able to do that with current coming from only one lead.
so how do i with only one V+ make switches (8 of them to be more specific), to have 8 outputs (only 1 active at a time)
 

chip as switch

I dont underestand your question!
please put your diagram correctly and ask you question clearly.
 

Re: chip as switch

okay, so - i want to add the same functionality to all of the PBX ports.
when PB0 is set to 0, it grounds the current. when its not grounding the current the current flows through the resistor and out to where ever its going to be used.
not the problem here is that i can only use this on one port, because if i connect it to all, if one port grounds, no current flows, and i need 8 seperate ports in that sence, i have 8 different destinations for the current and i want the chip to send the current to one at a time.

say i want to send current out to destination 0, only that one destination gets the power, and the rest get nothing.

hope this explains it better
 

Re: chip as switch

Hi,
this can damage your processor, you can not connect your port directly to the Vcc if the port is configure as output.
I dont know what range of current you will use, if this is a several mA, then you must put the resistor betwen port and Vcc and get the signal from the port, if you whant to use more that 10 mA, the better is to use axternal transistor ot IC, some like UL2003 for example. If this will be only the signal, then you just must enable the internall pull-up resistors, and this is all.
I tay to make a sch here:

several ma
......Vcc
__....|
...|...R
...|...|
..B0-*--- output
...|
...|

up to several A - transistor is a PNP
..........Vcc....Vcc
._ ........|......|
...|.......R......|
...|.......|...... |....(emiter)
..B0--R-*---|<___ output
...|....................(colector)
...|
 

Re: chip as switch

Thanks a lot for pointing that out, but what i need is still to get 8 outputs, where only one is active at a time.
i dont suppose making 8 of these PNP "switches" and connecting them to each their own port will work?
 

Re: chip as switch

Hi,
You not said what be the load, if this is low current device you can just connect rezistor to Vcc, the PIC can give up to 20 mA, if this is the normal output. You can increase this current to 25 mA with external resitor, but must calculate it because 25 mA is a maximum load to the ground.
In my previous post i write about port pull up, do not look this, puul up is for input, not for output, this is mistake :)
If you need high current, yes, you must have a 8 PNP transistors, one's for every output.
 

chip as switch

As Tohu said, you can not connect IOpin to VCC.
Anyway for produce 8 outputs, which one of them active at any time, you can use one 74(HC)138
for active low and 74(HC)237 for active high.
And connect PA1, PA2, PA3 of your microcontroller as address to this decoder.
:D

Regards Davood
 

Re: chip as switch

Oo, yes this is a good idea to minimize the CPU pin usage, but if you need a high current output this not be reduce the needing transistor after the decode, decder just minimize CPU pin, but have similar to CPU port load capacity.
 

chip as switch

Just duplicate the switch on each port.. Not sure what the problem is here. You're just going to have to bullet proof your software to make sure that more than one of these isn't sinking current at the same time or you're liable to fry the entire I/O port driver for that port, or who knows what else depending on how your circuit is setup. How much current do you have to sink before the switch triggers?
 

Re: chip as switch

i need to make switches that should be able to support enough to sustain another chip (so only a few mA) so sourcing from pins is an option, but i could never get it working. i do not have a PIC programmer, only an AVR programmer (STK500) and as for chips, i can always buy a specific one if needed - in fact i have quite a few coming in the mail.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top