![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
CCW CW Control BLDC
cos.h
- Committer:
- oguro
- Date:
- 2019-02-17
- Revision:
- 0:faa58403944a
File content as of revision 0:faa58403944a:
void cosU(){ ut1c=uTc.read_us(); f1c=1-(cos(2*3.14159*(1/(usic*1E-6))*zint)*16384); a1c=(2*cos(2*3.14159*(1/(usic*1E-6))*zint)*16384); uc[0]=a1;uc[1]=0xC000;uc[2]=0; uc[3]=f1c; uc[4]=0; } void cosUN(){ ut2c=uTc.read_us(); uTc.reset(); } /******************z transfer******************************/ void ztrc(){ uc[2] = ((uc[1]*uc[4])>>14) + ((uc[0]*uc[3])>>14); uc[4] = uc[3]; uc[3] = uc[2]; } /*********************************************************/