I want to build a DVM based on a 28X1, a CD4511-7 segment/decoder/deriver and a 4 digit 7 segment LED display
The W1 variable contain the future adjusted ADC result, but for now I simulate with the fixed integer '4321' value
The 'DIG' function split the decimal digit and send it to the counting system as the digit ADDR.
Here the soft :
' -B- Port use
w1 = 4321
Routine:
b4 = w1 DIG 3 ' now b4 = 4
b4 = 128 + b4 ' 128= LSD : Most Signifiant Digit
outpins = b4
b5 = w1 DIG 2 ' now b4 = 3
b5 = 64 + b5 ' 64= 2d LSD
outpins = b5
b6 = w1 DIG 1 ' now b4 = 2
b6 = 32 + b6 ' 32= 3d LSD
outpins = b6
b7 = w1 DIG 0 ' now b4 = 1
b7 = 16 + b7 ' 16= Least Signifiant Digit
outpins = b7
inc w1
goto Routine
Strangely, nothing run as I want. The display lit, but never it increment by 1
I'm really in trouble... I swear I only drink coffee !
Many thanks
The W1 variable contain the future adjusted ADC result, but for now I simulate with the fixed integer '4321' value
The 'DIG' function split the decimal digit and send it to the counting system as the digit ADDR.
Here the soft :
' -B- Port use
w1 = 4321
Routine:
b4 = w1 DIG 3 ' now b4 = 4
b4 = 128 + b4 ' 128= LSD : Most Signifiant Digit
outpins = b4
b5 = w1 DIG 2 ' now b4 = 3
b5 = 64 + b5 ' 64= 2d LSD
outpins = b5
b6 = w1 DIG 1 ' now b4 = 2
b6 = 32 + b6 ' 32= 3d LSD
outpins = b6
b7 = w1 DIG 0 ' now b4 = 1
b7 = 16 + b7 ' 16= Least Signifiant Digit
outpins = b7
inc w1
goto Routine
Strangely, nothing run as I want. The display lit, but never it increment by 1
I'm really in trouble... I swear I only drink coffee !
Many thanks