How to display more than 65536 with MAX7219


Closed Thread
Results 1 to 27 of 27

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    Omaha, Nebraska USA
    Posts
    263


    Did you find this post helpful? Yes | No

    Default

    I've looked at the MAX7219 data sheet:

    http://datasheets.maxim-ic.com/en/ds...19-MAX7221.pdf

    . . . but only briefly.

    It looks to me (on page 6) as if you send each digit separately, along with the address of the digit's position (Table 2 on page 7). It also appears that the MAX7219 would be happy with a 4-bit BCD input for each digit. This means you can break your large number down into individual digits, each of which is only 4 bits and can be accomodated by a byte variable. Then you send each digit, and its position address, in a 16-bit word to the display.

    But there's no way to tell you how to break down the number without knowing where you are getting the number from in the first place. Are you counting something? Or measuring something? What is your input? Why do you need 6 digits of output? What is the display telling--this many somethings or this much something?
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

  2. #2
    Join Date
    May 2004
    Location
    brighton
    Posts
    149


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by RussMartin View Post
    I've looked at the MAX7219 data sheet:

    http://datasheets.maxim-ic.com/en/ds...19-MAX7221.pdf


    But there's no way to tell you how to break down the number without knowing where you are getting the number from in the first place. Are you counting something? Or measuring something? What is your input? Why do you need 6 digits of output? What is the display telling--this many somethings or this much something?
    The 6 digits numbers are a set of values like 123456 of which 123 represents 12.3ft and 4.56 metres.
    there would be 10 sets of number like that which would be stores in the
    pics eeprom so those 10 sets of number would take up 40 bytes of the eeprom.
    My thinking was that instead of using 2 Max7219 both connected for 3 digits each and display 12.3 on one and 4.56 on the 2nd .
    i could save on hardware cost if i just display say the first 4 locations containing 123 & 456 with the Max7219 configured for 6 digits.
    i can happily display them individaully but as i said its a waste on hardware.
    i am sorry if i didn't explain myself better from the start.

    Reagrds
    Isaac
    Last edited by isaac; - 27th October 2008 at 18:26.

  3. #3
    Join Date
    May 2004
    Location
    brighton
    Posts
    149


    Did you find this post helpful? Yes | No

    Lightbulb

    Hi Guys
    i have just sorted out the problem i had with Microcode Studio and
    PBPL and LONGs .
    the problem was that there were CodeStudioPlus.exe and also CodeStudio.exe so i delated the later and i now have PBPL option.
    who is going to be the first to show me how Long works with my problem

    Regards
    Isaac

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    SKIMASK

    MyVar VAR LONG
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    SKIMASK
    MyVar VAR LONG
    I know that, but he didn't have PBPL working...
    (you said LONG)

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    I know that, but he didn't have PBPL working...
    (you said LONG)
    ROFL... open your eyes...
    post #21
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Well, I would but only after I knew if the O/P had read/learned about LONGs first and tried himself...

  8. #8
    Join Date
    Aug 2006
    Location
    Omaha, Nebraska USA
    Posts
    263


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by isaac View Post
    The 6 digits numbers are a set of values like 123456 of which 123 represents 12.3ft and 4.56 metres.
    there would be 10 sets of number like that which would be stores in the
    pics eeprom so those 10 sets of number would take up 40 bytes of the eeprom.
    My thinking was that instead of using 2 Max7219 both connected for 3 digits each and display 12.3 on one and 4.56 on the 2nd .
    Then it looks to me like you don't need to use LONGs at all! In fact, I can't see how LONGs will help you.

    In fact, it looks as if you are "multiplexing" two different numbers onto one display.

    Since you are using only three digits per item, the largest of one of them (feet), even if multiplied by 10 for easy handling, is going to be 999, which is a lot less than 65,535, and the largest of the other (meters), even if multiplied by 100 for easy handling, is going to be 9999, which also is a lot less than 65,535. Each can be a WORD.

    In fact, if you allow only three decimal positions for meters, it, too, can never be larger than 999.

    Extract base 10 digits from each word as a binary-coded decimal (BCD) byte, then send each of them out along with a position address in a WORD for the display. Even the order you send them in doesn't matter much, since the word tells the display where that digit needs to appear.

    What is the relationship between the two values being displayed? From where does the data come?
    Last edited by RussMartin; - 28th October 2008 at 07:11.
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

  9. #9
    Join Date
    Feb 2013
    Posts
    1,124


    Did you find this post helpful? Yes | No

    Default Re: How to display more than 65536 with MAX7219

    It might be a decade delayed answer, but here is what op needs:

    To display any digit at any position on MAX7219, which can drive up to 8 digit 7 segment displays. Without sending actual number to that IC.

    The problem is, that all existing "code samples" for PBP are meant to decode value of some variable into corresponding reading of MAX7219 display. And without "LONG", we are limited to 65535.

    Due to that, I've almost completed a code, which will like this: There are two variables, MPOS, MVAL. First one stands for position on 8 digit display (0-7), and 2nd one is actual number you want to display there. So to display say 00876540, the code will look like this

    Code:
    MPOS=7
    MVAL=0
    GOSUB DSP
    MPOS=6
    MVAL=0
    GOSUB DSP
    MPOS=5
    MVAL=8
    GOSUB DSP
    and so on.

Similar Threads

  1. MAX7219 Helping Hand Please
    By isaac in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 14th February 2014, 15:07
  2. Hdsp 21xx display
    By Original in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 7th June 2012, 20:07
  3. 7 Segment Displays and MAX7219
    By Bill Legge in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 31st October 2010, 18:30
  4. Replies: 2
    Last Post: - 14th July 2008, 22:11
  5. Replies: 14
    Last Post: - 26th September 2007, 05:41

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