Home > Back-end >  For help on CCS, and shorten the long code calculation
For help on CCS, and shorten the long code calculation

Time:09-25


1) receive_angle_temp [n_row] [m_col]=(uint8_t) (((receive_angle * 45) & gt;> 3) + 0.5) & amp; 0 x3f;//store receiving phase//into the D26 ~ D21 total 6 bit


(2) receive_angle_temp [n_row] [m_col]=(uint8_t) (receive_angle/5.625 + 0.5) & amp; 0 x3f;//store receiving phase//into the D26 ~ D21 total 6 bit


Code was written by the second line (2), is nested inside the cycle of mn respectively, 13, 14, tests show run on hardware costs more than 180 mu s, then I think I can change the division to bit operations, improve the operation speed, the 100 mu s time is shortened, but I'm a computing method seems to be wrong, the result is wrong,

Which is suitable for double receive_angle
Hope to be able to increase speed
  • Related