Skip to content

Commit 049e605

Browse files
committed
.
1 parent 7d5c490 commit 049e605

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

_posts/2025-04-23-ATMega328PU_two_leds.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ Other low-cost alternatives:
4040

4141
Naturally, we’ll use pull-up or pull-down resistors to ensure that the inputs connected to buttons have a defined state when the buttons are not pressed. The ATMega328 already includes internal pull-up or pull-down resistors, so we might omit them from the PCB design.
4242

43-
> [!NOTE]
43+
> NOTE
44+
>
4445
> **When should you use or avoid the microcontroller’s internal pull-up or pull-down resistors?**
4546
>
4647
> **Recommended usage** for simple applications, especially when:
@@ -69,6 +70,7 @@ Some advantages of using transistors:
6970
So, despite 20mA capability, transistors protect GPIO pins. Thus, we use the classic NPN BJT 2N3904 as the LED driver (a PNP or MOSFET could also be used depending on specific needs, but for this small project, this is sufficient). We won’t use PWM; the LED will always be on in a high state because we are not concerned with dimming.
7071

7172
> INFO
73+
>
7274
> Watch [this video](https://www.youtube.com/watch?v=wKIHAbnBCJM) and [this schematic](https://www.circuitlab.com/circuit/gmmqaq/2n2222-led/).
7375
7476
#### LED Resistor Calculation

0 commit comments

Comments
 (0)