​ ​ ​ ​ Maxim MAX7219 LED driver not booting up blank (with or without Picaxe attached)
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Thread: Maxim MAX7219 LED driver not booting up blank (with or without Picaxe attached)

  1. #1
    Senior Member
    Join Date
    Sep 2012
    Location
    Melbourne, Australia
    Posts
    206

    Default Maxim MAX7219 LED driver not booting up blank (with or without Picaxe attached)

    Hi All,

    I recently bought a small Maxim MAX7219 LED dot-matrix display to play with.

    After reading through the 7219 data sheet closely, i found it quite easy to control this chip.

    However, When the matrix powers up, there is a brief flash of ALL LEDS (well, maybe 3 or 4 don't flash on).


    Straight from the data sheet:

    Code:
    Initial Power-Up
    On initial power-up, all control registers are reset, the
    display is blanked, and the MAX7219/MAX7221 enter
    shutdown mode. Program the display driver prior to
    display use. Otherwise, it will initially be set to scan one
    digit, it will not decode data in the data registers, and
    the intensity register will be set to its minimum value.
    I've programmed all the 7219 registers in my picaxe code to initialise correctly, but the data sheet doesn't show any preferable order that the 7219 should be initialised.

    Has anyone had this experience? and is there a preferred order of setup codes that should be sent to the 7219 to make it bootup blank instead of a flash of LEDs?


    Thanks in advance.

  2. #2
    Technical Support
    Join Date
    Jan 1970
    Location
    UK
    Posts
    24,373

    Default

    Quote Originally Posted by OLDmarty View Post
    I've programmed all the 7219 registers in my picaxe code to initialise correctly, but the data sheet doesn't show any preferable order that the 7219 should be initialised.
    Perhaps post your code so it can be checked that it's not doing anything to flash the LED's. At start-up the display should be blanked so nothing should flash. It may be that you are actually setting LED's before clearing them.

    The code I have for my program which initialises a 7219 for an LED matrix is -

    Code:
    ; Turn the display off. Enable all rows.
    ; Set no decoding mode for all rows. Blank
    ; the rows. Turn the display on.
      
    Out16( $0F00 )            ; Ensure test mode is off
    Out16( $0C00 )            ; Display off
    Out16( $0BFF )            ; All rows used
    Out16( $0900 )            ; Segment display
    Out16( $0100 )            ; Row 1 = Blank
    Out16( $0200 )            ; Row 2 = Blank
    Out16( $0300 )            ; Row 3 = Blank
    Out16( $0400 )            ; Row 4 = Blank
    Out16( $0500 )            ; Row 5 = Blank
    Out16( $0600 )            ; Row 6 = Blank
    Out16( $0700 )            ; Row 7 = Blank
    Out16( $0800 )            ; Row 8 = Blank
    Out16( $0C01 )            ; Display on
    I don't recall any flashing of LED's but I rarely power it off and on while testing my code.

  3. #3
    Senior Member
    Join Date
    Sep 2012
    Location
    Melbourne, Australia
    Posts
    206

    Default

    Thanks Hippy, OK, here's a quick listing of what i do to initialise the 7219 before sending the main code to it.

    I read in the data sheet that the 7219 can still be programmed while sleeping, and i *think* i should be turning OFF the led test mode 1st, instead of 2nd, as per my sequence below...

    Sorry i don't have my final working code handy, i'm not at work, but this is the exact order of things i'm sending to the 7219.


    Code:
    Initialise:
    
    ;set the 'load-7219' pin LOW
    ;set the 'clock-7219' pin LOW
    ;set the 'datain-7219' pin LOW
    
    ; SETUP 7219 matrix chip to start accepting valid data and displaying LEds...
    
    ;Turn 7219 chip ON, (get 7219 out of shutdown mode):
    ;
    SHIFTOUT Clock-7219, Datain_7219, MSBFirst_L, ($0C, $01)
    PULSOUT load-7219, 1
    
    
    ;Turn OFF the LED Test mode.
    ;
    SHIFTOUT Clock-7219, Datain_7219, MSBFirst_L, ($0F, $00)
    PULSOUT load-7219, 1
    
    
    ;Set display INTENSITY to around 50%
    ;
    SHIFTOUT Clock-7219, Datain_7219, MSBFirst_L, ($0A, $07)
    PULSOUT load-7219, 1
    
    
    ;Set NUMBER of display digits to enable (all 8, for 64 leds or 8x 7-seg displays)
    ;
    SHIFTOUT Clock-7219, Datain_7219, MSBFirst_L, ($0B, $07)
    PULSOUT load-7219, 1
    
    
    ;Set DECODE MODE - OFF for this test (mainly ON for 7-seg display stuff)
    ;
    SHIFTOUT Clock-7219, Datain_7219, MSBFirst_L, ($09, $00)
    PULSOUT load-7219, 1
    
    
    ;BLANK out ALL 8 Displays to clear their contents.
    
    
    pause 1 second
    
    
    Start main code loop (LED patterns and/or 7-seg stuff)

  4. #4
    Senior Member
    Join Date
    Sep 2012
    Location
    Melbourne, Australia
    Posts
    206

    Default

    On another note, when the 7219 LED matrix board is powered up by itself (NOT connected to a picaxe) it still flashes "all leds" briefly (except 3 or 4 leds).
    (Note that ALL leds are fully controllable by my LED-pattern codes, so it's not a faulty driver or matrix display.

    The display never used to flash like this upon powerup, so i can't help feeling i've "set" something in the 7219 via my picaxe coding.

    As a reference, I bought a 2nd 7219 matrix board today ($8), and without programming anything into it, it does not flash anything at power up (no picaxe connected).

  5. #5

    Default

    http://www.picaxeforum.co.uk/showthr...ap-Chinese-ICs ... perhaps? (especially see post #41 though)

    ...I can't believe that the 7219 on an $8 board (got a link?) will be a genuine Maxim full-spec device.

  6. #6
    Senior Member
    Join Date
    Sep 2012
    Location
    Melbourne, Australia
    Posts
    206

    Default

    Quote Originally Posted by MartinM57 View Post
    http://www.picaxeforum.co.uk/showthr...ap-Chinese-ICs ... perhaps? (especially see post #41 though)

    ...I can't believe that the 7219 on an $8 board (got a link?) will be a genuine Maxim full-spec device.
    Ahhh, yes, i never considered the chinese flakey chips.
    Bare in mind, the chip responds and does everything i instruct it to do, all rows/columns are working as expected and i have no problems turning particular LED(s) on or off at any given time.

    My only slight concern as per OP, is the bootup flash when the data sheet clearly says it boots up with all registers cleared and in sleep mode....something to consider and i should buy a real chip ($20) and compare the 2 outcomes.

    Here's where i bought it locally in Australia: https://www.jaycar.com.au/arduino-co...odule/p/XC4499

  7. #7
    Technical Support
    Join Date
    Jan 1970
    Location
    UK
    Posts
    24,373

    Default

    It may be a 'dodgy chip' but I would have suspected it's sending the Turn Display Command On ($0C01) before having explicitly cleared all the data registers. Once on it could will be displaying whatever random garbage is in those data registers.

    It does seem odd that it displays anything when powered-up and not connected to anything. I guess if the PICAXE stops it displaying, prevents any flash, it doesn't really matter.

    Those who clone other people's chips may not replicate them exactly but they would normally do enough to not have them appear faulty or behave unacceptably at turn on.

  8. #8
    Senior Member
    Join Date
    Sep 2012
    Location
    Melbourne, Australia
    Posts
    206

    Default

    Quote Originally Posted by hippy View Post
    It does seem odd that it displays anything when powered-up and not connected to anything. I guess if the PICAXE stops it displaying, prevents any flash, it doesn't really matter.
    This is the problem, even when the picaxe is connected, the display STILL flashes at powerup when it shouldn't.

    The matrix display never flashed at powerup when i first got it. It's only since i've been using the picaxe to initialise/clear/turn-on the 7219 that it now flashes during powerup, even on it's own.

    I can't help feeling i've internally 'set' (or corrupted) a register in the 7219.

  9. #9
    Technical Support
    Join Date
    Jan 1970
    Location
    UK
    Posts
    24,373

    Default

    There is no non-volatile memory in the 7219 so no way to accidentally program it to do something it should not be doing at turn-on.

    This seems to be a chip hardware issue and, if disabling the display immediately at turn-on when connected to the PICAXE does not prevent the unwanted flash, then it would seem to be a case of either live with that or replace the chip.

  10. #10
    Senior Member
    Join Date
    Feb 2013
    Location
    UK
    Posts
    425

    Default

    Quote Originally Posted by hippy View Post
    It may be a 'dodgy chip' but I would have suspected it's sending the Turn Display Command On ($0C01) before having explicitly cleared all the data registers. Once on it could will be displaying whatever random garbage is in those data registers.

    It does seem odd that it displays anything when powered-up and not connected to anything. I guess if the PICAXE stops it displaying, prevents any flash, it doesn't really matter.

    Those who clone other people's chips may not replicate them exactly but they would normally do enough to not have them appear faulty or behave unacceptably at turn on.
    Perhaps the photos in this post may help in checking the veracity of the chip that you have; http://forum.arduino.cc/index.php?topic=233109.0

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •