View previous topic :: View next topic |
Author |
Message |
Newbie Guest
|
Open collector |
Posted: Tue Sep 21, 2004 3:17 am |
|
|
I am trying to connect my PIC to a GSM, the reset pin (active low) on the GSM says "MUST ONLY BE CONNECTED TO A OPEN COLLECTOR TRANSISTOR" will I be OK if I connect it to a PIC pin and just input_float(RESET) and when I want to reset it pull it low that float it again?
Sorry for being such a newbie :o)
Thx |
|
|
LomasS Guest
|
|
Posted: Tue Sep 21, 2004 4:02 am |
|
|
Using the I/O as inputs (which is what float does) would not be a safe way for reliable operation. Which PIC are you using, some already have a pin which gives you what you want, for a 16F87x or 18Fxx2 pin RA4 when configured as output presents an open drain connection this could be used directly. The alternative is to use a transistor or my preference is for a MOSFET 2N7000 or similar connected to an output pin. The MOSFET has the advantage of not requiring any resistors.
I have used both of these methods to connect to the reset & on/off control of a GSM module.
Steve. |
|
|
Newbie Guest
|
PIC18F252 |
Posted: Tue Sep 21, 2004 7:05 am |
|
|
Hi,
I'm using the 18F252 so from what you say I can connect it to RA4 and use the output_high / output_low commands without any setup or extra circuit?
Thanks
P.S. Are you suing the GSM826, I just noticed you mentioned "RESET and ON/OFF" in your post and these correspond to my PDF sheet. If you are using the GSM826 do I need a open collector for the ON/OFF, it does not mention this in the technical document? Currently I have this just connected to RB0. |
|
|
bdavis
Joined: 31 May 2004 Posts: 86 Location: Colorado Springs, CO
|
|
Posted: Tue Sep 21, 2004 10:32 pm |
|
|
On the 18F452, RA4 is Open Collector or Open Drain.
Use RA4 with a pullup resistor - ie: 4.7K resistor between RA4 and +5V, then tie RA4 to your GSM thingy...
Oh - and then have fun! |
|
|
Newbie Guest
|
Internally pulled up |
Posted: Wed Sep 22, 2004 2:53 am |
|
|
Thanks bdavis for the reply,
The Spec sheet says it's pulled up internally so am I right in saying I don't need the external resistor?
Thanks |
|
|
bdavis
Joined: 31 May 2004 Posts: 86 Location: Colorado Springs, CO
|
|
Posted: Wed Sep 22, 2004 12:17 pm |
|
|
Yes, that is correct - you don't need the pullup if they have a pullup already internally.... |
|
|
Guest
|
|
Posted: Wed Sep 22, 2004 2:20 pm |
|
|
Yes, I'm using the GM862.
I connect the reset to RA4 - don't use external pullup.
I also connect the on/off pin to an I/O pin (RA2) via a 2N7000 MOSFET (2N7002 if surface mount) configured as open drain (I/O pin to Gate, Source to 0V and Drain to on/off pin).
I also have connected the PwrCtl pin to an analogue input (RA1) to be able to read whether the unit is on or off. As PwrCtl only goes up to about 3V this needs to be read via A/D to confirm that it's above or below a threshold that corresponds to about 2V. If using the PCS version of teh module the PwrCtl needs a resistor & Capacitor filter to remove the sync pulses for the camera.
I'm still working on the serial interface software but have adopted the suggested hardware using a pair of BCR22PN.
Steve. |
|
|
|