Hi Isaac,
You have two control ways for this device: decode B and no decode.
If you stay in decode mode (and I see you using the device in this mode) you can send character 10 and only segment g will be ON (see table 5 in the data sheet).
If you go in no decode mode you can individually control each segment.
Regards,
Nick
Big Thanks to you Nick
you were correct sending the character 10 and only segment g is ON it works
i used this loop below
My next problem now is how to display 6 digits like 123456 i have being going round in circles all night as there is greater then a word variable can handleCode:Displayg: Max_Dp=6 ' Display number for Decimal Point Digit=0 ' Start at Digit 0 of Max_Disp Variable For Position=6 to 1 step -1 ' Start at Farthest Right of Display Register=Position ' Place Position into Register R_Val=Max_Disp Dig Digit ' Extract the individual numbers from Max_Disp R_Val=10 ' Display ------ only g is on If Digit=Max_Dp then R_Val.7=1 ' Place the decimal point, held in Max_DP Gosub Transfer ' Transfer the 16-bit Word to the MAX7219 If Digit>=5 then Digit=0 ' We only need the first 6 digits Digit=Digit+1 ' Point to next Digit within Max_Disp Next Position ' Close the Loop Return
any ideas would be well appreciated
Regards
Isaac
Isaac
If you can split the number and have it in RAM as an array, all you need to do is write this out to the 7219 to be displayed. So, I would hazard a guess that your question is more about how to split a number to be displayed. Could you be more specific about your question?
Jerson
You learned how to do this when you were 5 (give or take), you just don't know it...
You count to ten on your fingers, but you want to keep counting, so what do you do?
You get your brother to HOLD the PLACE of the overflow from your fingers, so every time you go over 10, you reset to ZERO, and he adds another finger, and you keep counting.
Well, now your brother is out of fingers, so what do you do?
You get your sister to count the overflows from your brother.
You overflow, reset, add one to your brother...keep counting...
Your brother overflows, resets, and adds one to your sister...keep counting...
And so on and so on and so on...
So, you are counting ones...
Your brother is counting tens...
Your sister is counting hundreds...
Now, replace the words YOU, BROTHER, and SISTER, with some other digit placeholder that's compatible with PBP... Now what in PBP could possibly hold the value of a digit (or digits) of some sort?
Or you could use PBPL. Longs could easily handle your 6 digits.
Charles Linquist
IMNSHO:
On the "silly" scale, this rates:
-|--------^-|+
On the "helpful" scale, it rates:
-|^---------|+
I'm glad I didn't learn this way when I was 5, back in 1955, with no sisters and only a brother . . .
. . . and I'm pretty sure isaac, as any one of the rest of us, understands counting in base 10 without a condescending "finger-counting" illustration.
Russ
N0EVC, xWB6ONT, xWN6ONT
"Easy to use" is easy to say.
Maybe so, maybe not...BUT....
For somebody that can't grasp the concept of splitting up numbers into smaller chunks, they might need to be reminded of the basics. And it's obvious to me that, while you might know how to make larger numbers out of a bunch of smaller numbers, didn't get what I was getting at the most basic level.
While some people might think that they can 'think' in base2/base8/base10 and base16 all at the same time, just because they can 'program a PIC', can they really?
'cause that's exactly what the O/P wanted to know...how to keep track (i.e. count, manipulate, etc.) numbers to large to fit in a byte/word (i.e. hand). Think about it. At the most basic level, all we can do is mess with a byte. How does PBP multiply 32bit numbers? It breaks them down to the byte level and plays with them as needed.
Way back in the day, before I had PBP and used to do nothing but assembly work (before I knew what I was doing really) on the PIC and needed to count large numbers to display on an LCD, I'd break the bytes up into BCD, and work with them that way. I could deal with virtually any size number that way, limited only by the amount of ram on the PIC.
So, condescending finger counting example?
Maybe...
If a person takes that example in the negative fashion, then just maybe that person hasn't learned as much as they thought they have.
Another quicky example of what I'm getting at... My wife can (and does) drive a relatively fast car. But she can't do a tune-up, rebuild the engine, or drive in the Indy 500.
In the end though, I think it would just be a lot easier for Isaac to figure out why his system isn't playing well with PBPL and LONG's.
That's pretty much the same way I had to do it "way back in the day" . . . in 1969 on an IBM 1130 with a 2310 disk drive using a 2315 "pizza box" removable disk about 14 inches in diameter. Sadly, the LCD had yet to be invented, so the output was to an 1132 chain printer.Way back in the day, before I had PBP and used to do nothing but assembly work (before I knew what I was doing really) on the PIC and needed to count large numbers to display on an LCD, I'd break the bytes up into BCD, and work with them that way. I could deal with virtually any size number that way, limited only by the amount of ram on the PIC.
An exercise in making larger numbers out of much smaller numbers was in June and July, 1967, when I was calculating the values, determining the periods ("rings"), and counting the digit distributions in repeating decimal fractions of the form 1/(10x-1) on a Philco 2000. For x=1, 1/9 is easy, 0.1111 . . . But for x=2, 1/19, the fraction is 0.052631578947368421 before it repeats, beginning again with "0526 . . . " (18-digit period or "ring") and going on, forever repeating. For x=3, 1/29, the procedure is the same, and so on. The objective was to create an algorithm for generating random numbers.. . . it's obvious to me that, while you might know how to make larger numbers out of a bunch of smaller numbers, didn't get what I was getting at the most basic . . .
The actual math is all whole numbers, no fractions, and . . . well, I'll let skimask explain how to do it.
I have in fact learned as much as I think I have . . . but I haven't learned nearly as much as I want to know!If a person takes that example in the negative fashion, then just maybe that person hasn't learned as much as they thought they have.
Last edited by RussMartin; - 25th October 2008 at 07:21.
Russ
N0EVC, xWB6ONT, xWN6ONT
"Easy to use" is easy to say.
Bookmarks