We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
hello , i am having some problems with the multiplication division unit of the xc878 infineon microcontroller. i am trying to do a shift operation. the number to be shifted is a 32 bit. lets say i want to do this: 0x00FB00FF >> 16. i would require the MD0,MD1,MD2,MD3 registers. now my problem. i can load the MD0 and MD1 registers but i dont know how to load the MD2 and MD3 registers. please kindly help out. stephen
Another solution, if the compiler performs 16-bit shifts as actual shifts, is to use a pointer to a struct of two uint16_t integers and assign (with type cast) this pointer the address of the 32-bit integer. Then individually do
p = (u32_to_u16_struct*)&my_32_bit_val; MDU_MD01 = p->low16; MDU_MD23 = p->high16;
I recommend to use an assembly module.
I believe that the Infineon XC800 is compatible with this http://www.keil.com/support/man/docs/c51/c51_mdu_r515.htm
Using the MDU_R515 directive should therefore automatically use the MDU.