max 7219 questions
Archiver
Posts: 46,084
Hello group,
I am using the MAX7219 and it is working well. I am using parallaxinc
supplied code. I am having some trouble using hte full function of the driver
though. Here is a picture of how I plan to use it.
http://members.aol.com/v8tr4/display.jpg
I have two seperate 3 digit displays that have two different one byte data.
I am having a problem doing this though. I have tried a few things but with
no luck.
Any ideas on how to put in two seperate bytes to display on the board shown
would be appreciated.
[noparse][[/noparse]Non-text portions of this message have been removed]
I am using the MAX7219 and it is working well. I am using parallaxinc
supplied code. I am having some trouble using hte full function of the driver
though. Here is a picture of how I plan to use it.
http://members.aol.com/v8tr4/display.jpg
I have two seperate 3 digit displays that have two different one byte data.
I am having a problem doing this though. I have tried a few things but with
no luck.
Any ideas on how to put in two seperate bytes to display on the board shown
would be appreciated.
[noparse][[/noparse]Non-text portions of this message have been removed]
Comments
I am guessing I probably did not provide enough info (I'm hoping so [noparse]:)[/noparse]
I'm using the Stamp BS2e, although regular bs2 code is what I'm using.
Here is the display part of my code. I decided since I had changed so many
things in attempts to make it work reverted back to the original code so as
to not confuse anyone. The two bytes I would like to display are RPM1 and
RPM2
******************************************************************************
****
Loop:
rpm1 = 123
rpm2 = 201
gosub MaxDisplay
debug dec dispval,cr
goto loop
' ========================= SUBROUTINES ============================
' The MAX7219 won't accept a number like "2742" and display it on
' the LEDs. Instead, it expects the program to send it individual
' digits preceded by their position on the display. For example,
' "2742" on a five-digit display would be expressed as:
' "digit 5: blank; digit 4: 2; digit 3: 7; digit 2: 4; digit 1: 2"
' The routine MaxDisplay below does just that, separating a value
' into individual digits and sending them to the MAX7219. If the
' lefthand digits are zero (as in a number like "102") the
' routine sends blanks, not zeros until it encounters the first
' non-zero digit. This is called "leading-zero blanking."
MaxDisplay:
nonZ = 0 ' Clear flag for 1st non-zero digit.
for index = 7 to 1 ' Work from digit 5 down to digit 1.
shiftout DATA_n,CLK,msbfirst,[noparse][[/noparse]index] ' Send digit position.
temp = dispVal dig (index-1) ' Get decimal digit (0-4) of dispVal.
if temp = 0 then skip1 ' If digit = 0, don't set nonZ flag.
nonZ = 1
skip1:
if nonZ = 1 OR temp <> 0 OR index = 1 then skip2 ' If leading 0..
temp = 15 '..write a blank to the display.
skip2:
shiftout DATA_n,CLK,msbfirst,[noparse][[/noparse]temp] ' Send the digit.
pulsout Load,5 ' And load the display.
next ' Repeat for all 5 digits.
return ' Done? Return.
******************************************************************************
****
This code is grabbed straight from the Parallax datasheets.
What I would like to do is display two seperate bytes of data on the 2
seperate 3 digit LED displays that I have.
I am starting to think that what I want can not be done because all of the
info I can dig up on google regarding stamp and 7219 is limited to 5 digits,
which is due to 16bit limit. If this is the case then I think that this has
not been advertsied correctly by parallax, 8 digits would be nice, as long as
you can actually display more then 16 bits. I will assume that I am just not
figuring this out correctly at this point. I have been using 74HC595 so far
and you have unlimited the display size (except for board space which the
shiftregisters take up a lot of and is why I switched to max7219). I have
already made and stuffed the board and would hate to have to throw the board
away and start from scratch.
http://members.aol.com/v8tr4/display.jpg
If someone could please help me I would be so happy. I imagine I can't be the
first person using a stamp to want to do something like this.
thanx in advance,
Oliver
> Hello group,
>
> I am using the MAX7219 and it is working well. I am using parallaxinc
> supplied code. I am having some trouble using hte full function of the
> driver
> though. Here is a picture of how I plan to use it.
>
> http://members.aol.com/v8tr4/display.jpg
>
> I have two seperate 3 digit displays that have two different one byte data.
> I am having a problem doing this though. I have tried a few things but with
>
> no luck.
> Any ideas on how to put in two seperate bytes to display on the board shown
>
> would be appreciated.
>
>
>
[noparse][[/noparse]Non-text portions of this message have been removed]
http://www.parallaxinc.com/downloads/Documentation/Application%20Kits/MAX7219%
208-Digit%20LED%20Display%20Driver/MAX7219-21%208-Digit%20LED%20Display%20Driv
er.pdf
if that doesn't work go here and select maximum7219
http://www.parallaxinc.com/html_files/downloads/downloads_appkits.htm
[noparse][[/noparse]Non-text portions of this message have been removed]