Having a problem that I don't understand concerning this subject, wonder if I can resurrect it?
I'm driving 8 digits of LED 7 segment display multiplexed with a 18F4431. The display elements are decoded with a lookup table. All is well with numbers 0-9, but I'm having trouble understanding how to add a few Alpha characters.
Another bit of info is that this is a menu portion of the code and is selected using a rotary encoder with a push button for entry. It just increments Temp.
What I believe are the relevant lines of code are below:
Code:
FOR Idx = 0 TO 7
SELECT CASE Idx
CASE 0
Temp = ValueD DIG 0
CASE 1
Temp = ValueD DIG 1
CASE 2
Temp = ValueD DIG 2
......
END SELECT
' 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, dp, L, H, C, S, A, n, blank ( what they represent)
LOOKUP Temp,[63,6,91,79,102,109,125,7,127,111,128,56,119,57,109,119,84,0] DigDef
SEGDIF (Idx) = DigDef
The problem is that I don't seem to be able to incorporate a single digit value to a lookup table more than 0-9. I realize that the table is 18 elements long , and I can drop 2 to get it into a HEX representation (16), but I can't even get past 9 (10). Any ideas?
Thanks for looking
Mark
Bookmarks