N-Bit_MATH


Closed Thread
Results 1 to 39 of 39

Thread: N-Bit_MATH

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    If you un-comment B or C, then you end up with invalid statements.

    But in general, it looks like your program is larger than the chips memory.
    No way to know with only a snippet of your code.

    And, it would be easier to load the SetPoint this way ...
    Code:
    @ MOVE?CP  21746FD9h, _SetPoint
      SetPoint(4) = 7
    DT

  2. #2


    Did you find this post helpful? Yes | No

    Cool

    Quote Originally Posted by Darrel Taylor View Post
    If you un-comment B or C, then you end up with invalid statements.

    But in general, it looks like your program is larger than the chips memory.
    No way to know with only a snippet of your code.

    And, it would be easier to load the SetPoint this way ...
    Code:
    @ MOVE?CP  21746FD9h, _SetPoint
      SetPoint(4) = 7
    Thanks Darrel,

    chips memory should be 32k (18F4550) and within the IF statement only two times by = by and not any SetPoint "statements" then the compiled size is 28692 bytes. That is the strange thing here, how can one explain that?

    I tested this:
    @ MOVE?CP 21746FD9h, _SetPoint
    SetPoint(4) = 7
    no problems, once,
    BUT
    when there more than one then the problems are "familiar" from those earlier mentioned. It seems that .... only guessing, that the compiler is allergic to SetPoint
    of course not so, but again there is something here that I do not grasp...
    OR
    do I miss something from the hole picture here
    Here is the code with more @ MOVE?CPs:
    Code:
    @ MOVE?CP  21746FD9h, _SetPoint
      SetPoint(4) = 7
    @ MATH_DIV  _SetPoint, _Position, _Error  
    @ MOVE?CP  21756FD9h, _SetPoint
      SetPoint(4) = 6
    @ MATH_DIV  _SetPoint, _Position, _Error  
    @ MOVE?CP  21766FD9h, _SetPoint
      SetPoint(4) = 5
    @ MATH_DIV  _SetPoint, _Position, _Error  
    @ MOVE?CP  21776FD9h, _SetPoint
      SetPoint(4) = 4
    @ MATH_DIV  _SetPoint, _Position, _Error

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    There's no way for me to tell what's happening, since your snippets all compile.

    If I had your whole program, maybe I could see what's going on.
    DT

  4. #4


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    There's no way for me to tell what's happening, since your snippets all compile.

    If I had your whole program, maybe I could see what's going on.

    Thanks Darrel,

    the hole program is big, but here it is attached:

    Maybe you can see with one small glance what is the cause of the error, the origin (that is me, but...). I sure wish to find the problem, what is causing this mysterious behavior.

    Nevertheless, maybe you can see the problem with one glance...

  5. #5
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    I don't think the file was accepted.
    Try adding a .txt extension.
    DT

  6. #6


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    I don't think the file was accepted.
    Try adding a .txt extension.
    Yep...

    Did not check it until now. Let's hope it comes through this time.
    Attached Files Attached Files

  7. #7
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    DEFINE RESET_ORG 1000h ' Room for Microchip USB Bootloader

    That's 4K, +28K = 32K
    The chip is FULL.
    DT

Members who have read this thread : 1

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