element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • 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
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • 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
element14 presents
  • Challenges & Projects
  • More
element14 presents
e14 presents blogs Driving LED Displays With Arduino And MAX7219
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
element14 presents requires membership for participation - click to join
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: airbornesurfer
  • Date Created: 16 Sep 2020 12:05 AM Date Created
  • Views 1116 views
  • Likes 1 like
  • Comments 0 comments
  • LED driver
  • 14-segment
  • project colortyme
  • max7219
  • arduino
Related
Recommended

Driving LED Displays With Arduino And MAX7219

airbornesurfer
airbornesurfer
16 Sep 2020
image
****EPISODE TITLE****

element14 presents  |  AirborneSurfer's VCP Profile |  Project Videos

 

The Arduino platform is great for making LEDs blink and driving small displays, but what happens when you need to display more complex information? For Project ColorTyme, I need to drive 6x 14-segment "starburst" style alphanumeric LED displays, but pins are at a premium. To solve the problem, we'll incorporate the MAX7219 LED display driver; however, it's an imperfect solution: The displays I'm using are common-anode while the MAX7219 is a common-cathode driver. In this video, we'll walk through wiring a 14-segment display to the Arduino, then wiring the MAX7219 to drive in common-anode mode while adjusting the code so everything comes out correctly.

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

PARTS/TOOLS:

https://www.newark.com/arduino/a000066/dev-board-atmega328-arduino-uno/dp/78T1601https://www.newark.com/mcm/21-18938/breadboard-with-binding-posts630/dp/79X3923?COM=element14presents

https://www.newark.com/mcm/21-18938/breadboard-with-binding-posts630/dp/79X3923

https://www.newark.com/adafruit/759/wire-gauge-28awg/dp/88W2571

https://www.newark.com/maxim-integrated-products/max7219cng/led-display-driver-8-digit-ndip/dp/81Y9585

https://www.newark.com/broadcom/hdsp-a22c/led-display-starburst-2-digit/dp/05M4121

 

RESOURCES:

MAX7219 Datasheet

HDSP-A22C Datasheet

LedControl Arduino Library (attached below)

 

THE CIRCUIT:

image

The main thing to remember when wiring in this inverse method is that the segment pins correspond to individual digits while the digit pins correspond to individual segments. This illustration is also limited to a single 14-segment digit, but the pinout for a dual display is what is wired.

image

THE SKETCH:

//Project ColorTyme
//MAX7219x14-segment Display Proof of Concept
//CC-BY-SA Matthew Eargle
//element14 Presents http://element14.com/presents
//AirborneSurfer Productions http://airbornesurfer.com

#include "LedControl.h"
/*
 pin 12 is connected to the DataIn 
 pin 11 is connected to the CLK 
 pin 10 is connected to LOAD 
 We have only a single MAX72XX.
 */
LedControl lc=LedControl(12,11,10,1);

unsigned long delaytime=100;
byte numbers[16] = {
                    B11111100, B01100000, B11011010, B11110010,
                    B01100110, B10110110, B10111110, B11100000,
                    B11111110, B11110110, B11101110, B11110011,
                    B10011100, B11110001, B10011110, B10001110
                    };                   
int ones = 0;
int twos = 0;

void setup() {
  /*
   MAX72XX wakeup call
   */
  lc.shutdown(0,false);
  /* set the brightness */
  lc.setIntensity(0,1);
  /* clear the display */
  lc.clearDisplay(0);
  int counter = 0;
}

void loop() {
  lc.setColumn(0,2,numbers[twos]);
  while(ones <= 15) {
    lc.setColumn(0,1,numbers[ones]);
    delay(1000);
    ones++;
  };
  ones = 0;
  twos++;
}

Attachments:
LedControl-master-patched.zip
  • Sign in to reply
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 © 2023 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

  • Facebook
  • Twitter
  • linkedin
  • YouTube