Start a conversation

Extended Instruction Set

Extended Instruction Set for the PIC18 family is not supported by the compiler.

Choose files or drag and drop files
Was this article helpful?
  1. Filip Jankovic

  2. Posted
  3. Updated



    Pascal compiler for PIC32. Are trying to use pi with extended format, but it comes out as a 24bit value.

    program exper;
    var pie : extended;
        uta, utb, utc : array[23] of char;
      pie := pi;
      ExtendedToStr(pie, uta); {3.141592741012573    this is a 24 bit value}
      pie :=                                    3.1415926535897932384626433832795; {good value}
      ExtendedToStr(pie, utb); {3.141592741012573    still a 24 bit value}
      pie := pie                           - 0.00000008742278;    {difference from good value}
      pie := pie                           - 0.0000000000000035;  {needed to get lsb to 0x18 }
      ExtendedToStr(pie, utc); {3.141592653589793    }
    end.  { Main program }

    Is seems that constants are trunkated to 24bit real before they are put into code.