Shop OBEX P1 Docs P2 Docs Learn Events
micromega FPU user defined function call - FCALL — Parallax Forums

micromega FPU user defined function call - FCALL

slcottslcott Posts: 27
edited 2009-12-29 18:17 in General Discussion
I am trying to call a user defined function on a micromega fpu. A portion of my code is listed. I am using:

'-------------------- uM-FPU USER DEFINED FUNCTIONS ---------------------------
INIT_REGS           CON     $00    ' user defined FPU function, initialize fpu registers
PROCESS_ADC         CON     $01 ' 
CALC_ADJUSTMENT     CON     $02 ' 
' =========================================================================
  PROGRAM Start
' =========================================================================
Start:
Fpu_Reset
Fpu_Write FCALL, INIT_REGS
Main:
PAUSE 5000
GOTO Main




Is this the correct way to call user defined functions on a micromega fpu. I have already loaded the attached fpu code onto the fpu using the micromega v3 ide. I am trying to sort out if my hardware or software is buggy? Any ideas...?

Post Edited (slcott) : 12/28/2009 8:22:28 PM GMT

Comments

  • slcottslcott Posts: 27
    edited 2009-12-28 20:20
    any help greatly appreciated.
  • JonnyMacJonnyMac Posts: 8,910
    edited 2009-12-28 22:29
    You might want to send a not to Cam Thompson. Are you presently able to communicate with the FPU? If that works, then the other stuff is, as my friend says, a small matter of programming. I haven't use the FPU in a long time and never did get into custom functions.
  • slcottslcott Posts: 27
    edited 2009-12-29 02:45
    does anyone else have any experience with micromega fpu hooking up to an sx chip?
  • RickBRickB Posts: 395
    edited 2009-12-29 16:27
    search for "micromega fpu". The bs2 forum has a lot of hits.
  • DaveGDaveG Posts: 84
    edited 2009-12-29 18:17
    You should go to the website: micromegacorp.com/sx.html in order to develop the SPI interface with the chip.
    I have successfully used this chip with an SX for quite a while.

    Dave
Sign In or Register to comment.