Floating point math


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: Floating point math

    Though this is fairly old, right now I’m writing C code for dspic33FJ64GP just to do floating point math
    where I’m still more proficient with the rest of the program to use a 16F628A in the same circuit.
    Two chips have to talk some serial with each other. Quite crazy since then the board requires
    two regulators for two supply voltages and level conversion for connections between the 3.3 Volt dspic and any 5 Volt pic or peripherals.

    The dspic is really only for some numbers go in, it does it’s sin, cos, tan, and some different numbers come out.

  2. #2
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: Floating point math

    Why you need FP for trig function?
    You can use lookup table and linear interpolation to get 3-4 decimal places resolution.
    Melanie already done that
    http://www.picbasic.co.uk/forum/show...=2873#post2873
    And just found this
    http://www.picbasic.co.uk/forum/cont...h-PicBasic-Pro
    So I think that you can do all that in one pic.
    And you can use N bith math, or FP rutines, is long isn't enough... And it must be faster to do that in one PIC, than to sent and receive data thru UART.

  3. #3
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: Floating point math

    Hey Art, Being you like to work with the 16F628's you might have a look at using one of the 16F1847's to replace it. 8K of flash, 1K of ram, 256 bytes of eeprom and 32Mhz. I have replaced a few 16F628's from old projects and they work a treet...
    Dave Purola,
    N8NTA
    EN82fn

  4. #4
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: Floating point math

    I did give a a lot of thought of getting it into one chip, and it would definitely be the dspic
    since I already have implemented the functions I want into another program for the same chip.
    This is just the first time I’ve had to do the hardware. The last one was a kit web server.

    Since I want the LCD to be continually driven, and am more apt with fancy graphics with an 8 bit pic,
    that’s the reason to consider the second chip.
    If I was happy with a fairly static LCD display, it would be easy with the dspic alone.
    The algorithms are Sunrise/set, Moonrise/Set, and Moon Illumination for a clock.

Similar Threads

  1. Floating point math
    By Glenn in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th January 2009, 03:47
  2. Getting out of floating point
    By jcb344 in forum General
    Replies: 3
    Last Post: - 5th August 2008, 21:18
  3. Replies: 5
    Last Post: - 28th May 2008, 10:20
  4. Floating Point
    By jrudd in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th May 2005, 14:19
  5. help floating Point!
    By Eric in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 7th December 2003, 21:18

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts