#41595 - nicouiuc - Sat Apr 30, 2005 1:48 am
Hi together,
I am still fighting with a control algorithm I set up on the GBA. I used fixed point math to set up an equation; however, that did not really work. So i put my filter into matlab, and the reason why its not working is HUGE integer numbers. I need a precision of about 30 bits, else the filter screws up.
Now I was wondering if I can use signed long long integers on the GBA. TONC says I could use them; however, I did not really find much more about it on the internet.
I tried it, and some problems occured:
1) I have to declare them as "volatile", else my display crahes, or it sometimes shows up in funny colours. I dont really know what volatile means to variables. Are they else moved into an area that the display uses maybe?
2) When I display the variables, it shows an "normal" integer which is overflowing. However, when I display the final result of the computation (which is right shifted again), it might make sense, im not sure though.
So my question is if I can use signed long long int at all, and if so, if theres anything i have to be beware of.
Thanks,
~Nico
I am still fighting with a control algorithm I set up on the GBA. I used fixed point math to set up an equation; however, that did not really work. So i put my filter into matlab, and the reason why its not working is HUGE integer numbers. I need a precision of about 30 bits, else the filter screws up.
Now I was wondering if I can use signed long long integers on the GBA. TONC says I could use them; however, I did not really find much more about it on the internet.
I tried it, and some problems occured:
1) I have to declare them as "volatile", else my display crahes, or it sometimes shows up in funny colours. I dont really know what volatile means to variables. Are they else moved into an area that the display uses maybe?
2) When I display the variables, it shows an "normal" integer which is overflowing. However, when I display the final result of the computation (which is right shifted again), it might make sense, im not sure though.
So my question is if I can use signed long long int at all, and if so, if theres anything i have to be beware of.
Thanks,
~Nico