View previous topic :: View next topic |
Author |
Message |
williefeijs
Joined: 25 Aug 2013 Posts: 4
|
Posted: Mon Aug 26, 2013 12:21 am Post subject: 10 digit 7-segment multiplexing |
|
|
hi, I'm new here.
Late 80's and early 90's I did some programming in QuickBasic.
Now that I've got more time I want to program again. For my other hobby, carambole-biljart, I wrote some code for a scoreboard.
The code is in the attachment. Will it work? I'm using the DEMO-version of Bascom, the code is more than 4K so I can't compile.
Next Tuesday I'll get the full-version of Bascom AVR.
Also attached a photo of the display that I will be using. |
|
Back to top |
|
|
Paulvk
Joined: 28 Jul 2006 Posts: 1257 Location: SYDNEY
|
|
Back to top |
|
|
williefeijs
Joined: 25 Aug 2013 Posts: 4
|
Posted: Thu Sep 05, 2013 3:33 pm Post subject: |
|
|
Hello,
I did build my scoreboard on a breadboard. There were a few errors in my program but I managed to get rid off them.
Attached the working program and a photo of the breadboard. Positive or negative criticism welcome.
Regards,
Willie |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Thu Sep 05, 2013 9:39 pm Post subject: |
|
|
Great that you realized your project. Always nice when somethings works as planned right?
In most cases segmented displays are controlled by a timer interrupt that updates the display but i see you did it in the main code which is also an option.
Code looks well. Maybe you can use English comments so everybody understands it better. And a circuit of the electronics will make things more clear for others too.
There is the str2digits that could have been used. _________________ Mark |
|
Back to top |
|
|
williefeijs
Joined: 25 Aug 2013 Posts: 4
|
Posted: Sun Sep 08, 2013 12:36 am Post subject: |
|
|
Thanks Mark, for your comment.
Attached the English file and the circuit.
Regards,
Willie |
|
Back to top |
|
|
Paulvk
Joined: 28 Jul 2006 Posts: 1257 Location: SYDNEY
|
Posted: Sun Sep 08, 2013 8:36 am Post subject: |
|
|
Hello Willie
Much easier for me to follow the code now thank you !
Have a look at the ROUND function in Bascom for your 0.099999 problem.
Regards Paul |
|
Back to top |
|
|
williefeijs
Joined: 25 Aug 2013 Posts: 4
|
Posted: Sun Sep 08, 2013 9:46 am Post subject: |
|
|
Paul,
The result of 1/10 has to be 0.100
When I use Round(Average) the result is 0.000
Regards Willie |
|
Back to top |
|
|
|