Shop OBEX P1 Docs P2 Docs Learn Events
Having trouble understanding the Floating Point Coprocessor — Parallax Forums

Having trouble understanding the Floating Point Coprocessor

skatjskatj Posts: 88
edited 2008-01-29 16:09 in BASIC Stamp
Well, I interfaced my floating point coprocessor (uM FPU V-2) to the stamp, and have been going through the data sheet, but the way it is presented makes it a little hard to understand.

I understand the concept behind most of the document, but it breaks everything down that I don't really know how to program a simple process as a whole. for example, I know that to select register 5 as the A register you would do SELECTA+5 in the opcode, and then to add the value of register 2, you would type comma FADD+2, but obviously if I just typed that in the program it wouldn't work. Particularly, I don't know what to define as a constant and how to output these values in the debug terminal.

Could someone explain to me:

1. A brief synopsis on bytes/floating point/word variable types etc, in layman's terms?

2. How I would get a variable from the Stamp to the FPU? (Actually I sort of know this, but it would be nice to have some reinforcement)

3. How I would get the result of the FPU's calculations back to the Stamp and then output in the debug terminal?

4. and if possible, if someone could write a simple, complete program doing the following:

a. Setting an arbitrary variable to an arbitrary value.
b. Setting another arbitrary variable to another arbitrary value.
c. Sending these values to the FPU, then adding them together.
d. Sending the result back to the stamp and storing it in another variable.
e. Displaying the results.

Along with the constant definitions and comments.

5. Oh and also, links to any suggested reading, if any (other than the datasheet)

This would really help out a lot! I am totally lost sad.gif

Post Edited (skatj) : 1/27/2008 6:07:38 AM GMT

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-01-29 16:09
    Column number 123 of Nuts & Volts covered using the DS1620 in high resolution mode and showed how to use the FPU to calculate the floating point values. This may help you. You can download the article in PDF format from our website at the following link. Take care.

    http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol6/col/nv123.pdf

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.