??? 10/19/04 04:34 Read: times |
#79547 - RE: Microcontroller Scientific Calculator Responding to: ???'s previous message |
I am currently doing a "Microcontroller based Scientific Calculator" which inclueds almost all the functions of a scientific calculator. Work inclueds interfacing keypad and display.How do I program it to calculate trigonometric funtions?
Sim This is an interesting project and I have possibly missed the desired accuracy of this school project. If it is only to demonstrate that you have some assembly language programming abilities, for trig you might consider the lookup table thing and limit your table to 45 degrees in integer degrees only. Maybe not the most useful calculator in the world but it will show knowledge of the fundamentals. Look at the trig tables and notice that there are entries for the angles (for example) 0 to 45 degrees (therefore a 45 element table). Also notice that for angles of 46 to 90 degrees are derived also from this table. Now go to the trig book and use the 'Functions of angles in any quadrant in terms of angles in the first quadrant', and also the 'Fundamental identities'. As I said, this would be primtive but it would demonstrate your abilities in assembler. Also you could increase the accuracy by increasing the size of the table. For better accuracy programming in Basic52 or C would be much better short of using a processor better suited for math operations. TomB |