Quantcast
Channel: MCS Electronics Forum
Viewing all articles
Browse latest Browse all 20562

Various : 10 digit 7-segment multiplexing : REPLY

$
0
0
Thanks for your reply Paul. In your link are just eight digits and I can buy a scoreboard for carambole-biljart, but... I want to LEARN and DO. I changed the code somewhat, the variable 'beurten' is now displayed in the middle of the four digits. Case 8 : 'display 8 If Gemiddelde = 0 Then Getal = Str(beurten) If Len(getal) = 1 Then Disp(teller) = &H00 If Len(getal) = 2 Then Hulp = Left(getal , 1) A = Val(hulp) Disp(teller) = Cijfer(a + 1) End If End IF If Gemiddelde > 0 Then If Punt = 1 Then Getal = Str(gemiddelde) Getal = Left(getal , 5) Hulp = Mid(getal , 3 , 1) A = Val(hulp) Disp(teller) = Cijfer(a + 1) End If If Mid(getal , 3 , 1) = Chr(46) Then Punt = 1 Hulp = Mid(getal , 2 , 1) A = Val(hulp) Disp(teller) = Cijfer(a + 11) Else Hulp = Mid(getal , 2 , 1) A = Val(hulp) Disp(teller) = Cijfer(a + 1) End If End If Case 9 : 'display 9 If Gemiddelde = 0 Then Getal = Str(beurten) Hulp = Right(getal , 1) A = Val(hulp) Disp(teller) = Cijfer(a + 1) End If If Gemiddelde > 0 Then If Punt = 1 Then Getal = Str(gemiddelde) Getal = Left(getal , 5) Hulp = Mid(getal , 4 , 1) A = Val(hulp) Disp(teller) = Cijfer(a + 1) End If If Mid(getal , 4 , 1) = Chr(46) Then Punt = 1 Hulp = Mid(getal , 3 , 1) A = Val(hulp) Disp(teller) = Cijfer(a + 11) Else Hulp = Mid(getal , 3 , 1) A = Val(hulp) Disp(teller) = Cijfer(a + 1) End If End If Case 10 : 'display 10 If Gemiddelde = 0 Then Disp(teller) = &H00 If Gemiddelde > 0 Then Getal = Str(gemiddelde) Getal = Left(getal , 5) Hulp = Right(getal , 1) A = Val(hulp) Disp(teller) = Cijfer(a + 1) End If End Select I've got my Bascom AVR a day earlier so I could compile the code. No errors. Will my digits be refreshed 25 times a second or do I have to raise the clockfrequency? Regards Willie

Viewing all articles
Browse latest Browse all 20562

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>