Use a microcontroler outputs for a switch?

Status
Not open for further replies.

1Steveo

New Member
I just proagram my first microprosser. I was going to use an optocupler " to trigger a camera.
Can I just make two of the micro's pins go low and ack like a switch?

what do you think?

Thanks
Steve
 
1Steveo said:
I just proagram my first microprosser. I was going to use an optocupler " to trigger a camera.
Can I just make two of the micro's pins go low and ack like a switch?

To feed an opto-coupler you only need one pin, feed the LED from the pin via a current limiting resistor, and connect the other side of the LED to 0V. When the pin is high the LED is on, when it's low the LED is off. You can also do the opposite, reverse the LED and connect it to 5V rather than 0V, then it will light when the pin is low, and go out when it's high.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…