Hi all,
I'm having trouble understanding something in this example code. Maybe someone can explain.
Code:
Main:
FOR Value = 0 TO 999
GOSUB SetDisp
PAUSE 500
NEXT Value
GOTO Main
'---[Set 7-seg patterns to WORD value]--------------------------------------
SetDisp:
FOR Idx = 2 to 0 STEP -1
Temp = Value DIG Idx
LookUp Temp,[132,175,193,137,170,152,144,143,128,136,210,251],Temp
SEGDEF(Idx) = Temp
NEXT Idx
RETURN
The biggest question is why is there 12 data points in the table? I am assuming that the actual numbers are because of the wiring of the digits with this specific LED as I can not figure out a segment pattern. After that, I fall down on why 12 instead of 8 unless it involves positioning the decimal point somehow. I wonder, if with the original wiring, this would be clearer to me. I would think that you would line up the segments in order with the port pins in order.
Thanks
Mark
Bookmarks