Well, the obvious, if using an 18F partIf you don't have an 18F part and all you want is a simple counter then perhaps something like this might work (not tested), it should count to 655 milions and a bit beyond:Code:Counter VAR LONG Main: ' Don't use Loop as a label, it's a reserved word. Counter = Counter + 1 lcdout $FE, line1,"Counter:", DEC Counter ' I think there's a problem with using # with LONG PAUSE 100 Goto Main
/Henrik.Code:TenThousands VAR WORD Ones VAR WORD Ones = Ones + 1 If Ones = 10000 THEN Ones = 0 TenThousands = TenThousands + 1 ENDIF LCDOUT $FE, line1, Counter: " IF TenThousands > 0 THEN LDCOUT DEC TenThousands, DEC4 Ones ELSE LCDOUT DEC Ones ENDIF




Bookmarks