Hello,
I've been poking around for the last two weeks trying to find out how to do an arctangent function with the PIC and finally gave up and joined the forum. I am using a PIC16F628 to read the Parallax HM55B compass module. Unfortunately all of the code I've found is for the Basic Stamp and it doesn't cross in certain places due to the ATN function which is not available to the PIC. I broke down today and ordered a Math Coprocessor from Parallax and a Basic Stamp BS2P-SX just so I can get the compass calibrated and working (functional) to interface to the other half of my project, but I ultimately want to use the PIC if I can.
I did find some ASM code for arctangent but it's pretty confusing and I don't think everything is there to make the code work... I don't have the brain power to understand the ASM side of the PIC unfortunately.
Has anyone worked on something like this before that has any tips or help to offer? I would greatly appreciate anything that would get me going to convert the X, -x, y and -y to brads and then to degrees without having the ATN function available to me.
Can it even be done using PBP?
Thanks for ANY help on this.
Dave
Bookmarks