Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
Recently i try to make a program to control a servomotor by giving an angle between 0° and 90°, i made the program with the main code in C where the microcontroller reads the caracter given by a matrix keyboard using pins interruptions (An assembler code which gives the equivalent character of the keyboard to A), rests '0' to convert the ASCII caracter into numbers ('0' now is 0 for example) and make a new number by multiplying by 10 the tens and adds the unit (i.e. '9''0' in LCD converts to 9*10+0 = 90).
The program works well, but i need to rewritte the program in assembler. No problem, the PWM interrups are in ASM, the GPIO interrups also, but the main.c where i multiply is in C because of the multiplications.
I know about the MAC aviable for the PSoC 1 but investigating i found a document from Cypress called "Arithmetic Libraries User Guide" where describes a subroutine that multiplies 2 8-bit numbers (just what i need because i don't use signed ints and the result is 8-bit also) but says i need to write the following line include "arith.inc", when i build the project says that inc file is not founded.
Where i can find that file? What i can do?
BTW, in the compiler i see suggestions like "MULX", "MULY", how i can use that to Multiply assuming that do this.