Sign in

username:

password:



Not a member?

Search piclist



Search tips

Subscribe to piclist



piclist by Keywords

12F675 | 16F628 | 16F84 | 16f877 | 16F877A | 16F88 | 18F458 | ADC | AVR | Bootloader | CAN | CCS | CRC | EAGLE | EEPROM | ICD | ICSP | IDE | JDM | LED | Macros | Microchip | MPLAB | PCB-CAD | PIC10F | Pic12f675 | PIC16F84 | PIC16F84A | PIC16F877 | PIC18 | PIC18F452 | PicBasic | PICC | PICSTART | PWM | RS-485 | RS232 | SMT | SPI | UART | USART | USB | Wireless | Wisp628 | Xilinx

Ads

Discussion Groups

Discussion Groups | Piclist | Does RD/TX pins of PIC need a 330 resistor to drive a Opto ?

A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.

Does RD/TX pins of PIC need a 330 resistor to drive a Opto ? - Kamal Shankar - Jun 3 15:50:09 2006

Hi

I was reading the electrical specs of the PIC16F876A and saw that PORTC=20
sinks 200mA of current.

If I was to interface an optocoupler's LED side (which sources max=20
15mA), won't I need to connect a 300/470 Ohm resistor in series ?

I also noticed it being given that ANY I/O pin sinks/sources max 25mA=20
of current..

So, I am a little confused regarding the current ratings.

Ideally, I am biased towards NOT connecting a current limiting resistor=20
between the RX/TX pin and the Opto's LED because I am worried about=20
noise..

Do advise. iS the resistor relly required. I don't want to harm the LED=20
in any manner, because the opto's damn expensive.

=20

to unsubscribe, go to http://www.yahoogroups.com and follow the instruction=
s=20

=20



(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )


Re: Does RD/TX pins of PIC need a 330 resistor to drive a Opto ? - rtstofer - Jun 3 18:26:37 2006

--- In p...@yahoogroups.com, "Kamal Shankar" wrote:
>
> Hi
>=20
> I was reading the electrical specs of the PIC16F876A and saw that PORTC=20
> sinks 200mA of current.

Yeah, that is the combined current of 8 pins, none of which can exceed
25 mA. That current is further constrained by a Vss limit of 300 mA
for the entire package.

But, these are Absolute Maximum Ratings. The values, which exceeded,
absolutely guarantee the magic smoke will leak out of the package.

To keep the output voltage, when low, less than 0.6V, the sink current
in the pin can not exceed 8.5 mA. See spec D080

To keep the output voltage, when high, move than Vdd-0.7, the source
current can not exceed 3.0 mA. See spec D090

>=20
> If I was to interface an optocoupler's LED side (which sources max=20
> 15mA), won't I need to connect a 300/470 Ohm resistor in series ?

You can sink the LED but you probably won't pull down to 0.6V. You
also can operate the LED with a lot less than 15 mA. It is a matter
of transconductance and the load on the output transistor.

If you try to omit the resistor, you will probably pull more than 15
mA and could well wipe out the opto. Why do you want to do this?=20
There is no way that a 220 ohm resistor is going to let your circuit
get noisy. In fact, the pull-up resistor on the output transistor may
be much higher. Again, it depends on transconductance but it might be
several K ohms.

I calculated the resistor as 5V (Vcc) - 1.2 (Vf of the LED, a guess) -
0.6V (the actual pin output) all divided by 0.015A.

=20
> I also noticed it being given that ANY I/O pin sinks/sources max 25mA=20
> of current..

Sure, but don't do that. Again, it is an Absolute Maximum Rating -
don't even go anywhere near those values.

>=20
> So, I am a little confused regarding the current ratings.
>=20
> Ideally, I am biased towards NOT connecting a current limiting resistor=20
> between the RX/TX pin and the Opto's LED because I am worried about=20
> noise..
>=20
> Do advise. iS the resistor relly required. I don't want to harm the LED=20
> in any manner, because the opto's damn expensive.
>

Summary: yes, the resistor is required and no, it won't contribute to
noise relative to the rest of the circuitry.

Richard

=20

to unsubscribe, go to http://www.yahoogroups.com and follow the instruction=
s=20

=20



(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )