Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
wiki:tcb:tcbinstall:io_ports_ab [2021/03/19 19:30]
opadmin [Using an I/O Port as Output]
wiki:tcb:tcbinstall:io_ports_ab [2021/03/20 01:07]
opadmin [Using an I/O Port as Output]
Line 34: Line 34:
  
 If you wish to connect the output to another microcontroller (such as another Arduino) you can do so directly - just connect the signal pin of the I/O port to the input pin of your other controller, and also make sure both the TCB and the other controller share a ground connection.  If you wish to connect the output to another microcontroller (such as another Arduino) you can do so directly - just connect the signal pin of the I/O port to the input pin of your other controller, and also make sure both the TCB and the other controller share a ground connection. 
 +
 +{{ wiki:io_output_led.jpg?direct&500 |Driving LEDs with an I/O port set to output}}
  
 However keep in mind these outputs are only rated at 40mA each. For LEDs with standard specifications of around 20mA they can work without any other components, but otherwise these ports will almost surely be inadequate for driving high current lights, relays or other devices. For that you will need to add an external transistor or MOSFET circuit. A simple 2n2222 transistor circuit will work and there are many schematics on the internet. Or see the [[wiki:tcb:tcbinstall:accessories#mosfet_switch|Accessories]] page for a robust MOSFET switch schematic that you can build.  However keep in mind these outputs are only rated at 40mA each. For LEDs with standard specifications of around 20mA they can work without any other components, but otherwise these ports will almost surely be inadequate for driving high current lights, relays or other devices. For that you will need to add an external transistor or MOSFET circuit. A simple 2n2222 transistor circuit will work and there are many schematics on the internet. Or see the [[wiki:tcb:tcbinstall:accessories#mosfet_switch|Accessories]] page for a robust MOSFET switch schematic that you can build. 
wiki/tcb/tcbinstall/io_ports_ab.txt ยท Last modified: 2021/03/22 23:42 by opadmin