Another MAX7219 and 20x2 help required

barneydog

Member
Hi all,

Sorry to repeat threads again, I have searched and not seen anything similar to what I'm trying to achieve.

I'm trying to make a blue and white led matrix that flashes the leds on and off to a set pattern to start with, and then maybe move on to doing it as a randomly selected leds that get turned off. But trying to start as simple as possible.

Heres a clip of something very similar https://www.youtube.com/watch?v=M_7AN8YdnLU


The code has come from a mixture of places (Westaus55 and xtech007 posts. Thanks for all your posts) as well as some of my own, as I try and learn this. What I was aiming for is col 1 gets sent first and lights the leds according to the Lookup command. It then moves onto col 2, and so on up to col 8. Once it gets to col 8 it goes back to col 1 and overwrites the leds with a different pattern. Continuously changing between the 3 patterns I have added so far.


My Code

Code:
#Picaxe 20x2
;Setfreq M32 ; Not sure if need to set a frequency. Must check this out.

; The goal of this program is to make a 8x5 Matrix flash the leds randomly.
; There are blue and white leds in a mixed pattern in the matrix. 

; Symbol Definitions 

; Max7219
Symbol DIn7219 = B.0
Symbol Clk7219 =  B.1
Symbol Load7219 = B.2

; MAX7219 Registers
Symbol No_Op	= $00 ; No Operation
Symbol Digit0	= $01 ; Col 1
Symbol Digit1	= $02 ; Col 2
Symbol Digit2	= $03 ; Col 3
Symbol Digit3	= $04 ; Col 4
Symbol Digit4     = $05 ; Col 5
Symbol Digit5     = $06 ; Col 6
Symbol Digit6	= $07 ; Col 7
Symbol Digit7	= $08 ; Col 8
;
Symbol Decode	= $09 ; Decode or No Decode
Symbol Intensity	= $0A ; 10 - How bright the leds are
Symbol Scan_Limit	= $0B ; 11 - How many digits to display
Symbol Shutdown	= $0C ; 12 - Turn off
Symbol DigTest	= $0F ; 15 - Test
;
Symbol display_on = $01       ; 1 - Display ON
Symbol display_off = $00	; 0 - Display OFF
Symbol display_test_on = $01	; 1 - Turns all LED's ON for test
Symbol display_test_off = $00	; 0 - Test OFF
Symbol display_normal = $00	; 0 - Normal Operation 
Symbol blank = $0F		; 15 - Display Blanked
;
Symbol maxreg = b0		; maxreg is the digit (column) to be displayed
Symbol maxdata = b1		; maxdata is the LED pattern (1=on 0=off)
;
; Create random coordinates - Maybe used another day
;Symbol RandomX = w0
;Symbol RandomY = w1
;Symbol NewRandomX = w2
;Symbol NewRandomY = w3
;Symbol Repeater = w4

; Intialise ready for action

Initialise7219:
	maxReg = decode
	maxData = $00
	gosub SendTo_Max7219

	maxReg = intensity
	maxData = $01
	gosub SendTo_Max7219

	maxReg = scan_limit
	maxData = $07
	gosub SendTo_Max7219

	maxReg = shutdown
	maxData = display_on
	gosub SendTo_Max7219
	pause 30

Clear_MAX7219:		'Clears the display
	maxdata = $00
	for maxreg = 1 to 8
	gosub SendTo_Max7219
	next
	pause 500

Main:
	;
	; 1st Set of lights
	;
	maxReg = $01
	Lookup maxData, ($00, $01, $00, $00, $01), maxData
	Gosub SendTo_Max7219
	maxReg = $02
	Lookup maxData, ($01, $01, $00, $00, $01), maxData
	Gosub SendTo_Max7219
	maxReg = $03
	Lookup maxData, ($00, $00, $01, $00, $00), maxData
	Gosub SendTo_Max7219
	maxReg = $04
	Lookup maxData, ($01, $01, $00, $01, $01), maxData
	Gosub SendTo_Max7219
	maxReg = $05
	Lookup maxData, ($00, $00, $00, $00, $00), maxData
	Gosub SendTo_Max7219
	maxReg = $06
	Lookup maxData, ($00, $00, $01, $01, $01), maxData
	Gosub SendTo_Max7219
	maxReg = $07
	Lookup maxData, ($01, $01, $01, $01, $00), maxData
	Gosub SendTo_Max7219
	maxReg = $08
	Lookup maxData, ($01, $01, $00, $00, $01), maxData
	Gosub SendTo_Max7219
	Pause 500
	;
	; 2nd Set of lights
	;
	maxReg = $01
	Lookup maxData, ($01, $00, $00, $00, $00), maxData
	Gosub SendTo_Max7219
	maxReg = $02
	Lookup maxData, ($00, $00, $01, $01, $00), maxData
	Gosub SendTo_Max7219
	maxReg = $03
	Lookup maxData, ($01, $00, $01, $00, $01), maxData
	Gosub SendTo_Max7219
	maxReg = $04
	Lookup maxData, ($00, $00, $00, $00, $00), maxData
	Gosub SendTo_Max7219
	maxReg = $05
	Lookup maxData, ($01, $00, $01, $00, $01), maxData
	Gosub SendTo_Max7219
	maxReg = $06
	Lookup maxData, ($01, $00, $01, $01, $01), maxData
	Gosub SendTo_Max7219
	maxReg = $07
	Lookup maxData, ($00, $00, $00, $00, $00), maxData
	Gosub SendTo_Max7219
	maxReg = $08
	Lookup maxData, ($00, $00, $00, $00, $00), maxData
	Gosub SendTo_Max7219
	Pause 500
	;
	; 3rd Set of lights
	;
	maxReg = $01
	Lookup maxData, ($01, $00, $01, $01, $01), maxData
	Gosub SendTo_Max7219
	maxReg = $02
	Lookup maxData, ($00, $01, $01, $01, $00), maxData
	Gosub SendTo_Max7219
	maxReg = $03
	Lookup maxData, ($01, $01, $01, $00, $01), maxData
	Gosub SendTo_Max7219
	maxReg = $04
	Lookup maxData, ($00, $00, $01, $00, $01), maxData
	Gosub SendTo_Max7219
	maxReg = $05
	Lookup maxData, ($01, $00, $01, $01, $01), maxData
	Gosub SendTo_Max7219
	maxReg = $06
	Lookup maxData, ($01, $01, $01, $01, $01), maxData
	Gosub SendTo_Max7219
	maxReg = $07
	Lookup maxData, ($00, $01, $00, $01, $01), maxData
	Gosub SendTo_Max7219
	maxReg = $08
	Lookup maxData, ($01, $01, $00, $01, $01), maxData
	Gosub SendTo_Max7219
	Pause 500
	goto main

End

;Randomise_leds:
	
	; Random pick an X and Y location and turn that led on.
	; RandomY = 5 Max. RandomX = 8 Max.
	
;	Random RandomX
;	NewRandomX = RandomX // 8 + 1
;	Random RandomY
;	NewRandomY = RandomY // 5 + 1
;	Return

SendTo_Max7219:
	LOW Load7219
	SHIFTOUT Clk7219,DIn7219,1,(maxreg,maxdata)
	HIGH Load7219
	RETURN
 

stan74

Senior Member
The vid looked safe cos I like flashing leds but what's a max7219. controlling an arrays of leds is controlling an array of elements. it could be a large array of pixels on a lcd or shift registers controlling a massive array of leds but it's just turning elements in a 2d array on off. I would set up an array, xy representing the led "screen" matrix and then just play with "cells" in the array matrix. You seem to be able to control individual leds so see an effect you like and try to copy it.
You mention random so say 5x8 leds. random num 1 to 5.light 1st column random 1 to 5, next column the same until 8 column done.
then repeat from top down etc silly but a few lines of code to get a varying display idea. Or have I not got your plan?
 

barneydog

Member
max7219 is a led driver https://www.maximintegrated.com/en/products/power/display-power-control/MAX7219.html designed to run 7 seg displays, but quite capable of doing 8x8 led matrix.

If I understand what your saying correctly one of the displays we have spoken about in another post could do this job. But not sure it would have had the correct effect.

The max 7219 gives a lot of functionality to the leds, I had looked at using a 40x2 to do all the lights and then give them a random on off, but would be a waste of a decent microprocessor, and lots of extra components.

Or have I completely missed what your trying to say lol
 

westaust55

Moderator
Precisely what you are trying to achieve is not entirely clear to me.
If for each column of 5 LED's you wish to have more than 1 LED on then you need to determine a random number from 0 to 31 (=32 possibilities from 2^5). But if you only want a single LED in each column then calculate a number from 0 to 5. Then clear the data to be sent to the MAZ7219 and if the value is greater than 0 set bit <value - 1> and then send the data.

You may want a lookup table for the combinations if there is a need for bit 0 to be the top or bottom most LED, bit 1 to be the next along etc.

I have not gone right through your code but in the main loop, you have a set of 8 groups of lines like:
maxReg = $01
Lookup maxData, ($00, $01, $00, $00, $01), maxData
Gosub SendTo_Max7219
The lookup has 5 possible values but unless I am missing something, you are not setting the intial maxData value to identify which of the 5 value to take and use in SendTo_Max7219
In the line:
Lookup maxData, ($00, $01, $00, $00, $01), maxData
I believe you need to use a new variable for the first instance of maxData as a pointer into the Lookup.
 
Last edited:

barneydog

Member
hi thanks for the reply.

I'm not currently worried about getting the random side working.

What I thought I was achieving with

maxReg = $01
Lookup maxData, ($00, $01, $00, $00, $01), maxData
Gosub SendTo_Max7219

its selecting column 1, then the lookup command is placing 5 pieces of data into maxdata. one piece for each LED. $00 being led off $01 being led on.
So by setting the 5 leds to either being on or off for that column. Then its sending the data to the max7219 and moves onto the next column.

Hope this little table gives you better understanding
Columns 1 - 8
----01 02 03 04 05 06 07 08
01 $00 $01 $00 $00 $01 $00 $01 $00
02 $01 $00 $00 $01 $00 $01 $01 $01
03 $00 $01 $01 $00 $00 $00 $00 $00
04 $01 $00 $00 $01 $01 $01 $01 $01
05 $01 $00 $00 $00 $00 $00 $00 $00
 

westaust55

Moderator
What I thought I was achieving with
Code:
maxReg = $01
 Lookup maxData, ($00, $01, $00, $00, $01), maxData
 Gosub SendTo_Max7219
its selecting column 1, then the lookup command is placing 5 pieces of data into maxdata. one piece for each LED. $00 being led off $01 being led on.
So by setting the 5 leds to either being on or off for that column. Then its sending the data to the max7219 and moves onto the next column.
The Lookup command only takes one value on each pass.

The syntax is:
LOOKUP offset,(data0, data1, data2, data3, data4, ...dataN),receiving_variable

If you do not need to retain the offset variable then it and the receiving_variable can be one and the same which is what my past tutorial does.

When you use the LOOKUP command the variable "offset" must have a value in the range 0 to max number of data values.
When the offest = 0 then the value "data0" is placed in the receiving_variable
if the offset = 1 then the value "data1" is placed in the receiving_variable
and so on.

I gather that for each column 01 to 08 you need 5 bits of data. These 5 bits must be put into a single byte for sending to the MAX7219 chip.
so from your table for column 01 you need $00, $01, $00, $01 and $01.

If the first is the least significant bit (bit0), then you can put these 5 bits/values into a single byte value/variable %00011010.
In this case you do not need the LOOKUP command as you only have one value

If you were/are going to have a number of sequences/"screens" to display then you can use a variable as an offset in a FOR . . . NEXT loop
so you might have a structure like:
Code:
FOR offset = 0 to number_Off_steps
  maxReg = $01  
  LOOKUP offset, (%00011010, second value, third value, etc), maxData
  Gosub SendTo_Max7219

; repeat above 3 lines for maxReg = $02 to $08

  NEXT offset
 

barneydog

Member
wow that code is loads better!!! Perfect if I'm understanding it properly

LOOKUP offset, (%00011010, This would be second pass, this would be third pass, and fourth, fifth, sixth, seven, and so on), maxdata

That could be seven passes of column 1. Then it would move onto column 2 by repeating the lines and changing maxreg = $02, and also the values in the lookup command.

if %00011010 = $00, $01, $00, $01, $01

so %00011111 = $01, $01, $01, $01, $01

and $00010101 = $01, $00, $01, $00, $01

the first two %000 always stay as 000 I'm only needing the 5 bits?
 
Last edited:

westaust55

Moderator
If you have a value %00011010

The value for the bits (when set = 1) from left (most significant) to right (least significant) are
128, 64, 32, 16, 8, 4, 2, 1.
 

stan74

Senior Member
Cheers westy,I'll check the suppliers I've used. I'll just store led on off as bits in bytes then it's easy to shift a bit/led around.
 

barneydog

Member
Here is the completed code; can't test it as of yet waiting on hardware arriving!

Code:
#Picaxe 20x2
;Setfreq M32 ; Not sure if need to set a frequency. Must check this out.

; The goal of this program is to make a 8x5 Matrix flash the leds.
; There are blue and white leds in a mixed pattern in the matrix. 

; Symbol Definitions 

; Max7219
Symbol DIn7219 = B.0
Symbol Clk7219 =  B.1
Symbol Load7219 = B.2

; MAX7219 Registers
Symbol No_Op	= $00 ; No Operation
Symbol Digit0	= $01 ; Col 1
Symbol Digit1	= $02 ; Col 2
Symbol Digit2	= $03 ; Col 3
Symbol Digit3	= $04 ; Col 4
Symbol Digit4     = $05 ; Col 5
Symbol Digit5     = $06 ; Col 6
Symbol Digit6	= $07 ; Col 7
Symbol Digit7	= $08 ; Col 8
;
Symbol Decode	= $09 ; Decode or No Decode
Symbol Intensity	= $0A ; 10 - How bright the leds are
Symbol Scan_Limit	= $0B ; 11 - How many digits to display
Symbol Shutdown	= $0C ; 12 - Turn off
Symbol DigTest	= $0F ; 15 - Test
;
Symbol display_on = $01       ; 1 - Display ON
Symbol display_off = $00	; 0 - Display OFF
Symbol display_test_on = $01	; 1 - Turns all LED's ON for test
Symbol display_test_off = $00	; 0 - Test OFF
Symbol display_normal = $00	; 0 - Normal Operation 
Symbol blank = $0F		; 15 - Display Blanked
;
Symbol maxreg = b0		; maxreg is the digit (column) to be displayed
Symbol maxdata = b1		; maxdata is the LED pattern (1=on 0=off)
Symbol offset = b2		; offset is to store lookup position 
Symbol Number_Of_Steps = $08  ; 8 Steps
;
; Intialise ready for action

Initialise7219:
	maxReg = decode
	maxData = $00
	gosub SendTo_Max7219

	maxReg = intensity
	maxData = $01
	gosub SendTo_Max7219

	maxReg = scan_limit
	maxData = $07
	gosub SendTo_Max7219

	maxReg = shutdown
	maxData = display_on
	gosub SendTo_Max7219
	pause 30

Clear_MAX7219:		'Clears the display
	maxdata = $00
	for maxreg = 1 to 8
	gosub SendTo_Max7219
	next
	pause 500

Main:
	FOR offset = 0 to Number_Of_Steps
	maxReg = $01  
	LOOKUP OffSet, (%00001011, %00010000, %00011111, %00000000, %00011111, %00010011, %00010011, %00000000), MaxData
	Gosub SendTo_Max7219
	maxReg = $02  
	LOOKUP OffSet, (%00011100, %00010011, %00011111, %00000001, %00011111, %00001100, %00000100, %00011000), MaxData
	Gosub SendTo_Max7219
	maxReg = $03  
	LOOKUP OffSet, (%00000101, %00010000, %00010001, %00000001, %00011111, %00000000, %00001001, %00000100), MaxData
	Gosub SendTo_Max7219
	maxReg = $04  
	LOOKUP OffSet, (%00010110, %00000100, %00001110, %00011100, %00011111, %00010100, %00011100, %00000011), MaxData
	Gosub SendTo_Max7219
	maxReg = $05  
	LOOKUP OffSet, (%00011110, %00011010, %00001001, %00011011, %00000100, %00000100, %00010100, %00000100), MaxData
	Gosub SendTo_Max7219
	maxReg = $06
	LOOKUP OffSet, (%00010000, %00011101, %00011001, %00010011, %00010100, %00001000, %00000000, %00001010), MaxData
	Gosub SendTo_Max7219
	maxReg = $07  
	LOOKUP OffSet, (%00000100, %00010101, %00011001, %00010111, %00011111, %00011110, %00001010, %00010000), MaxData
	Gosub SendTo_Max7219
	maxReg = $08  
	LOOKUP OffSet, (%00011100, %00011011, %00010110, %00011111, %00011111, %00000000, %00010101, %00001011), MaxData
	Gosub SendTo_Max7219
NEXT offset


End


SendTo_Max7219:
	LOW Load7219
	SHIFTOUT Clk7219,DIn7219,1,(maxreg,maxdata)
	HIGH Load7219
	RETURN
 

barneydog

Member
sat in truck today and I had a thought!!! Would it be possible and would say a 20m2 handle this code

Code:
; some symbols and stuff here


Main:
	; first max 7219
	; some code
	
start2:
	; second max 7219
	; some code
	
start3: 
	; third max 7219
	; some code
My thought was rather than daisy chaining them, how about having one picaxe control three different max7219's doing separate tasks. If this is possible would be a great way of saving space in the area it would sit. 20m2 was just an opening thought as I know its capable of running parallel tasks
 

hippy

Technical Support
Staff member
Would it be possible and would say a 20m2 handle this code
I don't see why not providing the three 7219's don't share signal lines which could cause some awkward conflicts.

But I am not sure it would be any better than doing the three one after the other.

If you wrote your code as subroutines you could call them consecutively in a single task program, 'simultaneously' in a multi-tasking version and see what results you get. That shouldn't waste any effort as the bulk of the code would be common to each version.
 

barneydog

Member
Thanks for the reply Hippy, and sorry for such a delay in responding. But that nasty thing we all suffer daily has been stopping me writing the program :mad: I hate work lol

Trying to keep the code as short as possible, and not duplicate to much

Code:
#Picaxe 20x2
;Setfreq M64 ; Might be best to run it at max speed

; This program is using one 20x2 to control two MAX7219 which will be doing seperate tasks
; In the future plan to add more MAX7219 to the program.

; Max7219 Number 1
Symbol First_Din7219 	= B.0
Symbol First_Clk7219 	= B.1
Symbol First_Load7219	= B.2

; Max7219 Number 2
Symbol Second_Din7219	= C.0
Symbol Second_Clk7219	= C.1
Symbol Second_Load7219	= C.2

; No Duplication. Don't Think these need to be dupilcated at present!
; MAX7219 Registers
Symbol No_Op	= $00 ; No Operation
Symbol Digit0	= $01 ; Col 1
Symbol Digit1	= $02 ; Col 2
Symbol Digit2	= $03 ; Col 3
Symbol Digit3	= $04 ; Col 4
Symbol Digit4     = $05 ; Col 5
Symbol Digit5     = $06 ; Col 6
Symbol Digit6	= $07 ; Col 7
Symbol Digit7	= $08 ; Col 8
;
Symbol Decode	= $09 ; Decode or No Decode
Symbol Intensity	= $0A ; 10 - How bright the leds are
Symbol Scan_Limit	= $0B ; 11 - How many digits to display
Symbol Shutdown	= $0C ; 12 - Turn off
Symbol DigTest	= $0F ; 15 - Test
;
Symbol Display_On = $01       ; 1 - Display ON
Symbol Display_Off = $00	; 0 - Display OFF
Symbol Display_Test_On = $01	; 1 - Turns all LED's ON for test
Symbol Display_Test_Off = $00	; 0 - Test OFF
Symbol Display_Normal = $00	; 0 - Normal Operation 
Symbol Blank = $0F		; 15 - Display Blanked
Symbol Number_Of_Steps	= $08
Symbol MaxReg = b0		; MaxReg is the digit (column) to be displayed
Symbol MaxData = b1		; MaxData is the LED pattern (1=on 0=off)
Symbol Offset = b2		; offset is to store lookup position 
;
; Initalise both Max7219

Initialise7219:
	MaxReg = decode
	MaxData = $00
	Gosub First_SendTo_Max7219
	Gosub Second_SendTo_Max7219

	MaxReg = intensity
	MaxData = $01
	Gosub First_SendTo_Max7219
	Gosub Second_SendTo_Max7219

	MaxReg = scan_limit
	MaxData = $07
	Gosub First_SendTo_Max7219
	Gosub Second_SendTo_Max7219

	MaxReg = shutdown
	MaxData = display_on
	Gosub First_SendTo_Max7219
	Gosub Second_SendTo_Max7219
	pause 30
	
Test_Max7219:		; May comment this out once everything is working
	MaxReg	= Display_Test_On
	Gosub First_SendTo_Max7219
	Gosub Second_SendTo_Max7219
	Pause 800
	MaxReg	= Display_Test_Off
	Gosub First_SendTo_Max7219
	Gosub Second_SendTo_Max7219
	
; End all the setting up


Main: 
	FOR offset = 0 to Number_Of_Steps
	MaxReg = $01  
	LOOKUP OffSet, (%00001011, %00010000, %00011111, %00000000, %00011111, %00010011, %00010011, %00000000), MaxData
	Gosub First_SendTo_Max7219 ;Pattern 1
	LOOKUP OffSet, (%00011100, %00011011, %00010110, %00011111, %00011111, %00000000, %00010101, %00001011), MaxData
	Gosub Second_SendTo_Max7219 ;Pattern 8
	
	
	MaxReg = $02  
	LOOKUP OffSet, (%00011100, %00010011, %00011111, %00000001, %00011111, %00001100, %00000100, %00011000), MaxData
	Gosub First_SendTo_Max7219 ;Pattern 2
	LOOKUP OffSet, (%00011110, %00011010, %00001001, %00011011, %00000100, %00000100, %00010100, %00000100), MaxData
	Gosub Second_SendTo_Max7219 ;Pattern 5
	
	MaxReg = $03  
	LOOKUP OffSet, (%00000101, %00010000, %00010001, %00000001, %00011111, %00000000, %00001001, %00000100), MaxData
	Gosub First_SendTo_Max7219 ;Pattern 3
	LOOKUP OffSet, (%00011100, %00010011, %00011111, %00000001, %00011111, %00001100, %00000100, %00011000), MaxData
	Gosub Second_SendTo_Max7219 ;Pattern 2
	
	MaxReg = $04  
	LOOKUP OffSet, (%00010110, %00000100, %00001110, %00011100, %00011111, %00010100, %00011100, %00000011), MaxData
	Gosub First_SendTo_Max7219 ;Pattern 4
	LOOKUP OffSet, (%00010000, %00011101, %00011001, %00010011, %00010100, %00001000, %00000000, %00001010), MaxData
	Gosub Second_SendTo_Max7219 ;Pattern 6
	
	MaxReg = $05  
	LOOKUP OffSet, (%00011110, %00011010, %00001001, %00011011, %00000100, %00000100, %00010100, %00000100), MaxData
	Gosub First_SendTo_Max7219 ;Pattern 5
	LOOKUP OffSet, (%00001011, %00010000, %00011111, %00000000, %00011111, %00010011, %00010011, %00000000), MaxData
	Gosub Second_SendTo_Max7219 ;Pattern 1
	
	MaxReg = $06
	LOOKUP OffSet, (%00010000, %00011101, %00011001, %00010011, %00010100, %00001000, %00000000, %00001010), MaxData
	Gosub First_SendTo_Max7219 ;Pattern 6
	LOOKUP OffSet, (%00000101, %00010000, %00010001, %00000001, %00011111, %00000000, %00001001, %00000100), MaxData
	Gosub Second_SendTo_Max7219 ;Pattern 3
	
	MaxReg = $07  
	LOOKUP OffSet, (%00000100, %00010101, %00011001, %00010111, %00011111, %00011110, %00001010, %00010000), MaxData
	Gosub First_SendTo_Max7219 ;Pattern 7
	LOOKUP OffSet, (%00010110, %00000100, %00001110, %00011100, %00011111, %00010100, %00011100, %00000011), MaxData
	Gosub Second_SendTo_Max7219 ;Pattern 4
	
	MaxReg = $08  
	LOOKUP OffSet, (%00011100, %00011011, %00010110, %00011111, %00011111, %00000000, %00010101, %00001011), MaxData
	Gosub First_SendTo_Max7219 ;Pattern 8
	LOOKUP OffSet, (%00000100, %00010101, %00011001, %00010111, %00011111, %00011110, %00001010, %00010000), MaxData
	Gosub Second_SendTo_Max7219 ;Pattern 7
	
NEXT offset

Goto Main

First_SendTo_Max7219:
	Low First_Load7219
	Shiftout First_Clk7219, First_Din7219, 1, (MaxReg, MaxData)
	High First_Load7219
	Return
	
Second_SendTo_Max7219:
	Low Second_Load7219
	Shiftout Second_Clk7219, Second_Din7219, 1, (MaxReg, MaxData)
	High Second_Load7219
	Return
 
Top