I am doing a project on AUTOMATIC RAILWAY GATE SYSTEM.I want to make an led connected to a pin of port P2 of 8051 to light up when a bit of port 1 is set.How to do that.Please help
"to light up when a bit of port 1 is set"
It is often better to do the reverse - lots of processors have stronger sink than source capabilities.