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

BASCOM-AVR : 3 digit bcd? : REPLY

$
0
0
Hi petros047, I needed a 3 digit display as well which delt with 0-999, so I came up with this one today. At the present, it's set up to count from 0-999 and restart. (there is also a test using random which is remed out) You only need to change the variable "Number" to the number you wish to display and then set the variable "Change" to 1 The variable "Change" tells the convert routine to do ONE conversion, it then bypasses that routine until you change the number again and set the Change bit again. This is so that routine isn't trying to convert the number continually. It only needs to be changed IF, your "Number" changes. The rest is done in the interrupt at 8mS interval 125Hz. (it changes to the next digit every 8mS) selects the correct data for that display and turns it on. It also does leading zero blanking. Also in the interrupt routine are decimal points set up for each digit, just need to un-rem the one you want. These lines just or the data with &H02 which turns the DP on as well. Surprisingly, it's only a small amount of code Hope this can help you in your endevours. Regards Deanus

Viewing all articles
Browse latest Browse all 20639

Trending Articles



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