Floating point cosine function

Publisher:老卫Latest update time:2015-02-03 Source: laogu Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Label: FCOS Function: Floating point cosine function

Entry condition: Operand is in [R0].
Exit information: Result is still in [R0].
Affected resources: DPTR, PSW, A, B, R2~R7, bits 1DH~1FH Stack requirement: 6 bytes
FCOS: LCALL FABS ;COS(-X) = COS X
MOV R5,#1 ;Constant 1.5708 (π/2)
MOV R6,#0C9H
MOV R7,#10H
CLR 1EH
LCALL MVR0
CLR F0
LCALL AS1 ;x+(π/2)
LCALL MOV0 ;Save the result, then run the following FSIN program

Reference address:Floating point cosine function

Previous article:Floating point sine function
Next article:Convert floating point radians to floating point degrees

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号