Hi,
Sure you can, I find no problems doing that.From what I can tell, you can't preload POSCNTH or POSCNTL
Not sure where you got that number from but MAXCNT is setable to anything between 0 and 65535.Another item that puzzled me is that the datasheet mentions that MAXCNT value is 1527h
MAXCNTH = 128 works just fine here.I'm trying to do as simple encoder for menu sleection and would like to set POSCNT in the middle so that I don't have to mess with rollover in either direction
Code:Test: HSEROUT["Program start",13] HSEROUT[DEC PosCntH*256+PosCntL,13] Pause 10 PosCntH = 128 HSEROUT[DEC PosCntH*256+PosCntL,13] PosCntL = 1 Pause 100 HSEROUT[DEC PosCntH*256+PosCntL,13]/Henrik.Program start
0
32768
32769




Bookmarks