| ??? 09/14/07 11:27 Read: times |
#144621 - Re: Trying to understand Responding to: ???'s previous message |
You mean like a deadzone? If it changes +1 or -1 it ignores. Once someone told me as "deadband algorithm". I don't know if you can call it deadband, but yes it sort of ignores a certain amount of change up or down (settable by the "slack" constant). But in a very cunning way... I will give a try, just dont know: How to get a module (ex: |X-Y|=positive number ) of number in ASM?... Examine the code, because that's exactly one of the things it does. Remember that living the satisfaction of replacing "just dont know: How to " with "Wow! Now I understand how to!" is the whole purpose of entertaining a hobby like this! Put your faith in trying to understand, not in looking for stuff which is fit for copying because all that does is replace "just dont know: How to " with "Wow! Now it works, and I understand my project even less than I did before!" and what is "bseg", "dbit", "dseg" and "cseg" seen in your code. These are directives to the assembler, not instructions. Just setting up some labels in RAM. Examine the manual of the freeware Metalink assembler, which is considered to be THE assembler for 8051 derivatives: http://www.metaice.com/ASM51/ASM51.htm. After cseg is where the actual program is being described. |



