Categories

A quick and dirty methods to drive 7-segment LED displays directly with a microcontroller and no external components

Posted on Friday, February 28th, 2014 in LEDs by DP

IMG_2316

Scott Harden writes:

I came across the need for a quick and dirty display to show a 4 digit number from a microcontroller. The right way to do this would be to use a microcontroller in combination with a collection of transistors and current limiting resistors, or even a dedicated 7-segment LED driver IC. The wrong way to do this is to wire LEDs directly to microcontroller IO pins to source and sink current way out of spec of the microcontroller… and that’s exactly what I did! With no current limiting resistors, the AVR is sourcing and sinking current potentially far out of spec for the chip. But, heck, it works! With 2 components (just a microcontroller and a 4 digit, 7-segment LED display) and a piece of ribbon cable, I made something that used to be a nightmare to construct (check out this post from 3 years ago when I accomplished the same thing with a rats nest of wires – it was so much work that I never built one again!) The hacked-together method I show today might not be up to spec for medical grade equipment, but it sure works for my test rig application, and it’s easy and cheap to accomplish… as long as you don’t mind breaking some electrical engineering rules…

This entry was posted on Friday, February 28th, 2014 at 7:02 pm and is filed under LEDs. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

2 Responses to “A quick and dirty methods to drive 7-segment LED displays directly with a microcontroller and no external components”

  1. Piggybacking the 7-segment display on top of the AVR package means no wires needed to connect the display.
    http://www.simpleavr.com/avr/hvsp-fuse-resetter

  2. Max says:

    And that’s exactly why we have the level of “quality” of software in general that we do – “Who cares it’s wrong? Look, it works!”

Leave a Reply

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Recent Comments

  • Pekka Akselin: This is ridiculous!? :-) We are back at 256(!) byte EPROMs that needed multiple, a handful, of voltages to run! :-(
  • KH: Let's try a back-of-envelope calc balancing energies. From MCP1700 datasheet, there are graphs for a 200mA load step. Estimate the energy shortfall as 12uJ. Say...
  • Daniel: It's been a week and my comment is still awaiting moderation. Apparently the CIA doesn't want their involvement known?
  • KH: Agree, so okay, I guess he must have learned from somewhere. 100nF and 1000uF is so far apart, that was jarring; it's more magic incantation...
  • Max: I have a suspicion the hefty electrolytic cap might be some sort of cargo cult carry-over from other RF-based projects - for instance, I've seen...