There is no way that's anywhere near as fast as a lookup table.
In your post on the MPELABS forum you had:
The killer there is the '//'.Code:lookbyte=timebyte // 32 ampvar=SINB[lookbyte]
Did you try replacing that with richard's suggestion (anding timebyte with 31)?
You need to get rid of all multiplication and division related instructions.
If you want to get < 25us with a 4MHz clock you only have 25 asm instructions for the entire loop.




Bookmarks