This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

A51 only allows 16 bit arithmetic - Help!!


Hi,

I have the following code

#define FT_RESOLUTION_NS 240
#define US_2_FT_TICKS(x) (((x) * 1000)/FT_RESOLUTION_NS)

values calculated with US_2_FT_TICKS where the x * 1000 bit overflows 16 bits are incorrect. Is there any way round this? If not this must be the first assembler I have ever seen that does not perform 32 bit constant arithmetic, and most of the do floating point as well.