It will help if you post the part of your program where you declare all of the variables you are using, and also post the errors you are getting.
Its not a good idea to use 0.5*(etc etc). You will be better off shifting 1 place to the right like this (etc etc)>>1.
Also, if you are declaring variables as bytes you have to make sure you cant possibly end up with a value higher than 255 in any of your calculations.
Bookmarks