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.

[SOLVED] Interfacing a PIC micro

Status
Not open for further replies.

droseman

Junior Member level 3
Joined
Oct 20, 2010
Messages
25
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,463
Hello,

I am trying to interface some 5V TTL signals through an optocoupler to a microchip PIC16C55A microcontroller. I need to calculate the current to drive my opto with so that I won't damage the input of my micro.

When I went to the datasheet for the PIC, I found that:

Max. current into an input pin (T0CKI only).................................................................................................... ±500 mA

With a CTR of 200% on my opto and a 1mA minimum input current, how do I interface the micro input without damaging it?

Is there another line in the datasheet which will tell me the maximum input current of an IO pin? Most of the data seemed concerned with output current source and sink..

Hopefully someone can help me sort out this interfacing issue.

--dave
 

I didn't get exactly what You need.
If You use the PIC pin as an input, it is high impedance and there is no current rating (it draws almost no current).
If You use the PIC pin as an output, it can sink/source up to 25mA, so for 5V you should use at least 220 Ohm resistor.

I don't think You need an opto if You're interfacing a 5V TTL to a 5V PIC.
 
The purpose of that information maybe is related to current consumpion purpose only, due T0CKI pin is Smith-Trigger type.

+++
 

dave, have another look...that's 500uA, not 500mA. It's low, because like bjuric said, it's high impedance and draws very little current.
 

Hi

Thanks for all your responses, I think that I have a better idea on PIC interfacing now.

bjuric: I hadn't realised that the inputs were set as high impedance, your answer makes total sense, thanks.

I know it may sound overkill to be optically isolating this I/O, but what I didn't mention previously that my application has high voltage around it (up to 10kV) and the chance of a flashover, which I believe is coupling on to the I/O line causing firmware corruption and eventual chip destruction. This opto interface with transorb protection diodes is my solution to this problem.

Thanks again to all for replying.

Regards
Dave
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top