View Full Version : double digit counter
02-18-2005, 06:53 AM
does anyone know the code for·a double digit counter.· the website only offers the code for a single digit counter. thanks for the help.
What websight are you referring to?
Also, can you be more specific about a two digit counter?
Exactly what are you trying to do?
02-19-2005, 10:43 AM
oh sorry bout that. i was referring to the parallax website, where in the experiment section for the BS2 stamp they only have the code for a single digit counter. I'm working on a scoreboard project and i needed the code for a double digit counter that is controlled by a switch to keep score.
02-19-2005, 11:09 AM
It would just be the same code as a single digit counter, but you would increment the second digit (10s place) after the first digit equals 9. For example when you increment the score you would need to add:
if OnesPlace = 9 then addTen
OnesPlace = 0
TensPlace = tensPlace + 1
02-19-2005, 10:51 PM
ok thanks alot