N-Bit_MATH


Closed Thread
Results 1 to 39 of 39

Thread: N-Bit_MATH

Hybrid View

  1. #1


    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

  2. #2
    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

  3. #3


    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...

  4. #4
    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

  5. #5


    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

  6. #6
    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

  7. #7


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    DEFINE RESET_ORG 1000h ' Room for Microchip USB Bootloader

    That's 4K, +28K = 32K
    Oops
    TRUE ! and thank you for pointing out that.

    Didn't know/understand that when the number shown in the lower left corner (Success 28676 : bytes used) of MicroCode Studio did not include those 4k! That explains now really a lot.
    Obviously the program is too big

    There is not a big brother to 18F4550, that would be otherwise like but with 48 or 64 k of program memory? Or is there?

    USB is the reason in the first place to choose 18F4550...

    Then of course ...
    when it is not possible to continue with a processor with only 32k of program mem then..
    How about... PIC18F4620 with 64k of program memory and almost pin equivalent (with 4550) but unfortunately without USB but then again, I wonder how much code it would take if one would integrate USB/UART circuit FT232 unit along with 18F4620.

    I suppose that it (FT232) has been used all around the world,
    so I will try to look around and see what kind of experience people has...

    Any experience with FT232? My only fear is that the "driver" for it in PIC is too big, or maybe the algorithm will for a working system consumes most time, I don't know.
    What other troubles would one expect with such a plan?

    Let's play with the idea that it already done and working (18F4620&FT232) so would it be possible to use that system with some kind of a bootloader?

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