Max7219 cascading problem ?


Closed Thread
Results 1 to 3 of 3
  1. #1

    Default Max7219 cascading problem ?

    Hi everyone,
    thanks for every one helping me in this forum which it's my favourite forum to achive and nearly reached to the end of my first project ( queueing system ) , but I have some explanation about cascading max7219 .

    In this project I can control up to 18 large seven segments with using only 3 Max7219 and 3 UDN2981 , where each 3 digits are together in same connection , and every 6 digits are connected to max7219 . but the problem is when I display any number on first 3 digits then the same number displayed on the 3 digits on the next max7219 , but I can avoid this by displaying the required number again in the 3 digits which changed by wrong. I solve it but I need a prefect solution with needing to change the other digits .

    here is my code

    ''''''' Initial MAX7219
    Init_MAX:
    ;-----the first , MAX7219 SETUP-----
    ADDRESS = $09 : DATAREG = $FF : gosub send_data'decode mode Code B-digits 7-0
    ADDRESS = $0A : DATAREG = $0f : gosub send_data'intensity (brightness) 0..15
    ADDRESS = $0B : DATAREG = $05 : gosub send_data'scan limit 0..5
    ADDRESS = $0C : DATAREG = $01 : gosub send_data'normal operation
    ADDRESS = $00 : DATAREG = $ff : gosub send_data'no test
    ADDRESS = $0F : DATAREG = $00 : gosub send_data'display normal format

    ;-----the second ,MAX7219 SETUP-----
    ADDRESS = $09 : DATAREG = $FF : gosub send_data1'decode mode Code B-digits 7-0
    ADDRESS = $0A : DATAREG = $0f : gosub send_data1'intensity (brightness) 0..15
    ADDRESS = $0B : DATAREG = $05 : gosub send_data1'scan limit 0..5
    ADDRESS = $0C : DATAREG = $01 : gosub send_data1'normal operation
    ADDRESS = $00 : DATAREG = $ff : gosub send_data1'no test
    ADDRESS = $0F : DATAREG = $00 : gosub send_data1'display normal format

    ;-----the third ,MAX7219 SETUP-----
    ADDRESS = $09 : DATAREG = $FF : gosub send_data2'decode mode Code B-digits 7-0
    ADDRESS = $0A : DATAREG = $0f : gosub send_data2'intensity (brightness) 0..15
    ADDRESS = $0B : DATAREG = $05 : gosub send_data2'scan limit 0..5
    ADDRESS = $0C : DATAREG = $01 : gosub send_data2'normal operation
    ADDRESS = $00 : DATAREG = $ff : gosub send_data2'no test
    ADDRESS = $0F : DATAREG = $00 : gosub send_data2'display normal format


    return

    send_data:
    '''''send data to max7219
    load=0
    SHIFTOUT DIN,CLK,1,[ADDRESS,DATAREG\8]
    'SHIFTOUT DIN,CLK,1,[ADDRESS]
    'SHIFTOUT DIN,CLK,1,[DATAREG]
    load=1
    PAUSE 20
    return

    send_data1:
    ''''''send data to max7219
    load=0
    SHIFTOUT DIN,CLK,1,[ADDRESS,DATAREG\8,0,0] ; two nop code
    load=1
    PAUSE 20
    ;PULSOUT LOAD,1 ' basicly just selects or deselect the max7219
    return

    send_data2:
    ''''''send data to max7219
    load=0
    SHIFTOUT DIN,CLK,1,[ADDRESS,DATAREG\8,0,0,0,0] ; two nop code
    load=1
    PAUSE 30
    ;PULSOUT LOAD,1 ' basicly just selects or deselect the max7219
    return

  2. #2


    Did you find this post helpful? Yes | No

    Default

    Ok I found the solution in APPLICATION NOTE 3947
    Daisy-Chaining SPI Devices, after no respone form any other

  3. #3
    Join Date
    Feb 2013
    Posts
    1,078


    Did you find this post helpful? Yes | No

    Default Re: Max7219 cascading problem ?

    Having the same issue, I don't think OP is active anymore but...

Similar Threads

  1. MAX7219 Helping Hand Please
    By isaac in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 14th February 2014, 16:07
  2. 7 Segment Displays and MAX7219
    By Bill Legge in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 31st October 2010, 19:30
  3. USART Problem , but don't know where, in pc? or in PIC?
    By precision in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th July 2007, 09:12
  4. Shorter Subroutines for MAX7219
    By exelanoz in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 16th March 2007, 12:35
  5. 1 slave 1 master 1 MAX232 1 problem ?
    By SuB-ZeRo in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 31st July 2005, 23:59

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

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