Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

Latest threads

New Articles From Microcontroller Tips

Back
Top