Schematic and the WHOLE code would help.
and this one...
not sure how it will be processed...Code:CURRENT1 = CURRENT1 - CURRENT1 >> 6
could be better.Code:CURRENT1 = CURRENT1 - (CURRENT1 >> 6)
What's the initial value of CURRENT1?
Darrel did some nice average routine, maybe you want to have a look at it?
http://www.pbpgroup.com/modules/wfse...hp?articleid=7
Bookmarks