element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Project Videos
  • Challenges & Projects
  • element14 presents
  • Project Videos
  • More
  • Cancel
Project Videos
Documents Charlieplexing Buttons and LEDs at the Same Time - How Hard Can It Be? -- Episode 604
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Project Videos to participate - click to join for free!
Related
Recommended
Engagement
  • Author Author: tariq.ahmad
  • Date Created: 10 May 2023 5:43 PM Date Created
  • Last Updated Last Updated: 26 May 2023 7:24 AM
  • Views 30044 views
  • Likes 9 likes
  • Comments 15 comments

Charlieplexing Buttons and LEDs at the Same Time - How Hard Can It Be? -- Episode 604

So many buttons so little IO. When you want to drive a large number of LEDs or read buttons the obvious choice is multiplexing them. But there is a method called charlieplexing that lets you use even more LEDs and buttons with even less IO pins. Clem wants to interface a large amount of buttons and LEDs with a microcontroller but has a limited number of pins.   He's also trying to save money on parts. Could you just replace expensive signal diodes with cheap LEDs? Could you use the same pins to read buttons and drive LEDs in the same matrix? Could you also achieve true n-key rollover without having a diode on every single button? How hard can it be?

Watch the Video:

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

Bonus Content:

  • Login to Download the Code!

Bill of Material:

Product Name Manufacturer Quantity Buy Kit
LED, Super Red, Through Hole, T-1 3/4 (5mm), 12 mA, 5 V, 640 nm Multicomp 9 Buy Now
Arduino Mega 2560, ATmega2560, 54 I/O, 256KB Flash, 8KB SRAM, 4KB EEPROM Arduino 1 Buy Now
Jumper Wire Kit, Multicolour, 2 mm - 125 mm, 22 AWG, 140 Piece Multicomp 1 Buy Now
Breadboard, Mounted, 1580 Pin, 10mm, x 135mm Multicomp 1 Buy Now
 

element14 presents

element14 presents  |  About Clem  |  Project Videos

  • buttons
  • keyboard
  • multiplexing
  • leds
  • Charlieplexing
  • arduino
  • friday_release
  • arduino mega
  • e14p_CMM
  • Share
  • History
  • More
  • Cancel
Actions
  • Share
  • More
  • Cancel
  • Sign in to reply
Parents
  • dougw
    dougw over 2 years ago

    For LEDs I prefer latched decoders, not any kind of multiplexing. I am okay with serially addressable LEDs, especially when variable brightness is needed.

    For buttons, I an okay with 2D cross-point matrices, if I can't have a pin for each individually hardware-debounced switch. 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • mayermakes
    mayermakes over 2 years ago in reply to dougw

    so are you using a diode on every single button or do you not care about n-key rollover in your button matrices?
    I have used latched decoders before, but it required a library that I viewed as not fast enough to do what  I wanted.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • dougw
    dougw over 2 years ago in reply to mayermakes

    I only push one at a time.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • dougw
    dougw over 2 years ago in reply to mayermakes

    I only push one at a time.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube