Thursday, August 1, 2013

AVR Atmega multiple 8x8 led matrix using MAX7219

This library implements a 8x8 led matrix for AVR Atmega.



It uses just one MAX7219 serial input/output common-cathode display drivers and 3 ports.
MAX7219 can refresh leds leving more resources to microcontroller.
This library uses MAX7219 without the need of SPI. User can setup scan limit and intensity setup.
Multiple led matrix can be attached.


With simple functions, it gives your the ability to:
  • power on / off a single led
  • setup a selected row
  • setup an 8x8 matrix
Setup parameters are stored in file ledmatrix7219d88.h


Code

Notes
  • read risk disclaimer
  • excuse my bad english

14 comments:

  1. Great job , it works. Can you help me how to define function


    ledmatrix7219d88_setcol

    it will set upright diodes in colums.

    eg. 0b11111111 will light up 1st column ?

    i tried to display moving text in 2 led displays.

    Thanks!

    ReplyDelete
    Replies
    1. Hello, it's a few that i do not look at this library, anyway, you can simply use the ledmatrix7219d88_setled function, but if you are trying to reduce the number of operation involved, i think you have to tweek around the max7219 library to.

      Delete
  2. Which program did you use for your schematics file? I can't open it and the image makes no sense compared to other images online. I tried to run the code at it's not working the same as in the video. My wiring must be different since I do not have the matrix + chip module for the led display.

    ReplyDelete
    Replies
    1. Thanks! I'm just having a hard time getting it to work. Everything should be wired properly but all it does is turn all LEDs on then off instead of a fancy loop.

      Delete
    2. Hello, you can check it with a scope, or a logic analizer, what's going on over the bus. Then you will understand why this is not going. Or you can use uart as a debug output interface, sending to your terminal register status, or any kind of debug messages that may help you.

      Delete
  3. This is not working.I checked this through the Proteus simulator as in the schematic and programmed it in the Winavr programmers notepad.But nothing works.And tried it on Atmega32 and Atmega8 both.Can you please help me regarding this.
    In the program it has called the interrupt header but haven't called a interrupt in the program.
    Are the pins connected in the schematic are correct?

    ReplyDelete
    Replies
    1. Hello, this works for me as you can see for ATmega8 on presold MAX7219 matrix led board. I've also test it on clean MAX7219 and leds. Unluckly i do not use Proteus. You can check your micro to MAX7219 bus using a logic analizer, to assure that the output is working.

      Delete
  4. i cant make a hex file,can u send me hex,to kushan.walakulu@gmail.com

    ReplyDelete
  5. for the max7219 is it possible use it only with i2c?

    ReplyDelete
    Replies
    1. Hello, no, but by datasheet the MAX7221, which is similar to the MAX7219 is compatible with SPI, QSPI, and MICROWIRE.

      Delete
  6. can i use this to hack carpark systems and show text message on the parking autopay machine

    ReplyDelete
    Replies
    1. Hello, this is simply a library to drive 8x8 matrix led. You can use to show text message, yes.

      Delete