Specifications

Chapter 6 - Samples
Optocoupler on an output line
An Optocoupler can be used to separate the output signal of a microcontroller from an output
device. This may be needed for high voltage separation or current amplification. The output of
some microcontrollers is limited to 25mA. The optocoupler will take the low-current signal from
the microcontroller and it's output transistor will drive a LED or relay, as shown below:
Output line optocoupler example
The program for this example is simple. By delivering a logic '1' to the fourth pin of port A, the
LED will be turned on and the transistor will be activated in the optocoupler. Any device connected
to the output of the optocoupler will be activated. The transistor current-limit is about 250mA.
Previous page Table of contents Chapter overview Next page
© Copyright 1999. mikroElektronika. All Rights Reserved. For any comments contact webmaster.
http://www.mikroelektronika.co.yu/english/product/books/PICbook/6_05Poglavlje.htm (3 of 3) [4/2/2003 16:18:52]