Skip to main content
replaced http://electronics.stackexchange.com/ with https://electronics.stackexchange.com/
Source Link

I suppose a person could drive a bunch of LEDs using multiplexer or demultiplexer or address decoder chips, but that arrangement seems pretty rare.

People with big square grids of LEDs generally drive then in a "LED matrix" arrangement. Alas, the "LED matrix" arrangement is a bit difficult to explain -- perhaps the pictures will help at arduino 3x3 LED matrixarduino 3x3 LED matrix ?

People with one long line of LEDs often drive them using shift registersshift registers. Those are much easier to understand.

Yes, DDRB and PORTB are used to drive LOW/HIGH/OFF of the 8 pins of port B. The PINB is used to read the current state of those pins. If you are using Arduino, you may find it simpler to use the pinMode() and digitalWrite() library functions.

I suppose a person could drive a bunch of LEDs using multiplexer or demultiplexer or address decoder chips, but that arrangement seems pretty rare.

People with big square grids of LEDs generally drive then in a "LED matrix" arrangement. Alas, the "LED matrix" arrangement is a bit difficult to explain -- perhaps the pictures will help at arduino 3x3 LED matrix ?

People with one long line of LEDs often drive them using shift registers. Those are much easier to understand.

Yes, DDRB and PORTB are used to drive LOW/HIGH/OFF of the 8 pins of port B. The PINB is used to read the current state of those pins. If you are using Arduino, you may find it simpler to use the pinMode() and digitalWrite() library functions.

I suppose a person could drive a bunch of LEDs using multiplexer or demultiplexer or address decoder chips, but that arrangement seems pretty rare.

People with big square grids of LEDs generally drive then in a "LED matrix" arrangement. Alas, the "LED matrix" arrangement is a bit difficult to explain -- perhaps the pictures will help at arduino 3x3 LED matrix ?

People with one long line of LEDs often drive them using shift registers. Those are much easier to understand.

Yes, DDRB and PORTB are used to drive LOW/HIGH/OFF of the 8 pins of port B. The PINB is used to read the current state of those pins. If you are using Arduino, you may find it simpler to use the pinMode() and digitalWrite() library functions.

Source Link
davidcary
  • 17.8k
  • 11
  • 68
  • 120

I suppose a person could drive a bunch of LEDs using multiplexer or demultiplexer or address decoder chips, but that arrangement seems pretty rare.

People with big square grids of LEDs generally drive then in a "LED matrix" arrangement. Alas, the "LED matrix" arrangement is a bit difficult to explain -- perhaps the pictures will help at arduino 3x3 LED matrix ?

People with one long line of LEDs often drive them using shift registers. Those are much easier to understand.

Yes, DDRB and PORTB are used to drive LOW/HIGH/OFF of the 8 pins of port B. The PINB is used to read the current state of those pins. If you are using Arduino, you may find it simpler to use the pinMode() and digitalWrite() library functions.