driving LEDs directly from microcontroller pins
In my circuit I design , I'm using at91sam7s128 which is a micro-controller with ARM7 core . His PIO0 to PIO31 provide maximumly 8mA which is low to handle a direct driving of LEDs as this :
simulate this circuit – Schematic created using CircuitLab
So some designers use a safer method , like connecting PIO to the base of a transistor like a switch :
simulate this circuit
others just make a simple trick . they connect the anode of LED to the power supply and kathod to PIO .
simulate this circuit
In last method : LED will turn on when PIO goes low - acting like GND - and current will be taken from power supply not from PIO like first method . So do I must take care of maximum current of PIO although it just act like GND not like a power supply -like method 1 - . when I make PIO low dose it really connect to GND or something else ?
NOTE : Atmel use last method in evaluation KIT , but I need to make sure .
In my circuit I design , I'm using at91sam7s128 which is a micro-controller with ARM7 core . His PIO0 to PIO31 provide maximumly 8mA which is low to handle a direct driving of LEDs as this :
simulate this circuit – Schematic created using CircuitLab
So some designers use a safer method , like connecting PIO to the base of a transistor like a switch :
simulate this circuit
others just make a simple trick . they connect the anode of LED to the power supply and kathod to PIO .
simulate this circuit
In last method : LED will turn on when PIO goes low - acting like GND - and current will be taken from power supply not from PIO like first method . So do I must take care of maximum current of PIO although it just act like GND not like a power supply -like method 1 - . when I make PIO low dose it really connect to GND or something else ?
NOTE : Atmel use last method in evaluation KIT , but I need to make sure .
No comments:
Post a Comment