"arith.inc" missed?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
RaFl_3143356
Level 1
Level 1

Hi,

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.

Greetings

0 Likes
1 Solution
SampathS_11
Moderator
Moderator
Moderator
250 sign-ins 250 solutions authored 5 questions asked

Hello Rafael,

You will not require include "arith.inc" in your assembly language source file. If your source file is "C", only then you will be requiring #include <arith.h>.

Sampath

View solution in original post

0 Likes
1 Reply
SampathS_11
Moderator
Moderator
Moderator
250 sign-ins 250 solutions authored 5 questions asked

Hello Rafael,

You will not require include "arith.inc" in your assembly language source file. If your source file is "C", only then you will be requiring #include <arith.h>.

Sampath

0 Likes