I took the code available here: TM1638 LED Display Driver/Controller (picbasic.co.uk) , for TM1638, and modded it a bit (added support for 8 and 9), so now it works for that TM1628 module, link for which I've posted, too. All what it does, counts from 0 to 99, but looking at code, you can guess how to use it on your demand.
Use configs and other variables from the post above (or make your own) and replace the MAIN part in above code with this:
If anyone can suggest, how can I use lookup only once (if possible), that would be great.Code:FOR I=0 TO 99 LOW STB LOOKUP I DIG 1,[$3F,$06,$5B,$4F,$66,$6D,$7D,$07,$7f,$6F],J SHIFTOUT SDA, SCK, 0, [$C0+0,J] HIGH STB LOW STB LOOKUP I DIG 0,[$3F,$06,$5B,$4F,$66,$6D,$7D,$07,$7f,$6F],j SHIFTOUT SDA, SCK, 0, [$C0+2,J] HIGH STB PAUSE 100 NEXT




Bookmarks