Other Parts Discussed in Thread: MSP430F5437A, MSP430F5438A
Good morning everyone,
I have another perhaps rather easy question for all fo those who get out of bed early on a monday morning :)
MaxUVA = Temp_longint / Time_real;
uint = long int / (long int ) uint <----- typecast
I use this kind of division regardless of time and code consumption right now, in a routine for calculating something. Now the result is not correct.
I am not far enough into C to see all the errors i make, please could someone tell me how can I calculate a 32 bit division in C without using some fancy assambler code?
I am afraid I cannot break this calculation down to 16 bit, because before that division i will have to add around 80 16-bit values together, so my result will be a 32-bit in first place.
My assupmtion now, this monday morning :), was that it is simply impossible to do a 32 bit division with the "/" operator in C, is that true?
I am using the MSP430F5437A CCS4.2.5
If no other answer comes up, I guess i could use the hardware multiplyer, which is capable of 32 bit multiplications, as i can always calculate 1/(16 bit).
Thanks for reading and helping me out.
Best wishes,
Seb